From 9b53a694b52612c204ea2f04af4a75fb09ddb832 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Thu, 14 Jul 2022 11:24:08 -0400 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/35387 Refs: https://github.com/nodejs/node/pull/37246 Refs: https://github.com/nodejs/node/pull/42752 PR-URL: https://github.com/nodejs/node/pull/43768 Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Darshan Sen Reviewed-By: Matteo Collina --- doc/api/dns.md | 2 +- doc/api/fs.md | 4 ++-- doc/api/path.md | 4 ++-- doc/api/util.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index 0f43c7a1d7276e..660a8436941d97 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -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 diff --git a/doc/api/fs.md b/doc/api/fs.md index fc375e39837c3e..5b08e274a11a8c 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -128,7 +128,7 @@ 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 @@ -136,7 +136,7 @@ changes: 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 diff --git a/doc/api/path.md b/doc/api/path.md index 149a01cdb1b072..0bbb5b80c57ef3 100644 --- a/doc/api/path.md +++ b/doc/api/path.md @@ -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} @@ -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} diff --git a/doc/api/util.md b/doc/api/util.md index fafc54c3fadbfe..61fe92c694bc7e 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -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.