GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc,test: deprecate `util.TextDecoder` and `util.TextEncoder` by LiviaMedeiros · Pull Request #67461 · nodejs/node

Conversation

@LiviaMedeiros

@LiviaMedeiros LiviaMedeiros commented Nov 13, 2026

Copy link
Copy Markdown
Member

util.TextDecoder === globalThis.TextDecoder && util.TextEncoder === globalThis.TextEncoder.

The globals were added back in v11.0, more than 8 years ago. There is no reason to prefer node:util versions in userland, it only adds unnecessary import and reduces compatibility. Also nowadays we have TextDecoderStream and TextEncoderStream that aren't mirrored.
I think we should discourage node:util versions and possibly remove them at some point.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@LiviaMedeiros LiviaMedeiros added deprecations Issues and PRs related to deprecations. commit-queue-rebase PRs the Commit Queue should land as multiple self-contained commits. labels Nov 13, 2026
@nodejs-github-bot

nodejs-github-bot commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/userland-migrations
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Nov 13, 2026
@LiviaMedeiros
LiviaMedeiros force-pushed the util-deprecate-textcoder branch from 299944b to 2799562 Compare November 13, 2026 23:58
@LiviaMedeiros LiviaMedeiros added doc Issues and PRs related to Node.js documentation. test Issues and PRs related to Node.js core tests and test infrastructure. util Issues and PRs related to the built-in util module. labels Nov 13, 2026
@LiviaMedeiros
LiviaMedeiros force-pushed the util-deprecate-textcoder branch from 2799562 to b3e0814 Compare November 14, 2026 00:06
avivkeller
avivkeller approved these changes Nov 14, 2026
View reviewed changes
@codecov

codecov Bot commented Nov 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.66%. Comparing base (b0aa887) to head (b2df4d7).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67461      +/-   ##
==========================================
- Coverage   90.66%   90.66%   -0.01%     
==========================================
  Files         799      799              
  Lines      280245   280245              
  Branches    54115    54112       -3     
==========================================
- Hits       254093   254091       -2     
- Misses      16276    16282       +6     
+ Partials     9876     9872       -4     

see 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Nov 14, 2026
View reviewed changes
AugustinMauroy
AugustinMauroy reviewed Nov 14, 2026
View reviewed changes
Comment thread doc/api/deprecations.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 approved these changes Nov 14, 2026
View reviewed changes

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if stability Legacy would not be more appropriate, given that maintenance burden for this alias is virtually null, so it wouldn't really make sense to break it for the ecosystem. I guess we can always start with doc-deprecation, IMO runtime deprecation would only make sense if we cannot detect ecosystem use.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/util.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Renegade334

