Skip to content

Commit 9b53a69

Browse files
DeeDeeGdanielleadams
authored andcommitted
doc: revert anachronistic 'node:' module require()s in API history notes
Support for the 'node:' prefixed builtin module namespace was introduced for `require()` expressions in Node v16.0.0, and backported to v14.18.0. This was never supported in Node v15.x or chronologically older. All of the current API history notes in the docs using 'node:' prefixed module `require()`s happen to be documenting changes in Node versions from before the time when support was first introduced. This commit reverts those `require()`s in the history notes to be un-prefixed. (They were incorrect as written; The prefixed `require()`s would not work for those older Node versions.) This change prevents the API history notes from inaccurately implying 'node:' prefixed builtin modules were introduced many Node versions ago, or were `require()`-able with the 'node:' prefix in those Node versions. Refs: #35387 Refs: #37246 Refs: #42752 PR-URL: #43768 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 7571704 commit 9b53a69

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

doc/api/dns.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ added: v10.6.0
832832
changes:
833833
- version: v15.0.0
834834
pr-url: https://github.com/nodejs/node/pull/32953
835-
description: Exposed as `require('node:dns/promises')`.
835+
description: Exposed as `require('dns/promises')`.
836836
- version:
837837
- v11.14.0
838838
- v10.17.0

doc/api/fs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ added: v10.0.0
128128
changes:
129129
- version: v14.0.0
130130
pr-url: https://github.com/nodejs/node/pull/31553
131-
description: Exposed as `require('node:fs/promises')`.
131+
description: Exposed as `require('fs/promises')`.
132132
- version:
133133
- v11.14.0
134134
- v10.17.0
135135
pr-url: https://github.com/nodejs/node/pull/26581
136136
description: This API is no longer experimental.
137137
- version: v10.1.0
138138
pr-url: https://github.com/nodejs/node/pull/20504
139-
description: The API is accessible via `require('node:fs').promises` only.
139+
description: The API is accessible via `require('fs').promises` only.
140140
-->
141141

142142
The `fs/promises` API provides asynchronous file system methods that return

doc/api/path.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ added: v0.11.15
447447
changes:
448448
- version: v15.3.0
449449
pr-url: https://github.com/nodejs/node/pull/34962
450-
description: Exposed as `require('node:path/posix')`.
450+
description: Exposed as `require('path/posix')`.
451451
-->
452452

453453
* {Object}
@@ -592,7 +592,7 @@ added: v0.11.15
592592
changes:
593593
- version: v15.3.0
594594
pr-url: https://github.com/nodejs/node/pull/34962
595-
description: Exposed as `require('node:path/win32')`.
595+
description: Exposed as `require('path/win32')`.
596596
-->
597597

598598
* {Object}

doc/api/util.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ added: v10.0.0
14771477
changes:
14781478
- version: v15.3.0
14791479
pr-url: https://github.com/nodejs/node/pull/34055
1480-
description: Exposed as `require('node:util/types')`.
1480+
description: Exposed as `require('util/types')`.
14811481
-->
14821482

14831483
`util.types` provides type checks for different kinds of built-in objects.

0 commit comments

Comments
 (0)