Open
Description
Here is a changelog of improvements we have made relative to source-map-support
If you're here for the first time, you can npm install @cspotcode/source-map-support
and require('@cspotcode/source-map-support').install()
as a drop-in replacement for npm install source-map-support
This encompasses improvements in @cspotcode/source-map
and @cspotcode/source-map-consumer
since they were created for, and are primarily consumed by, this library.
0.8.1
- Fix bug where errors without a message would still have a trailing colon in the first line of their stack, e.g.
Error:
instead ofError
fix bug where errors without a message would still have colon in "Error: " #39
0.8
See #38 for all code changes
Changes
- Switch sourcemap consumer to @jridgewell/trace-mapping
- drops WASM requirement
- library is externally maintained
- Normalize cache keys to share single cache entry for both URIs and native paths
Fixes
- Correctly render WASM stack frames
- Fixed bug where file:/// URLs in stack traces were not consistently percent-encoded
- ensure formatting of module paths within stack frames code snippets is consistent with vanilla node
- stack frame/snippet from nodejs may be native path or file URI
- CJS uses native paths
- ESM uses file URIs
- mapped frame should match: either native path or file URI
- Note: On windows, this means backslashes, starts with drive letter, no file:// prefix
- stack frame/snippet from nodejs may be native path or file URI
Other
- Add node 17 and 18 to test matrix
- Add tests for async, Promise.all, Promise.any stack frames
- Add tests for different path styles in sourcemaps: URIs, native paths, absolute and relative
0.7
Adds
- Adds
uninstall()
method to safely remove all hooks from the environment - Supports multiple instances of this library by sharing state via a global singleton
- Even if package manager creates multiple copies of this library in the dependency tree, they will cooperate and share installed hooks, cache, etc
- Support multiple instances of source-map-support #28
- redirects
require("source-map-support")
torequire("@cspotcode/source-map-support")
- Optionally notifies consuming code via callback so it can choose to log warnings to users
- Consuming code can opt-out of this behavior via option
- necessary because
source-map-support
does not implement Support multiple instances of source-map-support #28 - refactor: redirect subsequent imports of "source-map-support" to this… #23, Amendment to #23: redirect subsequent imports of "source-map-support" to this package #30 @ejose19
- Add
@cspotcode/source-map-support/register-hook-require
entrypoint- Same as
@cspotcode/source-map-support/register
but withhookRequire
enabled - Add @cspotcode/source-map-support/register-hook-require #25
- Same as
0.6
includes 0.6.0 and 0.6.1
Adds
- bundles TypeScript types; no need for
@types/
- colorized output matching node
Fixes
- formatting of async stack frames
- Fixes broken
NodeError
formatting; will no longer strip codes fromNodeError
process.on('exit')
listeners should run before fatal error is logged
Performance
- use newer
source-map
dependency with WASM components for improved performance, maybe smaller install size? (haven't actually checked install size) - Removes browser bundle for smaller package size
- Removes buffer-from dependency for smaller install size
Removed
- Support for EOLed node versions. We test against and support node 12, 14, and 16
- Removes browser bundle for smaller package size
Other
- Runs tests on CI
Metadata
Metadata
Assignees
Labels
No labels