Skip to content

Commit 73a97d4

Browse files
legendecasaduh95
authored andcommitted
doc,lib: update source map links to ECMA426
PR-URL: #58597 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 1ca253c commit 73a97d4

File tree

6 files changed

+21
-16
lines changed

6 files changed

+21
-16
lines changed

doc/api/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ changes:
733733
description: This API is no longer experimental.
734734
-->
735735

736-
Enable [Source Map v3][Source Map] support for stack traces.
736+
Enable [Source Map][] support for stack traces.
737737

738738
When using a transpiler, such as TypeScript, stack traces thrown by an
739739
application reference the transpiled code, not the original source position.
@@ -3850,7 +3850,7 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
38503850
[REPL]: repl.md
38513851
[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
38523852
[ShadowRealm]: https://github.com/tc39/proposal-shadowrealm
3853-
[Source Map]: https://sourcemaps.info/spec.html
3853+
[Source Map]: https://tc39.es/ecma426/
38543854
[TypeScript type-stripping]: typescript.md#type-stripping
38553855
[V8 Inspector integration for Node.js]: debugger.md#v8-inspector-integration-for-nodejs
38563856
[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html

doc/api/module.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,7 @@ Running `node --import 'data:text/javascript,import { register } from "node:modu
17021702
or `node --import ./import-map-sync-hooks.js main.js`
17031703
should print `some module!`.
17041704
1705-
## Source map v3 support
1705+
## Source Map Support
17061706
17071707
<!-- YAML
17081708
added:
@@ -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
17191722
To 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
18131817
Creates 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

doc/api/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ This section was moved to
12561256
## Source map v3 support
12571257

12581258
This section was moved to
1259-
[Modules: `module` core module](module.md#source-map-v3-support).
1259+
[Modules: `module` core module](module.md#source-map-support).
12601260

12611261
<!-- Anchors to make sure old links find a target -->
12621262

doc/api/process.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4033,7 +4033,7 @@ added:
40334033
40344034
* `val` {boolean}
40354035
4036-
This function enables or disables the [Source Map v3][Source Map] support for
4036+
This function enables or disables the [Source Map][] support for
40374037
stack traces.
40384038
40394039
It provides same features as launching Node.js process with commandline options
@@ -4084,7 +4084,7 @@ added:
40844084
* {boolean}
40854085
40864086
The `process.sourceMapsEnabled` property returns whether the
4087-
[Source Map v3][Source Map] support for stack traces is enabled.
4087+
[Source Map][] support for stack traces is enabled.
40884088
40894089
## `process.stderr`
40904090
@@ -4523,7 +4523,7 @@ cases:
45234523
[Permission Model]: permissions.md#permission-model
45244524
[Readable]: stream.md#readable-streams
45254525
[Signal Events]: #signal-events
4526-
[Source Map]: https://sourcemaps.info/spec.html
4526+
[Source Map]: https://tc39.es/ecma426/
45274527
[Stream compatibility]: stream.md#compatibility-with-older-nodejs-versions
45284528
[TTY]: tty.md#tty
45294529
[Writable]: stream.md#writable-streams

lib/internal/source_map/source_map_cache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const {
1010
StringPrototypeSplit,
1111
} = primordials;
1212

13-
// See https://sourcemaps.info/spec.html for SourceMap V3 specification.
13+
// See https://tc39.es/ecma426/ for SourceMap V3 specification.
1414
const { Buffer } = require('buffer');
1515
let debug = require('internal/util/debuglog').debuglog('source_map', (fn) => {
1616
debug = fn;

test/parallel/test-source-map-enable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ function nextdir() {
273273
// Does not attempt to apply path resolution logic to absolute URLs
274274
// with schemes.
275275
// Refs: https://github.com/webpack/webpack/issues/9601
276-
// Refs: https://sourcemaps.info/spec.html#h.75yo6yoyk7x5
276+
// Refs: https://tc39.es/ecma426/#sec-sources
277277
{
278278
const output = spawnSync(process.execPath, [
279279
'--enable-source-maps',

0 commit comments

Comments
 (0)
close