Skip to content

Releases: webpack/webpack-sources

v3.5.0

22 May 08:56
7ad6559

Choose a tag to compare

Minor Changes

  • 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). (by @alexander-akait in #221)

v3.4.1

29 Apr 15:49
5a0b655

Choose a tag to compare

Patch Changes

  • Implements more effective buffers and buffer for ReplaceSource and improve performance in other places. (by @alexander-akait in #211)

v3.4.0

23 Apr 11:58
7c520c2

Choose a tag to compare

Minor Changes

  • 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. (by @alexander-akait in #204)

Patch Changes

  • fix: 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 (by @alexander-akait in #206)

  • Improved performance in many places. (by @alexander-akait in #209)

v3.3.4

15 Feb 16:57

Choose a tag to compare

Fixes

  • sync SourceMapSource constructor types with sourceAndMap method (#176)

v3.3.3

20 Jun 15:25

Choose a tag to compare

Fixes

  • generate last column mapping even when source is missing for ConcatSource

v3.3.2

02 Jun 16:18

Choose a tag to compare

Fixes

  • [Types] Using HashLike name instead Hash

v3.3.1

02 Jun 14:57

Choose a tag to compare

Fixes

  • Always use a buffer to calculate the hash
  • [Types] Added debugId and ignoreList fields to RawSourceMap type

v3.3.0

23 May 18:23

Choose a tag to compare

Features

  • Added types
  • Added ability to reduce memory consumed

Performance

  • Avoid extra calculation for hash updates

v3.2.2

16 Nov 07:15

Choose a tag to compare

Bugfixes

  • Source Code is splitted into lines via custom code instead of using a RegExp
    • In weird edge cases the RegExp caused a Stack Overflow

v3.2.1

13 Sep 15:21

Choose a tag to compare

Bugfixes

  • RawSources with Buffers can now be concatenated with ConcatSource
  • Source Code is splitted into lines via custom code instead of using a RegExp
    • In weird edge cases the RegExp caused a Stack Overflow