NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #720 most downloaded on npm
Source code handling classes for webpack
Last release 8 days ago
26 Sep 2026
Ships unpredictably
gaps range from 9 days to 3.4 years
Most releases are documented
notes for 38 of 51 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
62 releases · first in 2016
Add map({ scopes: true }) , emitting the source map scopes field from the bindings a source declares. (by @alexander-akait in #275 )
map({ scopes: true }), emitting the source map scopes field from the bindings a source declares. (by @alexander-akait in #275)Hand out a recorded hash update as buffers, so cached data carries no big string. (by @alexander-akait in #289 )
One column per quarter.
perf: hash a string-backed source without materializing its buffer (by @alexander-akait in #286 )
perf: hash a string-backed source without materializing its buffer (by @alexander-akait in #286)
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.
perf: stream potential tokens in OriginalSource instead of materialising an array (by @alexander-akait in #246 )
perf: stream potential tokens in OriginalSource instead of materialising an array (by @alexander-akait in #246)
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. (by @alexander-akait in #251)
Skip sorting ReplaceSource replacements when they were added in order. (by @alexander-akait in #249)
perf: use lookup table in splitIntoPotentialTokens for faster character classification (by @xiaoxiaojx in #240)
Replace multi-comparison chains (4 comparisons in phase 1, 6 in phase 2) with a single Uint8Array bitmask lookup per character. This reduces per-character branching overhead, yielding ~7% improvement on typical source and ~21% on large sources.
Add clearCache(options?, visited?) method to Source that recursively releases cached data ( CachedSource cached maps/buffers/strings, SourceMapSource
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)Implements more effective buffers and buffer for ReplaceSource and improve performance in other places. (by @alexander-akait in #211 )
buffers and buffer for ReplaceSource and improve performance in other places. (by @alexander-akait in #211)Add Source.prototype.buffers() that returns the source as Buffer[] . ConcatSource , CachedSource , and CompatSource implement it without allocating an
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)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)
sync SourceMapSource constructor types with sourceAndMap method
SourceMapSource constructor types with sourceAndMap method (#176)generate last column mapping even when source is missing for ConcatSource
[Types] Using HashLike name instead Hash
HashLike name instead HashAlways use a buffer to calculate the hash
debugId and ignoreList fields to RawSourceMap typeAdded ability to reduce memory consumed
Nothing published for this version
Source Code is splitted into lines via custom code instead of using a RegExp
RawSources with Buffers can now be concatenated with ConcatSource
RawSources with Buffers can now be concatenated with ConcatSourceadd SourceMapSource.buffer for better performance
SourceMapSource.buffer for better performancesourcesContent in SourceMapimprove handling of invalid mappings (like zero sized or negative)
Nothing published for this version
improve handling of null sources and sourceContents
fix invalid mappings when multiple lines with multiple chunks are replaced
restore backward-compat format for storing end position of replacements
fix incorrect offset sign when doing replacements
# Bugfixes * fix ConcatSource off-by-1 bug
# Performance * remove all dependencies * refactoring for performance * remove node() and listMap() * add streamChunks()
node() and listMap()streamChunks()fix type bug in CachedSource which lead to bad hashing performance
add caching to node and listMap
node and listMap# Performance * add caching to updateHash
updateHashfix a performance bug when processing minimized files with SourceMaps
Some Sources use to return an empty SourceMap instead of null as map
null as map
null instead nowfix crash with source "." is not in SourceMap
expose everything needed for serialization as public methods
buffer method to SourceCompatSourcemap()add support for a lazy function as original Source for CachedSource
# Features * add CompatSource
CompatSourcefix crash when Source in CachedSource returns null map
cache Buffers instead of string in CachedSource cache for map()
map()expose everything needed for serialization as public methods
fix updateHash for SourceMapSource
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
remove node and listNode methods from public API
buffer method to Sourceadd Source types to hash
Nothing published for this version
validate name before using it in SourceMapSource
fix crash introduced by last version
Support "identity" mappings for SourceMapSource
SourceMapSourceSourceMapSource to show/hide intermediate source codesize() method for binary sourcesadd name argument to replace and insert in ReplaceSource
name argument to replace and insert in ReplaceSourceImprove quality of generated Source Maps when doing replacements
Nothing published for this version
Update source-map dep to apply upstream bugfix
source-map dep to apply upstream bugfix ( #27 )fixed bug introduced by refactoring in LineToLineMappedSource
added original() method to ReplaceSource to get the original source
original() method to ReplaceSource to get the original sourceNothing published for this version
Nothing published for this version
Nothing published for this version
consistent empty line handling in PrefixSource
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →