From c3459bba29da34be52f9756195b16dc91a949078 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 10 Jul 2022 18:22:39 -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 --- 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 194bc5b0f527e4..e3caa9a44c0a7b 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.