Skip to content

Commit d2f6c82

Browse files
legendecasaduh95
authored andcommitted
doc,lib: update source map links to ECMA426
PR-URL: #58597 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 984894b commit d2f6c82

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
@@ -749,7 +749,7 @@ changes:
749749
description: This API is no longer experimental.
750750
-->
751751

752-
Enable [Source Map v3][Source Map] support for stack traces.
752+
Enable [Source Map][] support for stack traces.
753753

754754
When using a transpiler, such as TypeScript, stack traces thrown by an
755755
application reference the transpiled code, not the original source position.
@@ -3887,7 +3887,7 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
38873887
[REPL]: repl.md
38883888
[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
38893889
[ShadowRealm]: https://github.com/tc39/proposal-shadowrealm
3890-
[Source Map]: https://sourcemaps.info/spec.html
3890+
[Source Map]: https://tc39.es/ecma426/
38913891
[TypeScript type-stripping]: typescript.md#type-stripping
38923892
[V8 Inspector integration for Node.js]: debugger.md#v8-inspector-integration-for-nodejs
38933893
[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
@@ -1568,7 +1568,7 @@ Running `node --import 'data:text/javascript,import { register } from "node:modu
15681568
or `node --import ./import-map-sync-hooks.js main.js`
15691569
should print `some module!`.
15701570
1571-
## Source map v3 support
1571+
## Source Map Support
15721572
15731573
<!-- YAML
15741574
added:
@@ -1578,13 +1578,17 @@ added:
15781578
15791579
> Stability: 1 - Experimental
15801580
1581-
Helpers for interacting with the source map cache. This cache is
1582-
populated when source map parsing is enabled and
1581+
Node.js supports TC39 ECMA-426 [Source Map][] format (it was called Source map
1582+
revision 3 format).
1583+
1584+
The APIs in this section are helpers for interacting with the source map
1585+
cache. This cache is populated when source map parsing is enabled and
15831586
[source map include directives][] are found in a modules' footer.
15841587
15851588
To enable source map parsing, Node.js must be run with the flag
15861589
[`--enable-source-maps`][], or with code coverage enabled by setting
1587-
[`NODE_V8_COVERAGE=dir`][].
1590+
[`NODE_V8_COVERAGE=dir`][], or be enabled programmatically via
1591+
[`module.setSourceMapsSupport()`][].
15881592
15891593
```mjs
15901594
// module.mjs
@@ -1682,7 +1686,7 @@ changes:
16821686
16831687
Creates a new `sourceMap` instance.
16841688
1685-
`payload` is an object with keys matching the [Source map v3 format][]:
1689+
`payload` is an object with keys matching the [Source map format][]:
16861690
16871691
* `file`: {string}
16881692
* `version`: {number}
@@ -1773,8 +1777,8 @@ returned object contains the following keys:
17731777
[Customization hooks]: #customization-hooks
17741778
[ES Modules]: esm.md
17751779
[Permission Model]: permissions.md#permission-model
1776-
[Source Map]: https://sourcemaps.info/spec.html
1777-
[Source map v3 format]: https://sourcemaps.info/spec.html#h.mofvlxcwqzej
1780+
[Source Map]: https://tc39.es/ecma426/
1781+
[Source map format]: https://tc39.es/ecma426/#sec-source-map-format
17781782
[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
17791783
[V8 code cache]: https://v8.dev/blog/code-caching-for-devs
17801784
[`"exports"`]: packages.md#exports
@@ -1790,6 +1794,7 @@ returned object contains the following keys:
17901794
[`module.enableCompileCache()`]: #moduleenablecompilecachecachedir
17911795
[`module.flushCompileCache()`]: #moduleflushcompilecache
17921796
[`module.getCompileCacheDir()`]: #modulegetcompilecachedir
1797+
[`module.setSourceMapsSupport()`]: #modulesetsourcemapssupportenabled-options
17931798
[`module`]: #the-module-object
17941799
[`os.tmpdir()`]: os.md#ostmpdir
17951800
[`registerHooks`]: #moduleregisterhooksoptions
@@ -1802,7 +1807,7 @@ returned object contains the following keys:
18021807
[module wrapper]: modules.md#the-module-wrapper
18031808
[realm]: https://tc39.es/ecma262/#realm
18041809
[resolve hook]: #resolvespecifier-context-nextresolve
1805-
[source map include directives]: https://sourcemaps.info/spec.html#h.lmz475t4mvbx
1810+
[source map include directives]: https://tc39.es/ecma426/#sec-linking-generated-code
18061811
[the documentation of `Worker`]: worker_threads.md#new-workerfilename-options
18071812
[transferable objects]: worker_threads.md#portpostmessagevalue-transferlist
18081813
[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
@@ -1267,7 +1267,7 @@ This section was moved to
12671267
## Source map v3 support
12681268

12691269
This section was moved to
1270-
[Modules: `module` core module](module.md#source-map-v3-support).
1270+
[Modules: `module` core module](module.md#source-map-support).
12711271

12721272
<!-- Anchors to make sure old links find a target -->
12731273

doc/api/process.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4069,7 +4069,7 @@ added:
40694069
40704070
* `val` {boolean}
40714071
4072-
This function enables or disables the [Source Map v3][Source Map] support for
4072+
This function enables or disables the [Source Map][] support for
40734073
stack traces.
40744074
40754075
It provides same features as launching Node.js process with commandline options
@@ -4120,7 +4120,7 @@ added:
41204120
* {boolean}
41214121
41224122
The `process.sourceMapsEnabled` property returns whether the
4123-
[Source Map v3][Source Map] support for stack traces is enabled.
4123+
[Source Map][] support for stack traces is enabled.
41244124
41254125
## `process.stderr`
41264126
@@ -4580,7 +4580,7 @@ cases:
45804580
[Permission Model]: permissions.md#permission-model
45814581
[Readable]: stream.md#readable-streams
45824582
[Signal Events]: #signal-events
4583-
[Source Map]: https://sourcemaps.info/spec.html
4583+
[Source Map]: https://tc39.es/ecma426/
45844584
[Stream compatibility]: stream.md#compatibility-with-older-nodejs-versions
45854585
[TTY]: tty.md#tty
45864586
[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)