- Removed: The browser version. Only Node.js is now supported.
- Improved: Three old, weird, tiny dependencies were inlined, which should decrease install size.
- Fixed: base64 encoded source maps now correctly decodes as utf-8. Previously,
non-ASCII characters could end up garbled. Thanks to ZHAO Jinxiang
(@xiaoxiangmoe)! (Note: This fix does not work in old evironments not
supporting both
TextDecoder
andUint8Array
.) - Improved: Reduced size of the npm package.
- Improved: Updated the version range of
atob
to disallow depending on2.0.3
which as a security vulnerability.
-
Fixed: URLs are now decoded before being passed to
read
in Node.js. This allows reading files with spaces, for example. -
Fixed: Missing or empty
sources
fields (such assources: []
) in source maps are now handled. Previously, such source maps would cause crashes or callbacks never bing called. Now, an empty result is produced:sourcesResolved: [], sourcesContent: []
- Improved: Errors now have a
sourceMapData
property that contain as much as possible of the intended result of the function up until the error occurred. - Changed:
resolveSources
andresolve
, as well as their*Sync
alternatives, no longer fail when one single source fails to be fetched. Instead, thesourcesContent
array in the result object will contain error objects for all failed sources, and strings otherwise. (Backwards-incompatible change.)
- Removed: The
ignoreSourceRoot
option ofresolveSources
. It has been replaced withsourceRoot: false
. (Backwards-incompatible change.) - Added: The
sourceRoot
option ofresolveSources
. It not only allows to ignore the source root, it also lets you replace it. - Added: The
parseMapToJSON
method. - Added: The
resolve
method now acceptsnull, mapUrl, ...
as arguments, in addition to the existing signature, which will readmapUrl
instead of looking for a sourceMappingURL in the code.
- Improved: Updated the source-map-url dependency to 0.3.0.
- Removed: Argument checking. It’s not worth it. (Possibly backwards-incompatible change.)
- Added: The
sourceRoot
property of source maps may now be ignored, which can be useful when resolving sources outside of the browser. - Added: It is now possible to resolve only the URLs of sources, without reading them.
- Changed: The result of
resolveSources
is now an object, not an array. The old result array is available in thesourcesContent
property. (Backwards-incompatible change.) - Changed:
sources
has been renamed tosourcesContent
in the result object ofresolve
. (Backwards-incompatible change.) - Added:
resolveSources
now also returns all sources fully resolved, in thesourcesResolved
property. - Added: The result object of
resolve
now contains thesourcesResolved
property fromresolveSources
.
- Fixed:
sourcesContent
was mis-typed assourceContents
, which meant that thesourcesContent
property of source maps never was used when resolving sources.
- Only documentation and meta-data changes.
- Improved: Source maps starting with
)]}'
are now parsed correctly. The spec allows source maps to start with that character sequence to prevent XSSI attacks.
-
Improved: Make sourceRoot resolving more sensible.
A source root such as
/scripts/subdir
is now treated as/scripts/subdir/
— that is, as a directory called “subdir”, not a file called “subdir”. Pointing to a file as source root does not makes sense.
- Initial release.