Skip to content

http: deprecate instantiating classes without new#58518

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
anonrig:yagiz/doc-deprecate-http
Jun 1, 2025
Merged

http: deprecate instantiating classes without new#58518
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
anonrig:yagiz/doc-deprecate-http

Conversation

@anonrig
Copy link
Copy Markdown
Member

@anonrig anonrig commented May 30, 2025

We started making such changes for zlib and repl. I recommend documentation-only deprecating instantiating these classes without new qualifier, and runtime deprecating in next major depending on the usage. If usage is high, we can postpone runtime deprecating it.

cc @nodejs/tsc @nodejs/http

@anonrig anonrig added notable-change PRs with changes that should be highlighted in changelogs. deprecations Issues and PRs related to deprecations. labels May 30, 2025
@github-actions
Copy link
Copy Markdown
Contributor

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

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.

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label May 30, 2025
@anonrig anonrig force-pushed the yagiz/doc-deprecate-http branch from 5bcf318 to 0072469 Compare May 30, 2025 21:59
Comment thread doc/api/deprecations.md Outdated
@anonrig anonrig added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label May 30, 2025
@anonrig anonrig requested review from Qard, mcollina, panva and ruyadorno June 1, 2025 11:43
@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 1, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 1, 2025
@nodejs-github-bot nodejs-github-bot merged commit 0e157b6 into nodejs:main Jun 1, 2025
26 checks passed
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Landed in 0e157b6

targos pushed a commit that referenced this pull request Jun 3, 2025
PR-URL: #58518
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
nodejs-github-bot added a commit that referenced this pull request Jun 8, 2025
Notable changes:

doc:
  * deprecate utilisNativeError in favor of ErrorisError (Miguel Marcondes Filho) #58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * (SEMVER-MINOR) graduate Symbol.dispose/asyncDispose from experimental (James M Snell) #58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) #57804
fs:
  * (SEMVER-MINOR) add autoClose option to FileHandle readableWebStream (James M Snell) #58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) #58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) #58073
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) #58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) #58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) #58385

PR-URL: #58635
aduh95 pushed a commit that referenced this pull request Jun 8, 2025
Notable changes:

doc:
  * deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) #58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) #58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) #57804
fs:
  * (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) #58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
  * (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) #58293
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) #58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) #58073
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) #58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) #58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) #58385

PR-URL: #58635
aduh95 pushed a commit that referenced this pull request Jun 8, 2025
Notable changes:

doc:
  * deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) #58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) #58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) #57804
fs:
  * (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) #58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
  * (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) #58293
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) #58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) #58073
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) #58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) #58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) #58385

PR-URL: #58635
aduh95 pushed a commit that referenced this pull request Jun 9, 2025
Notable changes:

doc:
  * add Filip Skokan to TSC (Rafael Gonzaga) #58499
  * deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) #58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) #58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) #57804
fs:
  * (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) #58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
  * (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) #58293
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) #58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) #58073
permission:
  * implicit allow-fs-read to app entrypoint (Rafael Gonzaga) #58579
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) #58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) #58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) #58385

PR-URL: #58635
aduh95 pushed a commit that referenced this pull request Jun 9, 2025
Notable changes:

doc:
  * add Filip Skokan to TSC (Rafael Gonzaga) #58499
  * deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) #58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) #58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) #57804
fs:
  * (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) #58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
  * (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) #58293
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) #58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) #58073
permission:
  * implicit allow-fs-read to app entrypoint (Rafael Gonzaga) #58579
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) #58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) #58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) #58385

PR-URL: #58635
aduh95 pushed a commit that referenced this pull request Jun 9, 2025
Notable changes:

doc:
  * add Filip Skokan to TSC (Rafael Gonzaga) #58499
  * deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) #58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) #58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) #57804
fs:
  * (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) #58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
  * (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) #58293
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) #58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) #58073
permission:
  * implicit allow-fs-read to app entrypoint (Rafael Gonzaga) #58579
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) #58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) #58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) #58385

