Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
3b26809
doc: use sentence-case for headings in docs
Trott Jun 14, 2020
e0206ba
util: restrict custom inspect function + vm.Context interaction
addaleax Jun 1, 2020
b8a17cc
doc: document n-api callback scope usage
Jun 16, 2020
2ca6a45
doc: mention errors thrown by methods called on an unbound dgram.Socket
mkrawczuk Jun 19, 2020
eb04ba3
doc: add dynamic source code links
aw-davidson Jun 22, 2020
70c4045
vm: add run-after-evaluate microtask mode
addaleax Jun 22, 2020
556e55d
doc: clarify require/import mutual exclusivity
guybedford Jun 10, 2020
585f3a5
doc: improve paragraph in esm.md
Trott Jun 26, 2020
4927fed
doc: make minor improvements to paragraph in child_process.md
Trott Jun 26, 2020
105d560
zlib: remove redundant variable in zlibBufferOnEnd
puzpuzpuz Jun 26, 2020
6be685a
wasi: add reactor support
devsnek Jun 25, 2020
46d183c
test: update test-child-process-spawn-loop for Python 3
richardlau Jun 26, 2020
41c80f6
stream: destroy wrapped streams on error
ronag Jun 28, 2020
b7e9b43
net: fix bufferSize
ronag Jun 27, 2020
0e1361c
net: doc deprecate bufferSize
ronag Jun 28, 2020
4dc89c6
meta: fixup CODEOWNERS so it hopefully works
jasnell Jul 1, 2020
05a69e2
doc: clarify ambiguous rdev description
Trott Jun 28, 2020
ee6ccef
doc: clarify O_EXCL text in fs.md
Trott Jun 28, 2020
64bd518
doc: clarify that APIs are no longer experimental
Trott Jun 29, 2020
9d30f05
doc: change "currently not considered public" to "not supported"
Trott Jun 29, 2020
fbcd1fa
tls: remove unnecessary close listener
ronag Jun 28, 2020
49d2d49
doc: improve text in issues.md
falguniraina Jun 19, 2020
da5fde6
doc: changed "considered experimental" to "experimental" in cli.md
Trott Jun 30, 2020
78a4d97
doc: change "considered experimental" to "experimental" in n-api.md
Trott Jun 30, 2020
26ecdf8
doc: move sam-github to TSC Emeriti
sam-github Jun 28, 2020
af9e6f6
doc: add http highlight grammar
DerekNonGeneric Jun 7, 2020
e33c09c
doc: simplify and clarify ReferenceError material in errors.md
Trott Jul 1, 2020
7fc56eb
doc: remove "considered" in errors.md
Trott Jul 1, 2020
f5691fa
test: report actual error code on failure
richardlau Jun 30, 2020
cfd4c80
crypto: move typechecking for timingSafeEqual into C++
addaleax Jun 30, 2020
bddc99e
test: skip some IBM i unsupported test cases
dmabupt Jun 29, 2020
22c1fbf
doc: simply dns.ADDRCONFIG language
Trott Jul 1, 2020
9f0bf5c
doc: improve triaging text in issues.md
Trott Jul 2, 2020
ab6b786
doc: add streams to the pipeline function signature
rickyes Jul 1, 2020
e273edf
doc: Add maxTotalSockets option to agent constructor
rickyes Jun 22, 2020
e386188
doc: clarify esm conditional exports prose
DerekNonGeneric Jun 14, 2020
e378b68
src: remove unused fields from IsolateData
addaleax Jun 30, 2020
146538d
doc: improve async_hooks asynchronous context example
lundibundi Jun 4, 2020
167a21a
doc: fix source link margin to sub-header mark
rodion-arr May 30, 2020
e818455
doc: fix entry for `napi_create_external_buffer`
Jun 29, 2020
a0cfa62
doc: clarify how to read process.stdin
anentropic Apr 22, 2019
5ae2b74
doc: use consistent naming in stream doc
Nov 16, 2019
25d310b
doc: no longer maintain a CNA structure
sam-github May 29, 2020
1558800
doc: add a reference to the list of OpenSSL flags.
mkrawczuk Jun 25, 2020
6aa0dac
doc: clarify that the ctx argument is optional
lpinca Jun 28, 2020
aaba1c0
doc: update wording in "Two reading modes"
julienp Jun 29, 2020
440642d
tools: remove lint-js.js
Trott Dec 13, 2019
8dd8b1a
doc: util.debuglog callback
bmeck Jun 12, 2020
de58eb6
meta: add N-API to codeowners coverage
mhdawson Jun 24, 2020
a2dd258
doc: remove stability from unreleased errors
Trott Jun 6, 2020
326b854
doc: remove parenthetical \r\n comment in http and http2 docs
Trott Jul 2, 2020
938de33
doc: specify how fs.WriteStream/ReadStreams are created
jasnell Jul 3, 2020
39d6ecd
doc: move gibfahn to emeritus
Trott Jul 4, 2020
59bb6d6
doc: move digitalinfinity to emeritus
Trott Jul 4, 2020
c83d986
doc: move ERR_FEATURE_UNAVAILABLE_ON_PLATFORM to current errors
Trott Jul 4, 2020
8f7ed40
src: fix unused namespace member
Jul 5, 2020
ed0f569
src: fix minor comment typo in KeyObjectData
danbev Jul 2, 2020
b20e6ed
repl: fix verb conjugation in deprecation message
Trott Jul 4, 2020
09faebd
test: replace deprecated function call from test-repl-history-navigation
Trott Jul 4, 2020
2e20cd4
doc: remove errors that were never released
Trott Jul 4, 2020
abfab98
doc: replace http to https of link urls
sapics Jun 29, 2020
daf2abf
lib: replace http to https of comment link urls
sapics Jun 29, 2020
3e3d908
src: add encoding_type variable in WritePrivateKey
danbev Jul 3, 2020
280cd96
domain: fix unintentional deprecation warning
addaleax Jul 7, 2020
9c98af7
src: exit explicitly after printing V8 help
addaleax Jun 30, 2020
a38219f
test: add regression test for C++-created Buffer transfer
addaleax Jun 30, 2020
0f9bafd
test: skip an ipv6 test on IBM i
dmabupt Jul 5, 2020
38b3c2a
test: add arrayOfStreams to pipeline
rickyes Jul 1, 2020
ec9b49a
test: add known issue for fs.open() keeping event loop open
Trott Jul 6, 2020
96ebd5f
http: add note about timer unref
ronag Jun 30, 2020
a6a656a
doc: document security issues with url.parse()
jasnell Jul 6, 2020
ffe6886
doc: document behavior for once(ee, 'error')
jasnell Jul 6, 2020
431bfe1
doc: add note about multiple sync events and once
jasnell Jul 6, 2020
6f014d0
doc: document that whitespace is ignored in base64 decoding
jasnell Jul 6, 2020
25ac669
doc: add comment to example about 2xx status codes
jasnell Jul 6, 2020
9339f9f
doc: document the ready event for Http2Stream
jasnell Jul 6, 2020
7416028
doc: specify encoding in text/html examples
jasnell Jul 6, 2020
601ed8e
deps: V8: backport 2d5017a0fc02
Jul 9, 2020
1ae76bd
module: package "imports" field
guybedford Jun 28, 2020
e6776fe
doc: move kfarnung to collaborator emeriti list
Trott Jul 8, 2020
24fe558
doc: add ruyadorno to collaborators
ruyadorno Jul 10, 2020
a9ca420
deps: upgrade to libuv 1.38.1
cjihrig Jul 3, 2020
1aad61e
test: add issue ref for known_issues test
Trott Jul 8, 2020
d865be4
doc: move sebdeckers to emeritus
Trott Jul 10, 2020
ec876ee
src: add GetCipherValue function
danbev Jul 10, 2020
844bf77
src: use FromMaybe instead of ToLocal in GetCert
danbev Jul 9, 2020
a89bcf7
tls: make 'createSecureContext' honor more options
mkrawczuk Jun 19, 2020
de250c1
build: recommend Python 3.8 to build on Windows
targos Jul 3, 2020
6925ef3
test: add WASI test for file resizing
cjihrig Feb 2, 2020
d2c5894
doc: add sxa as collaborator
Jul 13, 2020
24f76cf
deps: upgrade npm to 6.14.6
claudiahdz Jul 7, 2020
d114961
doc: improve text in fs docs about omitting callbacks
Trott Jul 11, 2020
a130771
build,tools: fix cmd_regen_makefile
danbev Jul 8, 2020
afec0d7
async_hooks: improve resource stack performance
addaleax Jul 12, 2020
3ee8f53
test: add regression tests for HTTP parser crash
addaleax Jul 7, 2020
9c12e53
src: remove redundant snprintf
addaleax Jul 9, 2020
e4c7b59
src: allow embedders to disable esm loader
codebytere Jun 26, 2020
8bafba2
lib: always initialize esm loader callbackMap
codebytere Jul 1, 2020
0f6805d
src: add option to track unmanaged file descriptors
addaleax Jul 10, 2020
9e04070
worker: add option to track unmanaged file descriptors
addaleax Jul 10, 2020
060c95a
test: add n-api null checks for conversions
Jun 30, 2020
1bc4def
worker: fix nested uncaught exception handling
addaleax Jul 11, 2020
1cc6533
doc: buffer documentation improvements
jasnell Jul 6, 2020
8f8d168
meta: make issue template mobile friendly and address nits
DerekNonGeneric Jul 7, 2020
28ce378
test: fix flaky test-http2-reset-flood
Trott Jul 12, 2020
0b42e5d
doc: add danielleadams to collaborators
Jul 14, 2020
16160e6
Revert "http2: streamline OnStreamRead streamline memory accounting"
Trott Jul 11, 2020
73d6792
repl: support --loader option in builtin REPL
targos May 16, 2020
b2cd87e
src,doc,test: remove String::New default parameter
addaleax Jul 7, 2020
8d7330b
module: deprecate module.parent
aduh95 Mar 11, 2020
ef31f17
doc: sync deprecation numbers with v14.x
MylesBorins Jul 15, 2020
1dd2653
doc: reword warnings about sockets passed to subprocesses
Trott Jul 9, 2020
17174e6
doc: clarify conditional exports guidance
guybedford Jul 11, 2020
02ea320
policy: add startup benchmark and make SRI lazier
bfarias-godaddy Sep 11, 2019
58dfeac
test: use mustCall() in pummel test
Trott Jul 12, 2020
9cd523d
deps: update V8 to 8.4.371.19
targos Jul 14, 2020
f340571
build: reset embedder string to "-node.0"
targos Jul 14, 2020
51d86f4
deps: V8: un-cherry-pick bd019bd
refack Mar 27, 2019
eac35c6
deps: patch V8 to run on older XCode versions
ryzokuken Sep 14, 2019
1e37442
deps: V8: patch register-arm64.h
refack May 22, 2019
a4b71e0
deps: V8: forward declaration of `Rtl*FunctionTable`
refack May 22, 2019
eb6ded6
deps: make v8.h compatible with VS2015
joaocgreis Nov 1, 2019
355e2f2
deps: V8: silence irrelevant warnings
targos Mar 27, 2019
335e386
deps: patch V8 to run on Xcode 8
mmarchini Mar 10, 2020
f269dff
deps: V8: cherry-pick 9868b2aefa1a
targos Jun 2, 2020
01e7886
deps: V8: fix compilation on VS2017
gengjiawen Jun 2, 2020
fb180ac
deps: V8: backport 22014de00115
joyeecheung May 29, 2020
4c37837
deps: V8: cherry-pick eec10a2fd8fa
Qard Jun 6, 2020
3fa7ad3
deps: update V8 postmortem metadata script
cjihrig Jul 4, 2020
4e2fa43
tools: update V8 gypfiles for 8.4
ryzokuken Apr 17, 2020
9f886c9
deps: bump minimum icu version to 67
targos May 9, 2020
1af8943
test: remove test/v8-updates/test-postmortem-metadata.js
cjihrig Jun 29, 2020
2079fef
deps: V8: undo header change of 9dbab9bbdb979
addaleax Jul 14, 2020
447b1e8
deps: V8: re-add dummy Isolate::CheckMemoryPressure
addaleax Jul 14, 2020
2c9fd6e
deps: V8: revert de4c0042cbe6 from upstream V8
addaleax Jul 14, 2020
95afc2e
deps: V8: update headers for ABI compatibility
addaleax Jul 14, 2020
b878e32
src: add callback scope for native immediates
addaleax Jul 14, 2020
ca62c34
2020-07-21, Version 14.6.0 (Current)
MylesBorins Jul 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: add dynamic source code links
Fixes: #33977

