Skip to content

lib: deprecate _http_*#58535

Open
bjohansebas wants to merge 1 commit intonodejs:mainfrom
bjohansebas:http_internals
Open

lib: deprecate _http_*#58535
bjohansebas wants to merge 1 commit intonodejs:mainfrom
bjohansebas:http_internals

Conversation

@bjohansebas
Copy link
Copy Markdown
Member

close #58534

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run. labels May 31, 2025
@bjohansebas bjohansebas added the wip Issues and PRs that are still a work in progress. label May 31, 2025
@bjohansebas bjohansebas force-pushed the http_internals branch 2 times, most recently from 11b6878 to 329d0a0 Compare May 31, 2025 20:17
@bjohansebas bjohansebas added semver-major PRs that contain breaking changes and should be released in the next major version. deprecations Issues and PRs related to deprecations. labels May 31, 2025
@bjohansebas bjohansebas marked this pull request as ready for review May 31, 2025 21:29
@bjohansebas bjohansebas removed the wip Issues and PRs that are still a work in progress. label May 31, 2025
@bjohansebas bjohansebas force-pushed the http_internals branch 2 times, most recently from 0ec4ccc to bd305a8 Compare May 31, 2025 23:17
Comment thread benchmark/http/check_is_http_token.js Outdated
@jasnell
Copy link
Copy Markdown
Member

jasnell commented May 31, 2025

@nodejs/http @mcollina

@jasnell
Copy link
Copy Markdown
Member

jasnell commented May 31, 2025

This one might need a Documentation-only deprecation to start. It's likely going to be too disruptive to go straight to a Runtime deprecation. https://github.com/search?type=code&q=%22require%28%27_http%22

Copy link
Copy Markdown
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

Yay! thanks for doing this! 🫶

(with this all pesky _modules will be runtime deprecated! 💪)

Comment thread test/parallel/test-warn-http-server-deprecation.js Outdated
Comment thread test/parallel/test-https-server-close-destroy-timeout.js
Comment thread benchmark/http/check_is_http_token.js Outdated
Comment thread benchmark/http/check_invalid_header_char.js Outdated
@bjohansebas
Copy link
Copy Markdown
Member Author

This one might need a Documentation-only deprecation to start. It's likely going to be too disruptive to go straight to a Runtime deprecation. https://github.com/search?type=code&q=%22require%28%27_http%22

Most of them seem to be just forks of Node.js, rather than actually using these undocumented modules.

@jasnell
Copy link
Copy Markdown
Member

jasnell commented May 31, 2025

Most of them seem to be just forks of Node.js....

I wish that were the case. While there are a good number of forks in those search results, it's plain to see that there are a non-trivial number of other projects requiring "_http_common" and friends. We need to assess just how disruptive this will be... but don't get me wrong, I am in favor of deprecated these but it might need to be a slower path. I'd like @nodejs/http folks to weigh in.

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 1, 2025

Codecov Report

❌ Patch coverage is 97.27290% with 142 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.63%. Comparing base (14e16db) to head (6177039).

Files with missing lines Patch % Lines
lib/internal/http/outgoing.js 95.78% 48 Missing and 3 partials ⚠️
lib/internal/http/server.js 96.92% 40 Missing and 3 partials ⚠️
lib/internal/http/client.js 97.43% 28 Missing ⚠️
lib/internal/http/agent.js 97.30% 17 Missing ⚠️
lib/internal/http/incoming.js 99.38% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #58535    +/-   ##
========================================
  Coverage   89.62%   89.63%            
========================================
  Files         706      712     +6     
  Lines      219136   219384   +248     
  Branches    41987    41991     +4     
========================================
+ Hits       196404   196640   +236     
- Misses      14611    14621    +10     
- Partials     8121     8123     +2     
Files with missing lines Coverage Δ
lib/_http_agent.js 100.00% <100.00%> (+2.69%) ⬆️
lib/_http_client.js 100.00% <100.00%> (+2.56%) ⬆️
lib/_http_common.js 100.00% <100.00%> (ø)
lib/_http_incoming.js 100.00% <100.00%> (+0.61%) ⬆️
lib/_http_outgoing.js 100.00% <100.00%> (+4.21%) ⬆️
lib/_http_server.js 100.00% <100.00%> (+2.93%) ⬆️
lib/http.js 98.83% <100.00%> (ø)
lib/https.js 98.22% <100.00%> (ø)
lib/internal/child_process.js 94.65% <100.00%> (-0.27%) ⬇️
lib/internal/http/common.js 100.00% <100.00%> (ø)
... and 8 more

... and 27 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.

Comment thread benchmark/http/check_invalid_header_char.js Outdated
Comment thread lib/_http_common.js
Comment thread test/parallel/test-https-server-close-destroy-timeout.js
@bjohansebas
Copy link
Copy Markdown
Member Author

@nodejs/http what are your recommendations?

bjohansebas added a commit to bjohansebas/node that referenced this pull request Jul 30, 2025
bjohansebas added a commit to bjohansebas/node that referenced this pull request Jul 31, 2025
Ref nodejs#58535

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
bjohansebas added a commit to bjohansebas/node that referenced this pull request Jul 31, 2025
Ref nodejs#58535

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
bjohansebas added a commit to bjohansebas/node that referenced this pull request Jul 31, 2025
Ref nodejs#58535

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
nodejs-github-bot pushed a commit that referenced this pull request Aug 2, 2025
Ref #58535

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
PR-URL: #59293
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
@bjohansebas
Copy link
Copy Markdown
Member Author

cc: @nodejs/tsc @nodejs/http

@RafaelGSS RafaelGSS added the needs-citgm PRs that need a CITGM CI run. label Jan 31, 2026
Copy link
Copy Markdown
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm

I think we can now move forward with this

@bjohansebas bjohansebas added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 3, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 3, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@bjohansebas
Copy link
Copy Markdown
Member Author

@nodejs/tsc could we take a look at this? I can rebase it again, but the PR always ends up stuck without a review.

@mcollina
Copy link
Copy Markdown
Member

rebase and add the fast track label

@mcollina
Copy link
Copy Markdown
Member

tbh it's not a rebase that is needed but moving the new files

@bjohansebas bjohansebas added the fast-track PRs that do not need to wait for 72 hours to land. label Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Fast-track has been requested by @bjohansebas. Please 👍 to approve.

@bjohansebas bjohansebas added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. notable-change PRs with changes that should be highlighted in changelogs. labels Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

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.

@bjohansebas bjohansebas added request-ci Add this label to start a Jenkins CI on a PR. and removed fast-track PRs that do not need to wait for 72 hours to land. labels Apr 19, 2026
@bjohansebas bjohansebas added the fast-track PRs that do not need to wait for 72 hours to land. label Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Fast-track has been requested by @bjohansebas. Please 👍 to approve.

@github-actions github-actions bot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Failed to start CI
- Validating Jenkins credentials
✔  Jenkins credentials valid
- Querying data for job/node-test-pull-request/71184/
[SyntaxError: Unexpected token '<', ..."    
  https://github.com/nodejs/node/actions/runs/24639573120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. deprecations Issues and PRs related to deprecations. fast-track PRs that do not need to wait for 72 hours to land. http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run. needs-citgm PRs that need a CITGM CI run. notable-change PRs with changes that should be highlighted in changelogs. request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move _http_* to be internal APIs.

9 participants