PR-URL: #58635
aduh95 pushed a commit that referenced this pull request Jun 9, 2025
Notable changes:

doc:
  * add Filip Skokan to TSC (Rafael Gonzaga) #58499
  * deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) #58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) #58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) #57804
fs:
  * (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) #58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
  * (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) #58293
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) #58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) #58073
permission:
  * implicit allow-fs-read to app entrypoint (Rafael Gonzaga) #58579
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) #58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) #58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) #58385

PR-URL: #58635
aduh95 pushed a commit that referenced this pull request Jun 9, 2025
Notable changes:

doc:
  * add Filip Skokan to TSC (Rafael Gonzaga) #58499
  * deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) #58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) #58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) #57804
fs:
  * (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) #58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
  * (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) #58293
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) #58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) #58073
permission:
  * implicit allow-fs-read to app entrypoint (Rafael Gonzaga) #58579
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) #58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) #58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) #58385

PR-URL: #58635
aduh95 pushed a commit that referenced this pull request Jun 9, 2025
Notable changes:

doc:
  * add Filip Skokan to TSC (Rafael Gonzaga) #58499
  * deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) #58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) #58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) #57804
fs:
  * (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) #58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
  * (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) #58293
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) #58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) #58073
permission:
  * implicit allow-fs-read to app entrypoint (Rafael Gonzaga) #58579
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) #58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) #58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) #58385

PR-URL: #58635
aduh95 pushed a commit that referenced this pull request Jun 10, 2025
PR-URL: #58518
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
seriousme pushed a commit to seriousme/node that referenced this pull request Jun 10, 2025
Notable changes:

doc:
  * add Filip Skokan to TSC (Rafael Gonzaga) nodejs#58499
  * deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) nodejs#58262
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) nodejs#58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) nodejs#58313
  * (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) nodejs#58467
esm:
  * (SEMVER-MINOR) implement import.meta.main (Joe) nodejs#57804
fs:
  * (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) nodejs#58548
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) nodejs#58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) nodejs#58560
  * (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) nodejs#58293
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) nodejs#58541
perf_hooks:
  * (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) nodejs#58384
src:
  * (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) nodejs#58073
permission:
  * implicit allow-fs-read to app entrypoint (Rafael Gonzaga) nodejs#58579
test:
  * (SEMVER-MINOR) add disposable histogram test (James M Snell) nodejs#58384
  * (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) nodejs#58385
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) nodejs#58437
worker:
  * (SEMVER-MINOR) make Worker async disposable (James M Snell) nodejs#58385

PR-URL: nodejs#58635
nodejs-github-bot added a commit that referenced this pull request Jun 10, 2025
Notable changes:

assert:
  * (SEMVER-MINOR) mark partialDeepStrictEqual() as stable (Ruben Bridgewater) #57370
doc:
  * deprecate passing an empty string to `options.shell` (Antoine du Hamel) #58564
  * deprecate HTTP/2 priority signaling (Matteo Collina) #58313
  * add Filip Skokan to TSC (Rafael Gonzaga) #58499
  * add JonasBa to collaborators (Jonas Badalic) #58355
  * add puskin to collaborators (Giovanni Bucci) #58308
  * mark multiple APIs stable (James M Snell) #57513
fs:
  * (SEMVER-MINOR) add autoClose option to FileHandle readableWebStream (James M Snell) #58548
  * (SEMVER-MINOR) add to `Dir` support for explicit resource management (Antoine du Hamel) #58206
http:
  * deprecate instantiating classes without new (Yagiz Nizipli) #58518
http2:
  * (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) #58560
lib:
  * (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) #58541
src,permission:
  * implicit allow-fs-read to app entrypoint (Rafael Gonzaga) #58579
util:
  * (SEMVER-MINOR) add 'none' style to styleText (James M Snell) #58437

PR-URL: #58665
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 16, 2025