PR-URL: #33996
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
aw-davidson authored and MylesBorins committed Jul 16, 2020
commit eb04ba3080704e76398a293c331b8de09b10a558
2 changes: 2 additions & 0 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/assert.js -->

The `assert` module provides a set of assertion functions for verifying
invariants.

Expand Down
2 changes: 2 additions & 0 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 1 - Experimental
<!-- source_link=lib/async_hooks.js -->

The `async_hooks` module provides an API to track asynchronous resources. It
can be accessed using:

Expand Down
2 changes: 2 additions & 0 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/buffer.js -->

In Node.js, `Buffer` objects are used to represent binary data in the form
of a sequence of bytes. Many Node.js APIs, for example streams and file system
operations, support `Buffer`s, as interactions with the operating system or
Expand Down
2 changes: 2 additions & 0 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/child_process.js -->

The `child_process` module provides the ability to spawn child processes in
a manner that is similar, but not identical, to popen(3). This capability
is primarily provided by the [`child_process.spawn()`][] function:
Expand Down
2 changes: 2 additions & 0 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/cluster.js -->

A single instance of Node.js runs in a single thread. To take advantage of
multi-core systems, the user will sometimes want to launch a cluster of Node.js
processes to handle the load.
Expand Down
2 changes: 2 additions & 0 deletions doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/console.js -->

