Skip to content

Commit 5e297a0

Browse files
LiviaMedeirosaduh95
authored andcommitted
doc: deprecate util.TextDecoder and util.TextEncoder
Signed-off-by: LiviaMedeiros <livia@cirno.name> PR-URL: #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>
1 parent add0fde commit 5e297a0

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

‎doc/api/deprecations.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4847,6 +4847,20 @@ Type: Documentation-only
48474847
`node:sqlite`'s `StatementSync` class was renamed to `Statement`.
48484848
`StatementSync` is kept as a deprecated alias. Use `Statement` instead.
48494849
4850+
### DEP0212: `util.TextDecoder` and `util.TextEncoder`
4851+
4852+
<!-- YAML
4853+
changes:
4854+
- version: REPLACEME
4855+
pr-url: https://github.com/nodejs/node/pull/67461
4856+
description: Documentation-only deprecation.
4857+
-->
4858+
4859+
Type: Documentation-only
4860+
4861+
`node:util`'s `util.TextDecoder` and `util.TextEncoder` are deprecated.
4862+
Use global `TextDecoder` and `TextEncoder` instead.
4863+
48504864
[DEP0142]: #dep0142-repl_builtinlibs
48514865
[DEP0156]: #dep0156-aborted-property-and-abort-aborted-event-in-http
48524866
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf

‎doc/api/util.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2928,6 +2928,7 @@ The full list of formats can be found in [modifiers][].
29282928
29292929
<!-- YAML
29302930
added: v8.3.0
2931+
deprecated: REPLACEME
29312932
changes:
29322933
- version: v11.0.0
29332934
pr-url: https://github.com/nodejs/node/pull/22281
@@ -3066,6 +3067,7 @@ mark.
30663067
30673068
<!-- YAML
30683069
added: v8.3.0
3070+
deprecated: REPLACEME
30693071
changes:
30703072
- version: v11.0.0
30713073
pr-url: https://github.com/nodejs/node/pull/22281

‎test/doctool/test-doc-api-json.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,5 @@ for await (const dirent of await fs.opendir(new URL('../../out/doc/api/', import
158158
assert.partialDeepStrictEqual(allExpectedKeys, findAllKeys(json));
159159
}
160160

161-
assert.strictEqual(numberOfDeprecatedSections, 47); // Increase this number every time a new API is deprecated.
161+
assert.strictEqual(numberOfDeprecatedSections, 49); // Increase this number every time a new API is deprecated.
162162
assert.strictEqual(numberOfRemovedAPIs, 49); // Increase this number every time a section is marked as removed.

0 commit comments

Comments
 (0)