Skip to content

Commit

Permalink
doc: revert anachronistic 'node:' module require()s in API history notes
Browse files Browse the repository at this point in the history
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 <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
DeeDeeG authored and danielleadams committed Jul 26, 2022
1 parent 7571704 commit 9b53a69
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/api/dns.md
Expand Up @@ -832,7 +832,7 @@ added: v10.6.0
changes:
- version: v15.0.0
pr-url: https://github.com/nodejs/node/pull/32953
description: Exposed as `require('node:dns/promises')`.
description: Exposed as `require('dns/promises')`.
- version:
- v11.14.0
- v10.17.0
Expand Down
4 changes: 2 additions & 2 deletions doc/api/fs.md
Expand Up @@ -128,15 +128,15 @@ added: v10.0.0
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/31553
description: Exposed as `require('node:fs/promises')`.
description: Exposed as `require('fs/promises')`.
- version:
- v11.14.0
- v10.17.0
pr-url: https://github.com/nodejs/node/pull/26581
description: This API is no longer experimental.
- version: v10.1.0
pr-url: https://github.com/nodejs/node/pull/20504
description: The API is accessible via `require('node:fs').promises` only.
description: The API is accessible via `require('fs').promises` only.
-->

The `fs/promises` API provides asynchronous file system methods that return
Expand Down
4 changes: 2 additions & 2 deletions doc/api/path.md
Expand Up @@ -447,7 +447,7 @@ added: v0.11.15
changes:
- version: v15.3.0
pr-url: https://github.com/nodejs/node/pull/34962
description: Exposed as `require('node:path/posix')`.
description: Exposed as `require('path/posix')`.
-->

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

* {Object}
Expand Down
2 changes: 1 addition & 1 deletion doc/api/util.md
Expand Up @@ -1477,7 +1477,7 @@ added: v10.0.0
changes:
- version: v15.3.0
pr-url: https://github.com/nodejs/node/pull/34055
description: Exposed as `require('node:util/types')`.
description: Exposed as `require('util/types')`.
-->

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

0 comments on commit 9b53a69

Please sign in to comment.