| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -733,7 +733,7 @@ changes: | |||
| 733 | 733 | description: This API is no longer experimental. | |
| 734 | 734 | --> | |
| 735 | 735 | ||
| 736 | - Enable [Source Map v3][Source Map] support for stack traces. | ||
| 736 | + Enable [Source Map][] support for stack traces. | ||
| 737 | 737 | ||
| 738 | 738 | When using a transpiler, such as TypeScript, stack traces thrown by an | |
| 739 | 739 | 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 | |||
| 3850 | 3850 | [REPL]: repl.md | |
| 3851 | 3851 | [ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage | |
| 3852 | 3852 | [ShadowRealm]: https://github.com/tc39/proposal-shadowrealm | |
| 3853 | - [Source Map]: https://sourcemaps.info/spec.html | ||
| 3853 | + [Source Map]: https://tc39.es/ecma426/ | ||
| 3854 | 3854 | [TypeScript type-stripping]: typescript.md#type-stripping | |
| 3855 | 3855 | [V8 Inspector integration for Node.js]: debugger.md#v8-inspector-integration-for-nodejs | |
| 3856 | 3856 | [V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1702,7 +1702,7 @@ Running `node --import 'data:text/javascript,import { register } from "node:modu | |||
| 1702 | 1702 | or `node --import ./import-map-sync-hooks.js main.js` | |
| 1703 | 1703 | should print `some module!`. | |
| 1704 | 1704 | ||
| 1705 | - ## Source map v3 support | ||
| 1705 | + ## Source Map Support | ||
| 1706 | 1706 | ||
| 1707 | 1707 | <!-- YAML | |
| 1708 | 1708 | added: | |
@@ -1712,13 +1712,17 @@ added: | |||
| 1712 | 1712 | ||
| 1713 | 1713 | > Stability: 1 - Experimental | |
| 1714 | 1714 | ||
| 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 | ||
| 1717 | 1720 | [source map include directives][] are found in a modules' footer. | |
| 1718 | 1721 | ||
| 1719 | 1722 | To enable source map parsing, Node.js must be run with the flag | |
| 1720 | 1723 | [`--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()`][]. | ||
| 1722 | 1726 | ||
| 1723 | 1727 | ```mjs | |
| 1724 | 1728 | // module.mjs | |
@@ -1812,7 +1816,7 @@ changes: | |||
| 1812 | 1816 | ||
| 1813 | 1817 | Creates a new `sourceMap` instance. | |
| 1814 | 1818 | ||
| 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][]: | ||
| 1816 | 1820 | ||
| 1817 | 1821 | * `file`: {string} | |
| 1818 | 1822 | * `version`: {number} | |
@@ -1903,8 +1907,8 @@ returned object contains the following keys: | |||
| 1903 | 1907 | [Customization hooks]: #customization-hooks | |
| 1904 | 1908 | [ES Modules]: esm.md | |
| 1905 | 1909 | [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 | ||
| 1908 | 1912 | [V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html | |
| 1909 | 1913 | [V8 code cache]: https://v8.dev/blog/code-caching-for-devs | |
| 1910 | 1914 | [`"exports"`]: packages.md#exports | |
@@ -1920,6 +1924,7 @@ returned object contains the following keys: | |||
| 1920 | 1924 | [`module.enableCompileCache()`]: #moduleenablecompilecachecachedir | |
| 1921 | 1925 | [`module.flushCompileCache()`]: #moduleflushcompilecache | |
| 1922 | 1926 | [`module.getCompileCacheDir()`]: #modulegetcompilecachedir | |
| 1927 | + [`module.setSourceMapsSupport()`]: #modulesetsourcemapssupportenabled-options | ||
| 1923 | 1928 | [`module`]: #the-module-object | |
| 1924 | 1929 | [`os.tmpdir()`]: os.md#ostmpdir | |
| 1925 | 1930 | [`registerHooks`]: #moduleregisterhooksoptions | |
@@ -1933,7 +1938,7 @@ returned object contains the following keys: | |||
| 1933 | 1938 | [prefix-only modules]: modules.md#built-in-modules-with-mandatory-node-prefix | |
| 1934 | 1939 | [realm]: https://tc39.es/ecma262/#realm | |
| 1935 | 1940 | [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 | ||
| 1937 | 1942 | [the documentation of `Worker`]: worker_threads.md#new-workerfilename-options | |
| 1938 | 1943 | [transferable objects]: worker_threads.md#portpostmessagevalue-transferlist | |
| 1939 | 1944 | [transform TypeScript features]: typescript.md#typescript-features | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1256,7 +1256,7 @@ This section was moved to | |||
| 1256 | 1256 | ## Source map v3 support | |
| 1257 | 1257 | ||
| 1258 | 1258 | 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). | ||
| 1260 | 1260 | ||
| 1261 | 1261 | <!-- Anchors to make sure old links find a target --> | |
| 1262 | 1262 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4033,7 +4033,7 @@ added: | |||
| 4033 | 4033 | ||
| 4034 | 4034 | * `val` {boolean} | |
| 4035 | 4035 | ||
| 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 | ||
| 4037 | 4037 | stack traces. | |
| 4038 | 4038 | ||
| 4039 | 4039 | It provides same features as launching Node.js process with commandline options | |
@@ -4084,7 +4084,7 @@ added: | |||
| 4084 | 4084 | * {boolean} | |
| 4085 | 4085 | ||
| 4086 | 4086 | 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. | ||
| 4088 | 4088 | ||
| 4089 | 4089 | ## `process.stderr` | |
| 4090 | 4090 | ||
@@ -4523,7 +4523,7 @@ cases: | |||
| 4523 | 4523 | [Permission Model]: permissions.md#permission-model | |
| 4524 | 4524 | [Readable]: stream.md#readable-streams | |
| 4525 | 4525 | [Signal Events]: #signal-events | |
| 4526 | - [Source Map]: https://sourcemaps.info/spec.html | ||
| 4526 | + [Source Map]: https://tc39.es/ecma426/ | ||
| 4527 | 4527 | [Stream compatibility]: stream.md#compatibility-with-older-nodejs-versions | |
| 4528 | 4528 | [TTY]: tty.md#tty | |
| 4529 | 4529 | [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', | |
| Back | FazBrowse Home | New Git URL |
0 commit comments