+21
-16
lines changedFilter options
+21
-16
lines changed Original file line number Diff line number Diff line change
@@ -749,7 +749,7 @@ changes:
749
749
description: This API is no longer experimental.
750
750
-->
751
751
752
-
Enable [Source Map v3][Source Map] support for stack traces.
752
+
Enable [Source Map][] support for stack traces.
753
753
754
754
When using a transpiler, such as TypeScript, stack traces thrown by an
755
755
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
3887
3887
[REPL]: repl.md
3888
3888
[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
3889
3889
[ShadowRealm]: https://github.com/tc39/proposal-shadowrealm
3890
-
[Source Map]: https://sourcemaps.info/spec.html
3890
+
[Source Map]: https://tc39.es/ecma426/
3891
3891
[TypeScript type-stripping]: typescript.md#type-stripping
3892
3892
[V8 Inspector integration for Node.js]: debugger.md#v8-inspector-integration-for-nodejs
3893
3893
[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
Original file line number Diff line number Diff line change
@@ -1568,7 +1568,7 @@ Running `node --import 'data:text/javascript,import { register } from "node:modu
1568
1568
or `node --import ./import-map-sync-hooks.js main.js`
1569
1569
should print `some module!`.
1570
1570
1571
-
## Source map v3 support
1571
+
## Source Map Support
1572
1572
1573
1573
<!-- YAML
1574
1574
added:
@@ -1578,13 +1578,17 @@ added:
1578
1578
1579
1579
> Stability: 1 - Experimental
1580
1580
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
1583
1586
[source map include directives][] are found in a modules' footer.
1584
1587
1585
1588
To enable source map parsing, Node.js must be run with the flag
1586
1589
[`--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()`][].
1588
1592
1589
1593
```mjs
1590
1594
// module.mjs
@@ -1682,7 +1686,7 @@ changes:
1682
1686
1683
1687
Creates a new `sourceMap` instance.
1684
1688
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][]:
1686
1690
1687
1691
* `file`: {string}
1688
1692
* `version`: {number}
@@ -1773,8 +1777,8 @@ returned object contains the following keys:
1773
1777
[Customization hooks]: #customization-hooks
1774
1778
[ES Modules]: esm.md
1775
1779
[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
1778
1782
[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
1779
1783
[V8 code cache]: https://v8.dev/blog/code-caching-for-devs
1780
1784
[`"exports"`]: packages.md#exports
@@ -1790,6 +1794,7 @@ returned object contains the following keys:
1790
1794
[`module.enableCompileCache()`]: #moduleenablecompilecachecachedir
1791
1795
[`module.flushCompileCache()`]: #moduleflushcompilecache
1792
1796
[`module.getCompileCacheDir()`]: #modulegetcompilecachedir
1797
+
[`module.setSourceMapsSupport()`]: #modulesetsourcemapssupportenabled-options
1793
1798
[`module`]: #the-module-object
1794
1799
[`os.tmpdir()`]: os.md#ostmpdir
1795
1800
[`registerHooks`]: #moduleregisterhooksoptions
@@ -1802,7 +1807,7 @@ returned object contains the following keys:
1802
1807
[module wrapper]: modules.md#the-module-wrapper
1803
1808
[realm]: https://tc39.es/ecma262/#realm
1804
1809
[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
1806
1811
[the documentation of `Worker`]: worker_threads.md#new-workerfilename-options
1807
1812
[transferable objects]: worker_threads.md#portpostmessagevalue-transferlist
1808
1813
[transform TypeScript features]: typescript.md#typescript-features
Original file line number Diff line number Diff line change
@@ -1267,7 +1267,7 @@ This section was moved to
1267
1267
## Source map v3 support
1268
1268
1269
1269
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).
1271
1271
1272
1272
<!-- Anchors to make sure old links find a target -->
1273
1273
Original file line number Diff line number Diff line change
@@ -4069,7 +4069,7 @@ added:
4069
4069
4070
4070
* `val` {boolean}
4071
4071
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
4073
4073
stack traces.
4074
4074
4075
4075
It provides same features as launching Node.js process with commandline options
@@ -4120,7 +4120,7 @@ added:
4120
4120
* {boolean}
4121
4121
4122
4122
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.
4124
4124
4125
4125
## `process.stderr`
4126
4126
@@ -4580,7 +4580,7 @@ cases:
4580
4580
[Permission Model]: permissions.md#permission-model
4581
4581
[Readable]: stream.md#readable-streams
4582
4582
[Signal Events]: #signal-events
4583
-
[Source Map]: https://sourcemaps.info/spec.html
4583
+
[Source Map]: https://tc39.es/ecma426/
4584
4584
[Stream compatibility]: stream.md#compatibility-with-older-nodejs-versions
4585
4585
[TTY]: tty.md#tty
4586
4586
[Writable]: stream.md#writable-streams
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ const {
10
10
StringPrototypeSplit,
11
11
} = primordials;
12
12
13
-
// See https://sourcemaps.info/spec.html for SourceMap V3 specification.
13
+
// See https://tc39.es/ecma426/ for SourceMap V3 specification.
14
14
const { Buffer } = require('buffer');
15
15
let debug = require('internal/util/debuglog').debuglog('source_map', (fn) => {
16
16
debug = fn;
Original file line number Diff line number Diff line change
@@ -273,7 +273,7 @@ function nextdir() {
273
273
// Does not attempt to apply path resolution logic to absolute URLs
274
274
// with schemes.
275
275
// 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
277
277
{
278
278
const output = spawnSync(process.execPath, [
279
279
'--enable-source-maps',
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4