The `console` module provides a simple debugging console that is similar to the
JavaScript console mechanism provided by web browsers.

Expand Down
2 changes: 2 additions & 0 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/crypto.js -->

The `crypto` module provides cryptographic functionality that includes a set of
wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions.

Expand Down
2 changes: 2 additions & 0 deletions doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<!-- name=dgram -->

<!-- source_link=lib/dgram.js -->

The `dgram` module provides an implementation of UDP datagram sockets.

```js
Expand Down
2 changes: 2 additions & 0 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/dns.js -->

The `dns` module enables name resolution. For example, use it to look up IP
addresses of host names.

Expand Down
2 changes: 2 additions & 0 deletions doc/api/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ changes:

> Stability: 0 - Deprecated
<!-- source_link=lib/domain.js -->

**This module is pending deprecation**. Once a replacement API has been
finalized, this module will be fully deprecated. Most end users should
**not** have cause to use this module. Users who absolutely must have
Expand Down
2 changes: 2 additions & 0 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<!--type=module-->

<!-- source_link=lib/events.js -->

Much of the Node.js core API is built around an idiomatic asynchronous
event-driven architecture in which certain kinds of objects (called "emitters")
emit named events that cause `Function` objects ("listeners") to be called.
Expand Down
2 changes: 2 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<!--name=fs-->

<!-- source_link=lib/fs.js -->

The `fs` module provides an API for interacting with the file system in a
manner closely modeled around standard POSIX functions.

Expand Down
2 changes: 2 additions & 0 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/http.js -->

To use the HTTP server and client one must `require('http')`.

The HTTP interfaces in Node.js are designed to support many features
Expand Down
2 changes: 2 additions & 0 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ changes:

> Stability: 2 - Stable
<!-- source_link=lib/http2.js -->

The `http2` module provides an implementation of the [HTTP/2][] protocol. It
can be accessed using:

Expand Down
2 changes: 2 additions & 0 deletions doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/https.js -->

HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
separate module.

Expand Down
2 changes: 2 additions & 0 deletions doc/api/inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 1 - Experimental
<!-- source_link=lib/inspector.js -->

The `inspector` module provides an API for interacting with the V8 inspector.

It can be accessed using:
Expand Down
2 changes: 2 additions & 0 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/net.js -->

The `net` module provides an asynchronous network API for creating stream-based
TCP or [IPC][] servers ([`net.createServer()`][]) and clients
([`net.createConnection()`][]).
Expand Down
2 changes: 2 additions & 0 deletions doc/api/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/os.js -->

The `os` module provides operating system-related utility methods and
properties. It can be accessed using:

Expand Down
2 changes: 2 additions & 0 deletions doc/api/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/path.js -->

The `path` module provides utilities for working with file and directory paths.
It can be accessed using:

Expand Down
2 changes: 2 additions & 0 deletions doc/api/perf_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/perf_hooks.js -->

This module provides an implementation of a subset of the W3C
[Web Performance APIs][] as well as additional APIs for
Node.js-specific performance measurements.
Expand Down
2 changes: 2 additions & 0 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<!-- introduced_in=v0.10.0 -->
<!-- type=global -->

<!-- source_link=lib/process.js -->

The `process` object is a `global` that provides information about, and control
over, the current Node.js process. As a global, it is always available to
Node.js applications without using `require()`. It can also be explicitly
Expand Down
2 changes: 2 additions & 0 deletions doc/api/punycode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ changes:

> Stability: 0 - Deprecated
<!-- source_link=lib/punycode.js -->

**The version of the punycode module bundled in Node.js is being deprecated**.
In a future major version of Node.js this module will be removed. Users
currently depending on the `punycode` module should switch to using the
Expand Down
2 changes: 2 additions & 0 deletions doc/api/querystring.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<!--name=querystring-->

<!-- source_link=lib/querystring.js -->

The `querystring` module provides utilities for parsing and formatting URL
query strings. It can be accessed using:

Expand Down
2 changes: 2 additions & 0 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/readline.js -->

The `readline` module provides an interface for reading data from a [Readable][]
stream (such as [`process.stdin`][]) one line at a time. It can be accessed
using:
Expand Down
2 changes: 2 additions & 0 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable
<!-- source_link=lib/repl.js -->

The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that
is available both as a standalone program or includible in other applications.
It can be accessed using:
Expand Down
2 changes: 2 additions & 0 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/stream.js -->

A stream is an abstract interface for working with streaming data in Node.js.
The `stream` module provides an API for implementing the stream interface.

Expand Down
2 changes: 2 additions & 0 deletions doc/api/string_decoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/string_decoder.js -->

The `string_decoder` module provides an API for decoding `Buffer` objects into
strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
characters. It can be accessed using:
Expand Down
2 changes: 2 additions & 0 deletions doc/api/timers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/timers.js -->

The `timer` module exposes a global API for scheduling functions to
be called at some future period of time. Because the timer functions are
globals, there is no need to call `require('timers')` to use the API.
Expand Down
2 changes: 2 additions & 0 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/tls.js -->

The `tls` module provides an implementation of the Transport Layer Security
(TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.
The module can be accessed using:
Expand Down
2 changes: 2 additions & 0 deletions doc/api/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 1 - Experimental

<!-- source_link=lib/trace_events.js -->

The `trace_events` module provides a mechanism to centralize tracing information
generated by V8, Node.js core, and userspace code.

Expand Down
2 changes: 2 additions & 0 deletions doc/api/tty.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/tty.js -->

The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes.
In most cases, it will not be necessary or possible to use this module directly.
However, it can be accessed using:
Expand Down
2 changes: 2 additions & 0 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/url.js -->

The `url` module provides utilities for URL resolution and parsing. It can be
accessed using:

Expand Down
2 changes: 2 additions & 0 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/util.js -->

The `util` module supports the needs of Node.js internal APIs. Many of the
utilities are useful for application and module developers as well. To access
it:
Expand Down
2 changes: 2 additions & 0 deletions doc/api/v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<!--introduced_in=v4.0.0-->

<!-- source_link=lib/v8.js -->

The `v8` module exposes APIs that are specific to the version of [V8][]
built into the Node.js binary. It can be accessed using:

Expand Down
2 changes: 2 additions & 0 deletions doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

<!--name=vm-->

<!-- source_link=lib/vm.js -->

The `vm` module enables compiling and running code within V8 Virtual
Machine contexts. **The `vm` module is not a security mechanism. Do
not use it to run untrusted code**.
Expand Down
2 changes: 2 additions & 0 deletions doc/api/wasi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 1 - Experimental

<!-- source_link=lib/wasi.js -->

The WASI API provides an implementation of the [WebAssembly System Interface][]
specification. WASI gives sandboxed WebAssembly applications access to the
underlying operating system via a collection of POSIX-like functions.
Expand Down
2 changes: 2 additions & 0 deletions doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/worker_threads.js -->

The `worker_threads` module enables the use of threads that execute JavaScript
in parallel. To access it:

Expand Down
2 changes: 2 additions & 0 deletions doc/api/zlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

> Stability: 2 - Stable

<!-- source_link=lib/zlib.js -->

The `zlib` module provides compression functionality implemented using Gzip,
Deflate/Inflate, and Brotli.

Expand Down
2 changes: 1 addition & 1 deletion test/doctool/test-doctool-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function toHTML({ input, filename, nodeVersion, versions }) {
.use(replaceLinks, { filename, linksMapper: testLinksMapper })
.use(markdown)
.use(html.firstHeader)
.use(html.preprocessText)
.use(html.preprocessText, { nodeVersion })
.use(html.preprocessElements, { filename })
.use(html.buildToc, { filename, apilinks: {} })
.use(remark2rehype, { allowDangerousHTML: true })
Expand Down
6 changes: 5 additions & 1 deletion tools/doc/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ function isYAMLBlock(text) {
return /^<!-- YAML/.test(text);
}

function isSourceLink(text) {
return /^<!-- source_link=([^\s/]+\/)+\w+\.\w+ -->/.test(text);
}

function arrify(value) {
return Array.isArray(value) ? value : [value];
}
Expand Down Expand Up @@ -43,4 +47,4 @@ function extractAndParseYAML(text) {
return meta;
}

module.exports = { arrify, isYAMLBlock, extractAndParseYAML };
module.exports = { arrify, isYAMLBlock, isSourceLink, extractAndParseYAML };
2 changes: 1 addition & 1 deletion tools/doc/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async function main() {
const content = await unified()
.use(replaceLinks, { filename, linksMapper })
.use(markdown)
.use(html.preprocessText)
.use(html.preprocessText, { nodeVersion })
.use(json.jsonAPI, { filename })
.use(html.firstHeader)
.use(html.preprocessElements, { filename })
Expand Down
7 changes: 5 additions & 2 deletions tools/doc/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,13 @@ function firstHeader() {

// Handle general body-text replacements.
// For example, link man page references to the actual page.
function preprocessText() {
function preprocessText({ nodeVersion }) {
return (tree) => {
visit(tree, null, (node) => {
if (node.type === 'text' && node.value) {
if (common.isSourceLink(node.value)) {
const [path] = node.value.match(/(?<=<!-- source_link=).*(?= -->)/);
node.value = `<p><strong>Source Code:</strong> <a href="https://github.com/nodejs/node/blob/${nodeVersion}/${path}">${path}</a></p>`;
} else if (node.type === 'text' && node.value) {
const value = linkJsTypeDocs(linkManPages(node.value));
if (value !== node.value) {
node.type = 'html';
Expand Down