Packages

webpack-sources

3.7.1 · 18 Nov 2026MIT85.2M / weekRepositoryHomepagenpmAtom feed

Your version

53 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 3.x · latest line
  2. 3.7.1

    18 Nov 2026
    • Keep a RawSource created from a Buffer with convertToString intact after clearCache(). Its only copy of the content was dropped, so size() and updateHash() threw on sources webpack restored from the filesystem cache. Bytes that are not valid UTF-8 are now kept as they were.

  3. 3.7.0

    30 Oct 2026
    • Add util.sourceMap.originalPositionFor to find the original position of a generated one.

    • Keep an empty string in sourcesContent instead of dropping it.

  4. 3.6.0

    26 Sep 2026
    • Add map({ scopes: true }), emitting the source map scopes field from the bindings a source declares.

    • Create a cached source's map cache only once a map is asked for.

  5. 3.5.3

    24 Sep 2026
    • Hand out a recorded hash update as buffers, so cached data carries no big string.

  6. 3.5.2

    24 Sep 2026
    • Hash a string-backed source without materializing its buffer

      RawSource.updateHash and OriginalSource.updateHash called buffer(), which
      encodes the string to UTF-8 and memoizes the result — so every source that was
      hashed kept its content twice, as a string and as a buffer, for as long as the
      source lived. Node hashes a string as UTF-8, the same bytes buffer() produces,
      so the string is hashed directly instead and no digest changes.

      Measured on a webpack build of three.js + lodash-es (1033 modules, 2.71 MB of
      module source): retained arrayBuffers after the build drop from 8.74–8.76 MB
      to 5.81 MB with devtool: false, and from 9.35–12.11 MB to 6.42 MB with
      devtool: "source-map" — disjoint over six and five runs. 1029 Buffer.from
      calls per build are removed, one per module. CPU is unchanged: hashing those
      sources costs 9.23 ms via the buffer against 8.18 ms via the string, which no
      whole-build timing can resolve.

  7. 3.5.1

    6 Jul 2026
    • Stream potential tokens in OriginalSource instead of materialising an array

      OriginalSource.streamChunks (and therefore map() / sourceAndMap()) previously built the full splitIntoPotentialTokens array of substrings and then iterated it — even though map() and sourceAndMap() run with finalSource: true and discard every chunk substring. The scan is now streamed by offset, so chunk substrings are only allocated when actually emitted. This removes the intermediate array and, on the dominant final-source paths, all per-token slices: map() / sourceAndMap() allocate ~38–46% less memory and run ~15–40% faster.

    • Reduce allocations and CPU in map() / sourceAndMap(): mappings are serialized into a reused byte buffer instead of per-mapping strings, ReplaceSource verifies original content through a line-offset index instead of splitting sources into line arrays, and ReplaceSource.streamChunks emits position-only chunks and returns the final source directly when finalSource is requested.

    • Skip sorting ReplaceSource replacements when they were added in order.

  8. 3.5.0

    22 May 2026
    • Add clearCache(options?, visited?) method to Source that recursively releases cached data (CachedSource cached maps/buffers/strings, SourceMapSource parsed/serialized map caches, and dual-buffer caches in leaf sources). Lets consumers like webpack's SourceMapDevToolPlugin reclaim memory between chunks rather than accumulating per-task source map data across an entire build. Options: maps (default true) drops cached source maps; source (default true) drops cached source/buffer copies — pass false to keep source available for downstream plugins; parsedMap (default false) additionally drops the parsed object form on SourceMapSource instances when a buffer or string form survives (the combination { maps: true, source: false, parsedMap: true } matches the SourceMapDevToolPlugin call shape in webpack/webpack#20963). The optional visited WeakSet deduplicates the walk when the same child is reachable through multiple parents (e.g. modules shared across chunks).

  9. 3.4.1

    29 Apr 2026
    • Implements more effective buffers and buffer for ReplaceSource and improve performance in other places.

  10. 3.4.0

    23 Apr 2026
    • Add Source.prototype.buffers() that returns the source as Buffer. ConcatSource, CachedSource, and CompatSource implement it without allocating an intermediate concatenated buffer, allowing consumers that can write multiple buffers at once (e.g. via writev) to avoid the overhead of Buffer.concat in deeply nested sources.

    • Use Int32Array for signed VLQ delta accumulation in readMappings so cumulative values that go negative are preserved instead of wrapping to a large unsigned integer

    • Improved performance in many places.

  11. 3.3.4

    15 Feb 2026
    • Sync SourceMapSource constructor types with sourceAndMap method

  12. 3.3.3

    20 Jun 2025
    • Generate last column mapping even when source is missing for ConcatSource

  13. 3.3.2

    2 Jun 2025
    • Using HashLike name instead Hash

  14. 3.3.1

    2 Jun 2025
    • Always use a buffer to calculate the hash

    • [Types] Added debugId and ignoreList fields to RawSourceMap type

  15. 3.3.0

    23 May 2025
    • Added types

    • Added ability to reduce memory consumed

    • Avoid extra calculation for hash updates

  16. 3.2.3

    11 Jan 2022
  17. 3.2.2

    15 Nov 2021
    • Source Code is splitted into lines via custom code instead of using a RegExp

  18. 3.2.1

    13 Sep 2021
    • RawSources with Buffers can now be concatenated with ConcatSource

    • Source Code is splitted into lines via custom code instead of using a RegExp

  19. 3.2.0

    2 Aug 2021
    • Add SourceMapSource.buffer for better performance

    • More efficient serialization of source mappings

    • Avoid crashing when trying to compare the name with the original source, but there is no sourcesContent in SourceMap

  20. 3.1.2

    30 Jul 2021
    • Improve handling of invalid mappings (like zero sized or negative)

  21. 3.1.1

    29 Jul 2021

    equal to 3.1.0

  22. 3.1.0

    29 Jul 2021
    • Improve handling of null sources and sourceContents

    • Faster streaming when only lines are mapped

  23. 3.0.4

    29 Jul 2021
    • Fix invalid mappings when multiple lines with multiple chunks are replaced

  24. 3.0.3

    28 Jul 2021
    • Restore backward-compat format for storing end position of replacements

  25. 3.0.2

    28 Jul 2021
    • Fix incorrect offset sign when doing replacements

  26. 3.0.1

    27 Jul 2021
    • Fix ConcatSource off-by-1 bug

  27. 3.0.0

    26 Jul 2021
    • Remove all dependencies

    • Refactoring for performance

  28. 2.x
  29. 2.3.1

    20 Jul 2021

    Reading the note…

  30. 2.3.0

    27 May 2021

    Reading the note…

  31. 2.2.0

    29 Oct 2020

    Reading the note…

  32. 2.1.1

    28 Oct 2020

    Reading the note…

  33. 2.1.0

    26 Oct 2020

    Reading the note…

  34. 2.0.1

    28 Sep 2020

    Reading the note…

  35. 2.0.0

    17 Sep 2020

    Reading the note…

  36. 1.x
  37. 1.4.3

    5 Aug 2019

    Reading the note…

  38. 1.4.2

    5 Aug 2019

    Reading the note…

  39. 1.4.1

    31 Jul 2019

    Reading the note…

  40. 1.4.0

    31 Jul 2019

    Reading the note…

  41. 1.3.0

    20 Sep 2018

    Reading the note…

  42. 1.2.0

    29 Aug 2018

    Reading the note…

  43. 1.1.0

    26 Nov 2017

    Reading the note…

  44. 1.0.2

    4 Nov 2017

    Reading the note…

  45. 1.0.1

    3 Jun 2017

    Reading the note…

  46. 1.0.0

    3 Jun 2017

    Reading the note…

  47. 0.2.x
  48. 0.2.3

    24 Mar 2017

    Reading the note…

  49. 0.2.2

    24 Mar 2017

    Reading the note…

  50. 0.2.1

    24 Mar 2017

    Reading the note…

  51. 0.2.0

    7 Mar 2017

    Reading the note…

  52. 0.1.x
  53. 0.1.5

    7 Mar 2017

    Reading the note…

  54. 0.1.4

    15 Jan 2017

    Reading the note…

  55. 0.1.3

    12 Nov 2016

    Reading the note…

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.