Renegade334 commented Nov 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Is this a practice we want to commit to? TextEncoder is far from unique in this regard (require('http').WebSocket, require('stream/web') etc.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@LiviaMedeiros

LiviaMedeiros commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

I wonder if stability Legacy would not be more appropriate, given that maintenance burden for this alias is virtually null, so it wouldn't really make sense to break it for the ecosystem. I guess we can always start with doc-deprecation, IMO runtime deprecation would only make sense if we cannot detect ecosystem use.

Yep, fully agreed.

Is this a practice we want to commit to? TextEncoder is far from unique in this regard (require('http').WebSocket, require('stream/web') etc.)

It should be weighted individually for each global (for example, some might be easier/harder to runtime deprecate, in case of node:timers i would actually prefer if we made timers.setTimeout !== globalThis.setTimeout); but in general, if it's just a legacy Node.js-specific alias, it should be discouraged as well.
TextEncoder is most outstanding one because it sits in generic node:util module, and is misaligned with TextEncoderStream.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

panva
panva approved these changes Nov 14, 2026
View reviewed changes

@panva panva left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@LiviaMedeiros
LiviaMedeiros force-pushed the util-deprecate-textcoder branch from b3e0814 to c127f2e Compare November 14, 2026 21:14
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
LiviaMedeiros added 4 commits November 15, 2026 21:40
@LiviaMedeiros
doc: deprecate util.TextDecoder and util.TextEncoder
7d0d2f7
Signed-off-by: LiviaMedeiros <[email protected]>
@LiviaMedeiros
doc: refer to global TextDecoder and TextEncoder instead of `node…
57eda16
…:util`

Signed-off-by: LiviaMedeiros <[email protected]>
@LiviaMedeiros
doc: swap util.TextDecoder and util.TextEncoder with globals
d11c577
Signed-off-by: LiviaMedeiros <[email protected]>
@LiviaMedeiros
test: remove unnecessary imports for TextDecoder and TextEncoder
b2df4d7
Signed-off-by: LiviaMedeiros <[email protected]>
@LiviaMedeiros
LiviaMedeiros force-pushed the util-deprecate-textcoder branch from c127f2e to b2df4d7 Compare November 15, 2026 13:49
@nodejs-github-bot

nodejs-github-bot commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/79121/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@LiviaMedeiros LiviaMedeiros added notable-change PRs with changes that should be highlighted in changelogs. encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. author ready PRs with CI started, the required approvals, and no outstanding review comments. labels Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

The notable-change PRs with changes that should be highlighted in changelogs. label has been added by @LiviaMedeiros.

Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Commit Queue failed

     ⚠  0:50     Title should be <= 50 columns.            title-length
  ✖  984b4c66c98ee27dca3426651e8cc88496835791
     ✖  0:72     Title must be <= 72 columns.              title-length
     ⚠  0:50     Title should be <= 50 columns.            title-length
     ⚠  0:50     Title should be <= 50 columns.            title-length

The pull request was removed from the Commit Queue and labeled commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. . After resolving the failure, remove that label and add commit-queue PRs queued for automated landing through the Commit Queue. to retry.

Full Commit Queue output
�[36m⠋�[39m Loading data for nodejs/node/pull/67461
�[36m⠋�[39m Loading data for nodejs/node/pull/67461
�[36m⠋�[39m Getting collaborator contacts from README of nodejs/node
�[36m⠋�[39m Getting PR from nodejs/node/pull/67461
�[36m⠋�[39m Getting reviews from nodejs/node/pull/67461
�[36m⠋�[39m Getting comments from nodejs/node/pull/67461
�[36m⠋�[39m Getting commits from nodejs/node/pull/67461
✔  Done loading data for nodejs/node/pull/67461
----------------------------------- PR info ------------------------------------
Title      doc,test: deprecate `util.TextDecoder` and `util.TextEncoder` (#67461)
Author     Livia Medeiros <[email protected]> (@LiviaMedeiros)
Branch     LiviaMedeiros:util-deprecate-textcoder -> nodejs:main
Labels     util, doc, test, notable-change, encoding, author ready, deprecations, needs-ci, commit-queue, commit-queue-rebase
Commits    4
 - doc: deprecate `util.TextDecoder` and `util.TextEncoder`
 - doc: refer to global `TextDecoder` and `TextEncoder` instead of `node…
 - doc: swap `util.TextDecoder` and `util.TextEncoder` with globals
 - test: remove unnecessary imports for `TextDecoder` and `TextEncoder`
Committers 1
 - LiviaMedeiros <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Fri, 13 Nov 2026 23:55:39 GMT
   ✔  Approvals: 5
   ✔  - Aviv Keller (@avivkeller): https://github.com/nodejs/node/pull/67461#pullrequestreview-5900280696
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/67461#pullrequestreview-5901005583
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/67461#pullrequestreview-5904667709
   ✔  - Filip Skokan (@panva) (TSC): https://github.com/nodejs/node/pull/67461#pullrequestreview-5906208842
   ✔  - Gürgün Dayıoğlu (@gurgunday): https://github.com/nodejs/node/pull/67461#pullrequestreview-5913094512
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2026-11-15T16:01:31Z: https://ci.nodejs.org/job/node-test-pull-request/79121/
�[36m⠙�[39m Querying data for job/node-test-pull-request/79121/
�[36m⠙�[39m Querying data for job/node-test-pull-request/79121/
�[36m⠙�[39m Querying API for job/node-test-pull-request/79121/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
�[36m⠹�[39m Bringing origin/main up to date...
�[36m⠹�[39m Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
�[36m⠸�[39m Downloading patch for 67461
�[36m⠸�[39m Downloading patch for 67461
From https://github.com/nodejs/node
 * branch                  refs/pull/67461/merge -> FETCH_HEAD
✔  Fetched commits as b0aa8874128b..b2df4d75fc9c
--------------------------------------------------------------------------------
[main 55d0565f3b] doc: deprecate `util.TextDecoder` and `util.TextEncoder`
 Author: LiviaMedeiros <[email protected]>
 Date: Sat Nov 14 07:02:31 2026 +0800
 3 files changed, 17 insertions(+), 1 deletion(-)
[main bffb44ac68] doc: refer to global `TextDecoder` and `TextEncoder` instead of `node:util`
 Author: LiviaMedeiros <[email protected]>
 Date: Sat Nov 14 07:10:26 2026 +0800
 3 files changed, 5 insertions(+), 7 deletions(-)
[main 34ac1b412b] doc: swap `util.TextDecoder` and `util.TextEncoder` with globals
 Author: LiviaMedeiros <[email protected]>
 Date: Sat Nov 14 07:28:46 2026 +0800
 2 files changed, 178 insertions(+), 178 deletions(-)
[main 020e3dcae7] test: remove unnecessary imports for `TextDecoder` and `TextEncoder`
 Author: LiviaMedeiros <[email protected]>
 Date: Sat Nov 14 07:40:41 2026 +0800
 3 files changed, 3 deletions(-)
   ✔  Patches applied
There are 4 commits in the PR. Attempting autorebase.
(node:412) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Rebasing (2/8)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
doc: deprecate `util.TextDecoder` and `util.TextEncoder`

Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
--------------------------------------------------------------------------------
[detached HEAD 84a33acdd8] doc: deprecate `util.TextDecoder` and `util.TextEncoder`
 Author: LiviaMedeiros <[email protected]>
 Date: Sat Nov 14 07:02:31 2026 +0800
 3 files changed, 17 insertions(+), 1 deletion(-)
Rebasing (3/8)
Rebasing (4/8)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
doc: refer to global `TextDecoder` and `TextEncoder` instead of `node:util`

Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
--------------------------------------------------------------------------------
[detached HEAD 984b4c66c9] doc: refer to global `TextDecoder` and `TextEncoder` instead of `node:util`
 Author: LiviaMedeiros <[email protected]>
 Date: Sat Nov 14 07:10:26 2026 +0800
 3 files changed, 5 insertions(+), 7 deletions(-)
Rebasing (5/8)
Rebasing (6/8)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
doc: swap `util.TextDecoder` and `util.TextEncoder` with globals

Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
--------------------------------------------------------------------------------
[detached HEAD a41a70aa4b] doc: swap `util.TextDecoder` and `util.TextEncoder` with globals
 Author: LiviaMedeiros <[email protected]>
 Date: Sat Nov 14 07:28:46 2026 +0800
 2 files changed, 178 insertions(+), 178 deletions(-)
Rebasing (7/8)
Rebasing (8/8)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: remove unnecessary imports for `TextDecoder` and `TextEncoder`

Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
--------------------------------------------------------------------------------
[detached HEAD 35de1fc6b8] test: remove unnecessary imports for `TextDecoder` and `TextEncoder`
 Author: LiviaMedeiros <[email protected]>
 Date: Sat Nov 14 07:40:41 2026 +0800
 3 files changed, 3 deletions(-)
Successfully rebased and updated refs/heads/main.
--------------------------------------------------------------------------------
  ✔  84a33acdd858d2ff9d9b03b65c6faca2211a3854
     ✔  0:0      no Assisted-by metadata                   assisted-by-is-trailer
     ✔  0:0      no Co-authored-by metadata                co-authored-by-is-trailer
     ✔  0:0      skipping fixes-url                        fixes-url
     ✔  0:0      blank line after title                    line-after-title
     ✔  0:0      line-lengths are valid                    line-length
     ✔  0:0      metadata is at end of message             metadata-end
     ✔  2:8      PR-URL is valid.                          pr-url
     ✔  0:0      reviewers are valid                       reviewers
     ✔  0:0      has valid Signed-off-by                   signed-off-by
     ✔  0:0      valid subsystems                          subsystem
     ✔  0:0      Title is formatted correctly.             title-format
     ⚠  0:50     Title should be <= 50 columns.            title-length
  ✖  984b4c66c98ee27dca3426651e8cc88496835791
     ✔  0:0      no Assisted-by metadata                   assisted-by-is-trailer
     ✔  0:0      no Co-authored-by metadata                co-authored-by-is-trailer
     ✔  0:0      skipping fixes-url                        fixes-url
     ✔  0:0      blank line after title                    line-after-title
     ✔  0:0      line-lengths are valid                    line-length
     ✔  0:0      metadata is at end of message             metadata-end
     ✔  2:8      PR-URL is valid.                          pr-url
     ✔  0:0      reviewers are valid                       reviewers
     ✔  0:0      has valid Signed-off-by                   signed-off-by
     ✔  0:0      valid subsystems                          subsystem
     ✔  0:0      Title is formatted correctly.             title-format
     ✖  0:72     Title must be <= 72 columns.              title-length
  ✔  a41a70aa4b317b883fb387c3c8bec6c451deef67
     ✔  0:0      no Assisted-by metadata                   assisted-by-is-trailer
     ✔  0:0      no Co-authored-by metadata                co-authored-by-is-trailer
     ✔  0:0      skipping fixes-url                        fixes-url
     ✔  0:0      blank line after title                    line-after-title
     ✔  0:0      line-lengths are valid                    line-length
     ✔  0:0      metadata is at end of message             metadata-end
     ✔  2:8      PR-URL is valid.                          pr-url
     ✔  0:0      reviewers are valid                       reviewers
     ✔  0:0      has valid Signed-off-by                   signed-off-by
     ✔  0:0      valid subsystems                          subsystem
     ✔  0:0      Title is formatted correctly.             title-format
     ⚠  0:50     Title should be <= 50 columns.            title-length
  ✔  35de1fc6b872af376516c18ba827226f6c264001
     ✔  0:0      no Assisted-by metadata                   assisted-by-is-trailer
     ✔  0:0      no Co-authored-by metadata                co-authored-by-is-trailer
     ✔  0:0      skipping fixes-url                        fixes-url
     ✔  0:0      blank line after title                    line-after-title
     ✔  0:0      line-lengths are valid                    line-length
     ✔  0:0      metadata is at end of message             metadata-end
     ✔  2:8      PR-URL is valid.                          pr-url
     ✔  0:0      reviewers are valid                       reviewers
     ✔  0:0      has valid Signed-off-by                   signed-off-by
     ✔  0:0      valid subsystems                          subsystem
     ✔  0:0      Title is formatted correctly.             title-format
     ⚠  0:50     Title should be <= 50 columns.            title-length
--------------------------------------------------------------------------------
   ℹ  Please fix the commit message and try again.
Please manually ammend the commit message, by running
`git commit --amend`
Once commit message is fixed, finish the landing command running
`git node land --continue`

View workflow run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@LiviaMedeiros LiviaMedeiros self-assigned this Nov 16, 2026
LiviaMedeiros added a commit to LiviaMedeiros/node that referenced this pull request Nov 16, 2026
@LiviaMedeiros
doc: deprecate util.TextDecoder and util.TextEncoder
76ef2ad
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
LiviaMedeiros added a commit to LiviaMedeiros/node that referenced this pull request Nov 16, 2026
@LiviaMedeiros
doc: use global TextDecoder and TextEncoder instead of util
df9bd8c
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
LiviaMedeiros added a commit to LiviaMedeiros/node that referenced this pull request Nov 16, 2026
@LiviaMedeiros
doc: swap util.TextDecoder and util.TextEncoder with globals
b77d9de
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
LiviaMedeiros added a commit to LiviaMedeiros/node that referenced this pull request Nov 16, 2026
@LiviaMedeiros
test: remove unnecessary imports for TextDecoder and TextEncoder
761c5a3
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
LiviaMedeiros added a commit to LiviaMedeiros/node that referenced this pull request Nov 16, 2026
@LiviaMedeiros
doc: deprecate util.TextDecoder and util.TextEncoder
8dbdd03
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
LiviaMedeiros added a commit to LiviaMedeiros/node that referenced this pull request Nov 16, 2026
@LiviaMedeiros
doc: use global TextDecoder and TextEncoder instead of util
1260eee
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
LiviaMedeiros added a commit to LiviaMedeiros/node that referenced this pull request Nov 16, 2026
@LiviaMedeiros
doc: swap util.TextDecoder and util.TextEncoder with globals
329497a
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
LiviaMedeiros added a commit to LiviaMedeiros/node that referenced this pull request Nov 16, 2026
@LiviaMedeiros
test: remove unnecessary imports for TextDecoder and TextEncoder
ab476ec
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
@LiviaMedeiros

LiviaMedeiros commented Nov 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Landed in 2feb5c8...ab476ec

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@LiviaMedeiros LiviaMedeiros closed this Nov 16, 2026
aduh95 pushed a commit that referenced this pull request Nov 16, 2026
@LiviaMedeiros @aduh95
doc: swap util.TextDecoder and util.TextEncoder with globals
a2026ef
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: #67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 16, 2026
@LiviaMedeiros @aduh95
test: remove unnecessary imports for TextDecoder and TextEncoder
01bf49c
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: #67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@LiviaMedeiros @aduh95
doc: deprecate util.TextDecoder and util.TextEncoder
5e297a0
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: #67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@LiviaMedeiros @aduh95
doc: use global TextDecoder and TextEncoder instead of util
9221406
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: #67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@LiviaMedeiros @aduh95
doc: swap util.TextDecoder and util.TextEncoder with globals
472f4b4
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: #67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@LiviaMedeiros @aduh95
test: remove unnecessary imports for TextDecoder and TextEncoder
189e0f1
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: #67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 24, 2026
2026-11-25, Version 27.0.0-alpha.0.2.0 (Alpha) #67757
Merged
nodejs-github-bot added a commit that referenced this pull request Nov 24, 2026
@nodejs-github-bot
2026-11-25, Version 27.0.0-alpha.0.2.0 (Alpha)
0296c04
Notable changes:

doc:
  * swap `util.TextDecoder` and `util.TextEncoder` with globals (LiviaMedeiros) #67461
  * use global `TextDecoder` and `TextEncoder` instead of `util` (LiviaMedeiros) #67461
  * deprecate `util.TextDecoder` and `util.TextEncoder` (LiviaMedeiros) #67461
http2:
  * (SEMVER-MINOR) add missing setHeaders (jakecastelli) #67597
  * (SEMVER-MINOR) add callback to informational header methods (Yuya Inoue) #67470
lib:
  * (SEMVER-MINOR) graduate the --process-timeout option (James M Snell) #67506
module:
  * remove async module customization hooks (Geoffrey Booth) #67090
os:
  * (SEMVER-MINOR) expose `guessFileDescriptorType` (Vlad Frangu) #58060
sqlite:
  * mark as stable (Christian Aurich Zanettini Martins) #67654
src:
  * (SEMVER-MINOR) restore tty state on exit only if changed (Matteo Collina) #66753
test:
  * update Intl tests for CLDR 49 (Renegade334) #66992
  * remove unnecessary imports for `TextDecoder` and `TextEncoder` (LiviaMedeiros) #67461
tls:
  * (SEMVER-MINOR) docs-deprecate TLS renegotiation, add allowRenegotiation opt-in (Tim Perry) #67532

PR-URL: #67757
aduh95 pushed a commit that referenced this pull request Nov 24, 2026
@nodejs-github-bot @aduh95
2026-11-25, Version 27.0.0-alpha.0.2.0 (Alpha)
9d44b49
Notable changes:

doc:
  * deprecate `util.TextDecoder` and `util.TextEncoder` (LiviaMedeiros) #67461
http2:
  * (SEMVER-MINOR) add missing setHeaders (jakecastelli) #67597
  * (SEMVER-MINOR) add callback to informational header methods (Yuya Inoue) #67470
lib:
  * (SEMVER-MINOR) graduate the `--process-timeout` option (James M Snell) #67506
module:
  * remove async module customization hooks (Geoffrey Booth) #67090
os:
  * (SEMVER-MINOR) expose `guessFileDescriptorType` (Vlad Frangu) #58060
sqlite:
  * mark as stable (Christian Aurich Zanettini Martins) #67654
src:
  * (SEMVER-MINOR) restore tty state on exit only if changed (Matteo Collina) #66753
tls:
  * (SEMVER-MINOR) docs-deprecate TLS renegotiation, add allowRenegotiation opt-in (Tim Perry) #67532

PR-URL: #67757
aduh95 added a commit that referenced this pull request Nov 25, 2026
@aduh95
2026-11-26, Version 27.0.0-alpha.0.2.0 (Alpha)
67d9357
Notable changes:

doc:
  * deprecate `util.TextDecoder` and `util.TextEncoder` (LiviaMedeiros) #67461
http2:
  * (SEMVER-MINOR) add writeProcessing to compat response (Yuya Inoue) #67728
  * (SEMVER-MINOR) add missing setHeaders (jakecastelli) #67597
  * (SEMVER-MINOR) add callback to informational header methods (Yuya Inoue) #67470
lib:
  * (SEMVER-MINOR) graduate the --process-timeout option (James M Snell) #67506
os:
  * (SEMVER-MINOR) expose `guessFileDescriptorType` (Vlad Frangu) #58060
sqlite:
  * (SEMVER-MINOR) throw ERR_NO_SQLITE without SQLite support (Christian Aurich Zanettini Martins) #67727
  * (SEMVER-MINOR) add statement.columnCount getter (Guilherme Araújo) #67658
  * mark as stable (Christian Aurich Zanettini Martins) #67654
src:
  * (SEMVER-MINOR) expand --process-timeout output to include workers (James M Snell) #67712
  * (SEMVER-MINOR) restore tty state on exit only if changed (Matteo Collina) #66753
tls:
  * (SEMVER-MINOR) docs-deprecate TLS renegotiation, add allowRenegotiation opt-in (Tim Perry) #67532

PR-URL: #67757
aduh95 added a commit that referenced this pull request Nov 26, 2026
@aduh95
2026-11-26, Version 27.0.0-alpha.0.2.0 (Alpha)
4325ce0
Notable changes:

doc:
  * deprecate `util.TextDecoder` and `util.TextEncoder` (LiviaMedeiros) #67461
http2:
  * (SEMVER-MINOR) add writeProcessing to compat response (Yuya Inoue) #67728
  * (SEMVER-MINOR) add missing setHeaders (jakecastelli) #67597
  * (SEMVER-MINOR) add callback to informational header methods (Yuya Inoue) #67470
lib:
  * (SEMVER-MINOR) graduate the --process-timeout option (James M Snell) #67506
os:
  * (SEMVER-MINOR) expose `guessFileDescriptorType` (Vlad Frangu) #58060
sqlite:
  * (SEMVER-MINOR) throw ERR_NO_SQLITE without SQLite support (Christian Aurich Zanettini Martins) #67727
  * (SEMVER-MINOR) add statement.columnCount getter (Guilherme Araújo) #67658
  * mark as stable (Christian Aurich Zanettini Martins) #67654
src:
  * (SEMVER-MINOR) expand --process-timeout output to include workers (James M Snell) #67712
  * (SEMVER-MINOR) restore tty state on exit only if changed (Matteo Collina) #66753
tls:
  * (SEMVER-MINOR) docs-deprecate TLS renegotiation, add allowRenegotiation opt-in (Tim Perry) #67532

PR-URL: #67757
@anonrig

anonrig commented Nov 27, 2026

Copy link
Copy Markdown
Member

Does this mean we are going to remove url, urlsearchparams and urlpattern as well?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@LiviaMedeiros

LiviaMedeiros commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

Does this mean we are going to remove url, urlsearchparams and urlpattern as well?

I think, removal should happen if maintenance burden, bug, or performance impact outweights userland breakage.
Same goes for runtime deprecation.

Moving API to doc-deprecated or legacy state doesn't break userland, and i can't find any reason for these globals to be imported from Node.js-specific modules, as long as they are standardized and available as global in all supported release lines.

I've tried to weight other globals in #67461 (comment). Specifically for URL, URLPattern and URLSearchParams, these are scoped in specialized node:url module (unlike TextEncoder being in generic node:util), i'm neutral with either marking them as legacy or leaving them as is.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@LiviaMedeiros @gabylb
doc: deprecate util.TextDecoder and util.TextEncoder
c0c7bdd
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@LiviaMedeiros @gabylb
doc: use global TextDecoder and TextEncoder instead of util
119536b
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@LiviaMedeiros @gabylb
doc: swap util.TextDecoder and util.TextEncoder with globals
d1481bd
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@LiviaMedeiros @gabylb
test: remove unnecessary imports for TextDecoder and TextEncoder
874f221
Signed-off-by: LiviaMedeiros <[email protected]>
PR-URL: nodejs#67461
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@aduh95 @gabylb
2026-11-26, Version 27.0.0-alpha.0.2.0 (Alpha)
369cdc7
Notable changes:

doc:
  * deprecate `util.TextDecoder` and `util.TextEncoder` (LiviaMedeiros) nodejs#67461
http2:
  * (SEMVER-MINOR) add writeProcessing to compat response (Yuya Inoue) nodejs#67728
  * (SEMVER-MINOR) add missing setHeaders (jakecastelli) nodejs#67597
  * (SEMVER-MINOR) add callback to informational header methods (Yuya Inoue) nodejs#67470
lib:
  * (SEMVER-MINOR) graduate the --process-timeout option (James M Snell) nodejs#67506
os:
  * (SEMVER-MINOR) expose `guessFileDescriptorType` (Vlad Frangu) nodejs#58060
sqlite:
  * (SEMVER-MINOR) throw ERR_NO_SQLITE without SQLite support (Christian Aurich Zanettini Martins) nodejs#67727
  * (SEMVER-MINOR) add statement.columnCount getter (Guilherme Araújo) nodejs#67658
  * mark as stable (Christian Aurich Zanettini Martins) nodejs#67654
src:
  * (SEMVER-MINOR) expand --process-timeout output to include workers (James M Snell) nodejs#67712
  * (SEMVER-MINOR) restore tty state on exit only if changed (Matteo Collina) nodejs#66753
tls:
  * (SEMVER-MINOR) docs-deprecate TLS renegotiation, add allowRenegotiation opt-in (Tim Perry) nodejs#67532

PR-URL: nodejs#67757
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@panva panva panva approved these changes
@jasnell jasnell jasnell approved these changes
@aduh95 aduh95 aduh95 approved these changes
@avivkeller avivkeller avivkeller approved these changes
@gurgunday gurgunday gurgunday approved these changes
+2 more reviewers
@AugustinMauroy AugustinMauroy AugustinMauroy left review comments
@bjohansebas bjohansebas bjohansebas approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@LiviaMedeiros LiviaMedeiros

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. commit-queue-rebase PRs the Commit Queue should land as multiple self-contained commits. deprecations Issues and PRs related to deprecations. doc Issues and PRs related to Node.js documentation. encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. test Issues and PRs related to Node.js core tests and test infrastructure. util Issues and PRs related to the built-in util module.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

11 participants

@LiviaMedeiros @nodejs-github-bot @Renegade334 @jasnell @anonrig @panva @aduh95 @avivkeller @gurgunday @AugustinMauroy @bjohansebas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.