NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #25 most downloaded on npm
Generates and consumes source maps
Last release 2 months ago
20 Jul 2026
Ships unpredictably
gaps range from 9 days to 3.6 years
Nearly every release is documented
notes for 56 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
15 years old
71 releases · first in 2011
[#528] https://github.com/mozilla/source-map/pull/528 Adding security policy
### Breaking changes - #350 - Change browser detection logic for WASM loading. - #363 - Change WASM loading detection to rely on package.json#browser
package.json#browser field.dist/ bundle.mappings.wasm file as an ArrayBuffer.IndexedSourceMapConsumer implementation to pass more through
to BasicSourceMapConsumer.SourceMapConsumer.with implementation.One column per quarter.
Full Changelog : 0.7.5...0.7.6
Full Changelog: 0.7.5...0.7.6
publishConfig property in package.json (801be934007c3ed0ef66c620641b1668e92c891d)Pass through the implementation of more index map operations. by @loganfsmyth in #364
addMapping(): ensure that originalLine and originalColumn are null when original argument was undefined/null by @GerHobbelt in #395prettier task for standardized code formatting => easier cross-branch/fork code comparison and merging by @GerHobbelt in #397Full Changelog: v0.7.4...0.7.5
addMapping(): ensure that originalLine and originalColumn are null when original argument was undefined/nullprettier task for standardized code formatting => easier cross-branch/fork code comparison and merging- #341 - Make async change. Fixes mozilla#337. - #339 - Add option to initialize mappings wasm via ArrayBuffer - #347 - Add expected arguments to asse
npm testFix a bug where nested uses of SourceMapConsumer could result in a TypeError. #338 #330 #319
Another 3x speed up in SourceMapConsumer. Read about it here: http://fitzgeraldnick.com/2018/02/26/speed-without-wizardry.html
SourceMapConsumer. Read about it here:
http://fitzgeraldnick.com/2018/02/26/speed-without-wizardry.htmlUpdated TypeScript typings. [#321][]
Breaking change: new SourceMapConsumer now returns a Promise object that resolves to the newly constructed SourceMapConsumer instance, rather than ret…
SourceMapConsumer now uses WebAssembly, and is much faster! Read about
it here:
https://hacks.mozilla.org/2018/01/oxidizing-source-maps-with-rust-and-webassembly/
Breaking change: new SourceMapConsumer now returns a Promise object
that resolves to the newly constructed SourceMapConsumer instance, rather
than returning the new instance immediately.
Breaking change: when you're done using a SourceMapConsumer instance,
you must call SourceMapConsumer.prototype.destroy on it. After calling
destroy, you must not use the instance again.
Breaking change: SourceMapConsumer used to be able to handle lines,
columns numbers and source and name indices up to 2^53 - 1 (aka
Number.MAX_SAFE_INTEGER). It can now only handle them up to 2^32 - 1.
Breaking change: The source-map library now uses modern ECMAScript-isms:
let, arrow functions, async, etc. Use Babel to compile it down to
ECMAScript 5 if you need to support older JavaScript environments.
Breaking change: Drop support for Node < 8. If you want to support older versions of node, please use v0.6 or below.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix for regression when people were using numbers as names in source maps. See
Fix "regression" of unsupported, implementation behavior that half the world happens to have come to depend on. See #235.
Fix "regression" of unsupported, implementation behavior that half the world happens to have come to depend on. See #235.
Fix regression involving function hoisting in SpiderMonkey. See #233.
Large performance improvements to source-map serialization. See #228 and #229.
Do not include unnecessary distribution files. See commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86.
Include browser distributions of the library in package.json's files. See issue #212.
files. See
issue #212.Fix latent bugs in IndexedSourceMapConsumer.prototype.\_parseMappings. See ff05274becc9e6e1295ed60f3ea090d31d843379.
Node 0.8 is no longer supported.
Node 0.8 is no longer supported.
Use webpack instead of dryice for bundling.
Big speedups serializing source maps. See pull request #203.
Fix a bug with SourceMapConsumer.prototype.sourceContentFor and sources that
explicitly start with the source root. See issue #199.
Fix an issue where using a SourceMapGenerator after having created a SourceMapConsumer from it via SourceMapConsumer.fromSourceMap failed. See issue #
Fix an issue where using a SourceMapGenerator after having created a
SourceMapConsumer from it via SourceMapConsumer.fromSourceMap failed. See
issue #191.
Fix an issue with where SourceMapGenerator would mistakenly consider
different mappings as duplicates of each other and avoid generating them. See
issue #192.
A very large number of performance improvements, particularly when parsing source maps. Collectively about 75% of time shaved off of the source map pa
A very large number of performance improvements, particularly when parsing source maps. Collectively about 75% of time shaved off of the source map parsing benchmark!
Fix a bug in SourceMapConsumer.prototype.allGeneratedPositionsFor and fuzzy
searching in the presence of a column option. See issue #177.
Fix a bug with joining a source and its source root when the source is above the root. See issue #182.
Add the SourceMapConsumer.prototype.hasContentsOfAllSources method to
determine when all sources' contents are inlined into the source map. See
issue #190.
Add an .npmignore file so that the benchmarks aren't pulled down by dependent projects. Issue #169.
Add an .npmignore file so that the benchmarks aren't pulled down by
dependent projects. Issue #169.
Add an optional column argument to
SourceMapConsumer.prototype.allGeneratedPositionsFor and better handle lines
with no mappings. Issues #172 and #173.
Fix accidentally defining a global variable. #170.
The default direction for fuzzy searching was changed back to its original direction. See #164.
The default direction for fuzzy searching was changed back to its original direction. See #164.
There is now a bias option you can supply to SourceMapConsumer to control
the fuzzy searching direction. See #167.
About an 8% speed up in parsing source maps. See #159.
Added a benchmark for parsing and generating source maps.
Change the default direction that searching for positions fuzzes when there is not an exact match. See #154.
Change the default direction that searching for positions fuzzes when there is not an exact match. See #154.
Support for environments using json2.js for JSON serialization. See #156.
See pull request #127. This introduces a minor backwards incompatibility if you are monkey patching SourceMapConsumer.prototype methods.
SourceMapConsumer.prototype
methods.Performance improvements for SourceMapGenerator and SourceNode. See issue
SourceMapGenerator and SourceNode. See issue
#148 for some discussion and issues #150, #151, and #152 for implementations.Fix an issue where SourceNodes from different versions of the source-map library couldn't be used in conjunction with each other. See issue #142.
SourceNodes from different versions of the source-map
library couldn't be used in conjunction with each other. See issue #142.Fix a bug with getting the source content of relative sources with a "./" prefix. See issue #145 and Bug 1090768.
Fix a bug with getting the source content of relative sources with a "./" prefix. See issue #145 and Bug 1090768.
Add the SourceMapConsumer.prototype.computeColumnSpans method to compute the
column span of each mapping.
Add the SourceMapConsumer.prototype.allGeneratedPositionsFor method to find
all generated positions associated with a given original source and line.
Performance improvements for parsing source maps in SourceMapConsumer.
Fix a bug where setting a source's contents to null before any source content had been set before threw a TypeError. See issue #131.
Fix a bug where finding relative paths from an empty path were creating absolute paths. See issue #129.
Fix a bug where if the source root was an empty string, relative source paths would turn into absolute source paths. Issue #124.
Allow the names mapping property to be an empty string. Issue #121.
names mapping property to be an empty string. Issue #121.A third optional parameter was added to SourceNode.fromStringWithSourceMap to specify a path that relative sources in the second parameter should be r
A third optional parameter was added to SourceNode.fromStringWithSourceMap
to specify a path that relative sources in the second parameter should be
relative to. Issue #105.
If no file property is given to a SourceMapGenerator, then the resulting
source map will no longer have a null file property. The property will
simply not exist. Issue #104.
Fixed a bug where consecutive newlines were ignored in SourceNodes.
Issue #116.
Make SourceNode work with windows style ("\r\n") newlines. Issue #103.
Make SourceNode work with windows style ("\r\n") newlines. Issue #103.
Fix bug involving source contents and the
SourceMapGenerator.prototype.applySourceMap. Issue #100.
Fix some edge cases surrounding path joining and URL resolution.
Fix some edge cases surrounding path joining and URL resolution.
Add a third parameter for relative path to
SourceMapGenerator.prototype.applySourceMap.
Fix issues with mappings and EOLs.
Fixed a bug where SourceMapConsumer couldn't handle negative relative columns (issue 92).
Fixed a bug where SourceMapConsumer couldn't handle negative relative columns (issue 92).
Fixed test runner to actually report number of failed tests as its process exit code.
Fixed a typo when reporting bad mappings (issue 87).
Delay parsing the mappings in SourceMapConsumer until queried for a source location.
Delay parsing the mappings in SourceMapConsumer until queried for a source location.
Support Sass source maps (which at the time of writing deviate from the spec in small ways) in SourceMapConsumer.
Do not join source root with a source, when the source is a data URI.
Do not join source root with a source, when the source is a data URI.
Extend the test runner to allow running single specific test files at a time.
Performance improvements in SourceNode.prototype.walk and
SourceMapConsumer.prototype.eachMapping.
Source map browser builds will now work inside Workers.
Better error messages when attempting to add an invalid mapping to a
SourceMapGenerator.
Allow duplicate entries in the names and sources arrays of source maps (usually from TypeScript) we are parsing. Fixes github issue 72.
names and sources arrays of source maps
(usually from TypeScript) we are parsing. Fixes github issue 72.Skip duplicate mappings when creating source maps from SourceNode; github issue 75.
Don't throw an error when the file property is missing in SourceMapConsumer, we don't use it anyway.
file property is missing in SourceMapConsumer,
we don't use it anyway.Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70.
Make compatible with browserify
Fix issue with absolute paths and file:// URIs. See https://bugzilla.mozilla.org/show_bug.cgi?id=885597
file:// URIs. See
https://bugzilla.mozilla.org/show_bug.cgi?id=885597Fix issue with absolute paths and sourcesContent, github issue 64.
Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21.
Fixed handling of sources that start with a slash so that they are relative to the source root's host.
Fixed github issue #43: absolute URLs aren't joined with the source root anymore.
- Using Travis CI to run tests.
Fixed a bug in the handling of sourceRoot.
Added SourceNode.fromStringWithSourceMap.
Fixed the generating of empty mappings in SourceNode.
Added missing documentation.
Fixed the generating of empty mappings in SourceNode.
Added SourceMapGenerator.applySourceMap.
The sourceRoot is now handled consistently.
Added SourceMapGenerator.fromSourceMap.
SourceNode now generates empty mappings too.
Added name support to SourceNode.
Added sourcesContent support to the customer and generator.
Your coding agent can read these notes before it upgrades. Set up the MCP server →