NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #158 most downloaded on npm
Generates and consumes source maps
Latest stable
1.2.4
Last release 3 days ago
19 Nov 2026
Release timing varies
gaps range from 2 months to 2.2 years
Nearly every release is documented
notes for 10 of 11 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
11 releases · first in 2021
Drag across the ruler to compare, or tap a release to open it.
Fix type definitions that didn't match the runtime, without breaking changes
Fix originalPositionFor returning nulls at the first column of a section (#99)
Fix a section's column offset being applied to its second line instead of its first (#104)
This affected sections with both a line and a column offset, in eachMapping, generatedPositionFor, SourceMapGenerator.fromSourceMap and SourceNode.fromStringWithSourceMap.
Support allGeneratedPositionsFor (#105)
It threw TypeError: this._findSourceIndex is not a function. It now returns the same results as for the equivalent map without sections, with positions from every section that has the source. generatedPositionFor on nested index maps threw the same error and works now too.
Fix generatedPositionFor returning made-up positions (#115)
It only searched the first section that listed the source, and when that section had no match, it returned the section offset added to null. It now searches all sections, so bias picks the closest mapping across them, and returns nulls when nothing matches.
Add computeColumnSpans (#116)
Fix generatedPositionFor, allGeneratedPositionsFor and eachMapping with ORIGINAL_ORDER throwing TypeError when a source has no mappings (#100)
Reported by @trackoor in #83. This is common in bundles, where a source can be listed after its code was tree-shaken away.
Fix allGeneratedPositionsFor returning positions that belong to a different source (#102)
Fix lookups throwing RangeError: Maximum call stack size exceeded on source maps with about 200,000 or more sources (#113)
Fix SourceNode#replaceRight throwing on a node without children (#114)
Fix type definitions that didn't match the runtime, without breaking changes (#117)
SourceMapConsumer accepts version as a number, null entries in sourcesContent, a missing names, index maps, JSON strings and the sourceMapUrl argument. Reported by @linsk1998 in #43; a fix for sourcesContent was proposed by @lahmatiy in #75.SourceMapConsumer.fromSourceMap is declared, and allGeneratedPositionsFor takes an optional column and returns lastColumn.skipValidation and ignoreInvalidMapping options of SourceMapGenerator are typed.SourceNode accepts nulls and chunk arrays in the constructor, nested arrays in add and prepend, and a RegExp or a replacer function in replaceRight.Return types that would need a breaking change, such as the nulls from originalPositionFor (#30), are documented in comments and left for the next major (#118).
Set engines.node to >=6.0.0 (#97)
The library already failed to load on older Node versions, so this only adds an install warning there.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fix CSP violation reported in browsers that don't permit unsafe-eval
Fix CSP violation reported in browsers that don't permit unsafe-eval (#85)
Reported by @Viktor-Ivliev in #81. The library no longer uses new Function at all. As a side effect, sorting mappings is ~40% faster on Node 22, 24 and 26: consuming source maps is up to 40% faster, and SourceMapConsumer.fromSourceMap 20–40% faster.
Fix denial of service from malicious indexed source maps ( CVE-2026-93749 )
Fix TS2306 “not a module” errors in type definitions ( #16 ) @andersk
Fix TS2306 “not a module” errors in type definitions (#16) @andersk
Ensure null source is respected (#26) @dragomirtitian
Improve ts declarations to be null-safe (#27) @dragomirtitian
Allow to pass options to SourceMapGenerator using SourceMapGenerator.fromSourceMap as second argument
Add ignoreInvalidMapping option to SourceMapGenerator . If enabled, source-map-js will not throw an error on the incorrect previous source map. Instea
Add ignoreInvalidMapping option to SourceMapGenerator. If enabled, source-map-js will not throw an error on the incorrect previous source map. Instead, it will print warnings and ignore broken mappings.
var generator = new sourceMap.SourceMapGenerator({
file: "my-generated-javascript-file.js",
sourceRoot: "http://example.com/app/js/",
ignoreInvalidMapping: true,
});Use sourceContents when non-null, even if it's an empty string ( #17 ) @bshepherdson
Add types for path imports ( #13 ) @TrySound
Remove cleanComments optimization ( #10 ) @ai
Bundled files like source-map-js/dist/* doesn't exist anymore. Use source-map-js/lib/* .
Nothing published for this version
One column per quarter.