Skip to content

lib: deprecate _http_* - #58535

Open
bjohansebas wants to merge 1 commit into
nodejs:mainfrom
bjohansebas:http_internals
Open

lib: deprecate _http_*#58535
bjohansebas wants to merge 1 commit into
nodejs: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-botnodejs-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
@bjohansebasbjohansebas added the wip Issues and PRs that are still a work in progress. label May 31, 2025
@bjohansebas
bjohansebasforce-pushed the http_internals branch 2 times, most recently from 11b6878 to 329d0a0CompareMay 31, 2025 20:17
@bjohansebasbjohansebas 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
@bjohansebasbjohansebas removed the wip Issues and PRs that are still a work in progress. label May 31, 2025
@bjohansebas
bjohansebasforce-pushed the http_internals branch 2 times, most recently from 0ec4ccc to bd305a8CompareMay 31, 2025 23:17
Comment threadbenchmark/http/check_is_http_token.js Outdated
@jasnell

Copy link
Copy Markdown
Member

@nodejs/http @mcollina

@jasnell

Copy link
Copy Markdown
Member

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

@dario-piotrowiczdario-piotrowicz left a comment

Copy link
Copy Markdown
Member

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 threadtest/parallel/test-warn-http-server-deprecation.js Outdated
Comment threadtest/parallel/test-https-server-close-destroy-timeout.js
Comment threadbenchmark/http/check_is_http_token.js Outdated
Comment threadbenchmark/http/check_invalid_header_char.js Outdated
@bjohansebas

Copy link
Copy Markdown
MemberAuthor

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

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

codecovBot commented Jun 1, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.44003% with 143 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.24%. Comparing base (b4c7be3) to head (eb2643c).
⚠️ Report is 21 commits behind head on main.

Files with missing linesPatch %Lines
lib/internal/http/server.js96.50%48 Missing and 3 partials ⚠️
lib/internal/http/client.js97.63%30 Missing ⚠️
lib/internal/http/outgoing.js97.62%29 Missing and 1 partial ⚠️
lib/internal/http/agent.js96.12%26 Missing and 1 partial ⚠️
lib/internal/http/incoming.js99.37%3 Missing ⚠️
lib/internal/http/common.js99.42%2 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #58535 +/- ##
==========================================
+ Coverage 90.23% 90.24% +0.01% 
==========================================
Files 741 747 +6 Lines 241604 241854 +250 Branches 45520 45533 +13 ==========================================
+ Hits 218010 218267 +257 + Misses 15120 15113 -7 
Partials 8474 8474 
Files with missing linesCoverage Δ
lib/_http_agent.js100.00% <100.00%> (+3.87%)⬆️
lib/_http_client.js100.00% <100.00%> (+2.36%)⬆️
lib/_http_common.js100.00% <100.00%> (+0.57%)⬆️
lib/_http_incoming.js100.00% <100.00%> (+0.62%)⬆️
lib/_http_outgoing.js100.00% <100.00%> (+2.37%)⬆️
lib/_http_server.js100.00% <100.00%> (+3.49%)⬆️
lib/http.js98.83% <100.00%> (ø)
lib/https.js98.22% <100.00%> (ø)
lib/internal/child_process.js94.73% <100.00%> (ø)
lib/internal/http2/compat.js97.21% <100.00%> (+<0.01%)⬆️
... and 8 more

... and 24 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 threadbenchmark/http/check_invalid_header_char.js Outdated
Comment threadlib/_http_common.js
Comment threadtest/parallel/test-https-server-close-destroy-timeout.js
@bjohansebas

Copy link
Copy Markdown
MemberAuthor

@nodejs/http what are your recommendations?

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>
@github-actions

Copy link
Copy Markdown
Contributor

The notable-changePRs 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.

@bjohansebasbjohansebas 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 48 hours to land. labels Apr 19, 2026
@bjohansebasbjohansebas added the fast-track PRs that do not need to wait for 48 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-actionsgithub-actionsBot 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

@bjohansebas
bjohansebasforce-pushed the http_internals branch 2 times, most recently from dd6d1e7 to de10a15CompareJuly 12, 2026 17:21
Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
@bjohansebasbjohansebas added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 14, 2026
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 14, 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/29348029768

@bjohansebasbjohansebas added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Jul 14, 2026
@bjohansebas

Copy link
Copy Markdown
MemberAuthor

Could someone rerun the failed job?

@github-actionsgithub-actionsBot 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 Jul 14, 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/29350483155

@bjohansebasbjohansebas added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Jul 14, 2026
@github-actionsgithub-actionsBot 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 Jul 14, 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/29363308681

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

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.deprecationsIssues and PRs related to deprecations.fast-trackPRs that do not need to wait for 48 hours to land.httpIssues or PRs related to the http subsystem.needs-ciPRs that need a full CI run.needs-citgmPRs that need a CITGM CI run.notable-changePRs with changes that should be highlighted in changelogs.request-ci-failedAn error occurred while starting CI via request-ci label, and manual interventon is needed.semver-majorPRs 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

@bjohansebas@nodejs-github-bot@jasnell@mcollina@pimterry@anonrig@dario-piotrowicz@gurgunday@RafaelGSS