Releases: webpack/webpack-sources
Releases · webpack/webpack-sources
v3.5.0
Minor Changes
- Add
clearCache(options?, visited?)method toSourcethat recursively releases cached data (CachedSourcecached maps/buffers/strings,SourceMapSourceparsed/serialized map caches, and dual-buffer caches in leaf sources). Lets consumers like webpack'sSourceMapDevToolPluginreclaim memory between chunks rather than accumulating per-task source map data across an entire build. Options:maps(defaulttrue) drops cached source maps;source(defaulttrue) drops cached source/buffer copies — passfalseto keep source available for downstream plugins;parsedMap(defaultfalse) additionally drops the parsed object form onSourceMapSourceinstances when a buffer or string form survives (the combination{ maps: true, source: false, parsedMap: true }matches theSourceMapDevToolPlugincall shape in webpack/webpack#20963). The optionalvisitedWeakSetdeduplicates 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
Patch Changes
- Implements more effective
buffersandbufferforReplaceSourceand improve performance in other places. (by @alexander-akait in #211)
v3.4.0
Minor Changes
- Add
Source.prototype.buffers()that returns the source asBuffer[].ConcatSource,CachedSource, andCompatSourceimplement it without allocating an intermediate concatenated buffer, allowing consumers that can write multiple buffers at once (e.g. viawritev) to avoid the overhead ofBuffer.concatin deeply nested sources. (by @alexander-akait in #204)
Patch Changes
-
fix: use Int32Array for signed VLQ delta accumulation in
readMappingsso 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
v3.3.3
Fixes
- generate last column mapping even when source is missing for ConcatSource
v3.3.2
Fixes
- [Types] Using
HashLikename insteadHash
v3.3.1
Fixes
- Always use a buffer to calculate the hash
- [Types] Added
debugIdandignoreListfields to RawSourceMap type
v3.3.0
Features
- Added types
- Added ability to reduce memory consumed
Performance
- Avoid extra calculation for hash updates