Description
This thread documents some of the known limitations of the recently released Source Map V3 support in Node.js.
I would greatly appreciate help testing and improving this feature, and this is a great opportunity to land some commits in Node.js.
If you begin work on a specific task, create a corresponding issue and reference this thread.
Feature Work
- source-maps are not applied to GetErrorSource, this is the logic that Node.js uses to place a
^
pointing to the source location where an exception occurred. (@bcoe might be able to help). - source-maps are not applied when running in repl (talk to @devsnek and @bcoe about this work).
- develop public API for fetching and manipulating source-maps (it would be good to engage folks like @SimenB, and @boneskull, about the current needs of tools like Mocha and Jest).
- a source-map is not serialized to disk if an exception occurs while loading (this issue is deceptively difficult, and will require some refactoring related to how we serialize the cache, talk to @bcoe); see: module: refactor to use iterable-weak-map #35915 for solution.
Bug Fixes
-
partial source-map/coverage is written to disk when running Node's test suite (
make -j4 coverage-run-js
, results in warningSyntaxError: Unexpected end of JSON input
) (potentially talk to @joyeecheung about this issue). -
missing branch coverage displayed for covered catch statements (the fix for this is most likely in v8, and similar to this, @schuay would be a good person to talk to about this).
Refactoring
- the caching of ESM and CJS is currently different code paths, it would be nice to figure out a way to consolidate them (can we find out a way to use a
WeakMap
for both, and still serialize to disk?).
CC: @iansu, @azasypkin
Related: related Node tooling conversation.
Activity