node icon indicating copy to clipboard operation
node copied to clipboard

lib: deprecate _http_*

Open bjohansebas opened this issue 6 months ago • 7 comments

close #58534

bjohansebas avatar May 31 '25 19:05 bjohansebas

Review requested:

  • [ ] @nodejs/http
  • [ ] @nodejs/net

nodejs-github-bot avatar May 31 '25 19:05 nodejs-github-bot

@nodejs/http @mcollina

jasnell avatar May 31 '25 23:05 jasnell

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

jasnell avatar May 31 '25 23:05 jasnell

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.

bjohansebas avatar May 31 '25 23:05 bjohansebas

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.

jasnell avatar May 31 '25 23:05 jasnell

Codecov Report

Attention: Patch coverage is 97.49006% with 120 lines in your changes missing coverage. Please review.

Project coverage is 90.25%. Comparing base (f497881) to head (2103d6f). Report is 202 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/http/outgoing.js 95.76% 48 Missing and 3 partials :warning:
lib/internal/http/server.js 97.07% 33 Missing and 3 partials :warning:
lib/internal/http/client.js 97.99% 20 Missing :warning:
lib/internal/http/agent.js 98.17% 10 Missing :warning:
lib/internal/http/incoming.js 99.33% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58535      +/-   ##
==========================================
+ Coverage   90.23%   90.25%   +0.01%     
==========================================
  Files         635      641       +6     
  Lines      187580   187832     +252     
  Branches    36860    36862       +2     
==========================================
+ Hits       169265   169520     +255     
+ Misses      11101    11095       -6     
- Partials     7214     7217       +3     
Files with missing lines Coverage Δ
lib/_http_agent.js 100.00% <100.00%> (+1.82%) :arrow_up:
lib/_http_client.js 100.00% <100.00%> (+2.00%) :arrow_up:
lib/_http_common.js 100.00% <100.00%> (ø)
lib/_http_incoming.js 100.00% <100.00%> (+0.66%) :arrow_up:
lib/_http_outgoing.js 100.00% <100.00%> (+4.23%) :arrow_up:
lib/_http_server.js 100.00% <100.00%> (+3.16%) :arrow_up:
lib/http.js 100.00% <100.00%> (ø)
lib/https.js 99.30% <100.00%> (ø)
lib/internal/child_process.js 95.06% <100.00%> (ø)
lib/internal/http/common.js 100.00% <100.00%> (ø)
... and 8 more

... and 25 files with indirect coverage changes

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

codecov[bot] avatar Jun 01 '25 00:06 codecov[bot]

@nodejs/http what are your recommendations?

bjohansebas avatar Jun 14 '25 18:06 bjohansebas