@@ -1702,7 +1702,7 @@ Running `node --import 'data:text/javascript,import { register } from "node:modu
17021702or ` node --import ./import-map-sync-hooks.js main.js`
17031703should print ` some module!` .
17041704
1705- ## Source map v3 support
1705+ ## Source Map Support
17061706
17071707<!-- YAML
17081708added:
@@ -1712,13 +1712,17 @@ added:
17121712
17131713> Stability: 1 - Experimental
17141714
1715- Helpers for interacting with the source map cache. This cache is
1716- populated when source map parsing is enabled and
1715+ Node.js supports TC39 ECMA-426 [Source Map][] format (it was called Source map
1716+ revision 3 format).
1717+
1718+ The APIs in this section are helpers for interacting with the source map
1719+ cache. This cache is populated when source map parsing is enabled and
17171720[source map include directives][] are found in a modules' footer.
17181721
17191722To enable source map parsing, Node.js must be run with the flag
17201723[` --enable-source-maps` ][], or with code coverage enabled by setting
1721- [` NODE_V8_COVERAGE=dir` ][].
1724+ [` NODE_V8_COVERAGE=dir` ][], or be enabled programmatically via
1725+ [` module.setSourceMapsSupport()` ][].
17221726
17231727` ` ` mjs
17241728// module.mjs
@@ -1812,7 +1816,7 @@ changes:
18121816
18131817Creates a new ` sourceMap` instance.
18141818
1815- ` payload` is an object with keys matching the [Source map v3 format][]:
1819+ ` payload` is an object with keys matching the [Source map format][]:
18161820
18171821* ` file` : {string}
18181822* ` version` : {number}
@@ -1903,8 +1907,8 @@ returned object contains the following keys:
19031907[Customization hooks]: #customization-hooks
19041908[ES Modules]: esm.md
19051909[Permission Model]: permissions.md#permission-model
1906- [Source Map]: https://sourcemaps.info/spec.html
1907- [Source map v3 format]: https://sourcemaps.info/spec.html#h.mofvlxcwqzej
1910+ [Source Map]: https://tc39.es/ecma426/
1911+ [Source map format]: https://tc39.es/ecma426/#sec-source-map-format
19081912[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
19091913[V8 code cache]: https://v8.dev/blog/code-caching-for-devs
19101914[` " exports" ` ]: packages.md#exports
@@ -1920,6 +1924,7 @@ returned object contains the following keys:
19201924[` module.enableCompileCache()` ]: #moduleenablecompilecachecachedir
19211925[` module.flushCompileCache()` ]: #moduleflushcompilecache
19221926[` module.getCompileCacheDir()` ]: #modulegetcompilecachedir
1927+ [` module.setSourceMapsSupport()` ]: #modulesetsourcemapssupportenabled-options
19231928[` module` ]: #the-module-object
19241929[` os.tmpdir()` ]: os.md#ostmpdir
19251930[` registerHooks` ]: #moduleregisterhooksoptions
@@ -1933,7 +1938,7 @@ returned object contains the following keys:
19331938[prefix-only modules]: modules.md#built-in-modules-with-mandatory-node-prefix
19341939[realm]: https://tc39.es/ecma262/#realm
19351940[resolve hook]: #resolvespecifier-context-nextresolve
1936- [source map include directives]: https://sourcemaps.info/spec.html#h.lmz475t4mvbx
1941+ [source map include directives]: https://tc39.es/ecma426/#sec-linking-generated-code
19371942[the documentation of ` Worker` ]: worker_threads.md#new-workerfilename-options
19381943[transferable objects]: worker_threads.md#portpostmessagevalue-transferlist
19391944[transform TypeScript features]: typescript.md#typescript-features
0 commit comments