Commit 8dbdd035818 for nodejs
commit 8dbdd0358186b7af526356cb8936030715a7ff22
Author: LiviaMedeiros <livia@cirno.name>
Date: Sat Nov 14 07:02:31 2026 +0800
doc: deprecate `util.TextDecoder` and `util.TextEncoder`
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md
index fc333e937d6..b31bfffc11b 100644
--- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md
@@ -4847,6 +4847,20 @@ Type: Documentation-only
`node:sqlite`'s `StatementSync` class was renamed to `Statement`.
`StatementSync` is kept as a deprecated alias. Use `Statement` instead.
+### DEP0212: `util.TextDecoder` and `util.TextEncoder`
+
+<!-- YAML
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/67461
+ description: Documentation-only deprecation.
+-->
+
+Type: Documentation-only
+
+`node:util`'s `util.TextDecoder` and `util.TextEncoder` are deprecated.
+Use global `TextDecoder` and `TextEncoder` instead.
+
[DEP0142]: #dep0142-repl_builtinlibs
[DEP0156]: #dep0156-aborted-property-and-abort-aborted-event-in-http
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
diff --git a/doc/api/util.md b/doc/api/util.md
index c30831019d0..176722568e4 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -2928,6 +2928,7 @@ The full list of formats can be found in [modifiers][].
<!-- YAML
added: v8.3.0
+deprecated: REPLACEME
changes:
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22281
@@ -3066,6 +3067,7 @@ mark.
<!-- YAML
added: v8.3.0
+deprecated: REPLACEME
changes:
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22281
diff --git a/test/doctool/test-doc-api-json.mjs b/test/doctool/test-doc-api-json.mjs
index 104ef026c76..f0e7d2b3425 100644
--- a/test/doctool/test-doc-api-json.mjs
+++ b/test/doctool/test-doc-api-json.mjs
@@ -158,5 +158,5 @@ for await (const dirent of await fs.opendir(new URL('../../out/doc/api/', import
assert.partialDeepStrictEqual(allExpectedKeys, findAllKeys(json));
}
-assert.strictEqual(numberOfDeprecatedSections, 47); // Increase this number every time a new API is deprecated.
+assert.strictEqual(numberOfDeprecatedSections, 49); // Increase this number every time a new API is deprecated.
assert.strictEqual(numberOfRemovedAPIs, 49); // Increase this number every time a section is marked as removed.