Skip to content

http,https: give names to anonymous or misnamed functions #58180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LiviaMedeiros
Copy link
Member

Before this change, the following functions had either empty string or wrappedFn as function name:

  • http.OutgoingMessage.prototype.cork
  • http.OutgoingMessage.prototype.uncork
  • http.Server.prototype.close
  • http.Server.prototype.closeAllConnections
  • http.Server.prototype.closeIdleConnections
  • http.Server.prototype[Symbol.asyncDispose]
  • http.Server.prototype[nodejs.rejection]
  • http.validateHeaderName
  • http.validateHeaderValue
  • https.Server.prototype.closeAllConnections
  • https.Server.prototype.closeIdleConnections
  • https.Server.prototype.close

Affected functions:
- http.OutgoingMessage.prototype.cork
- http.OutgoingMessage.prototype.uncork
- http.Server.prototype.close
- http.Server.prototype.closeAllConnections
- http.Server.prototype.closeIdleConnections
- http.Server.prototype[Symbol.asyncDispose]
- http.Server.prototype[nodejs.rejection]
- http.validateHeaderName
- http.validateHeaderValue
- https.Server.prototype.closeAllConnections
- https.Server.prototype.closeIdleConnections
- https.Server.prototype.close
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added http Issues or PRs related to the http subsystem. https Issues or PRs related to the https subsystem. needs-ci PRs that need a full CI run. labels May 5, 2025
Comment on lines +622 to +623
Server.prototype[EE.captureRejectionSymbol] =
assignFunctionName(EE.captureRejectionSymbol, function(err, event, ...args) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Linter seems to be happy with this but better suggestions would be appreciated.

Copy link

codecov bot commented May 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.15%. Comparing base (a44ccac) to head (27ff9d0).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58180      +/-   ##
==========================================
- Coverage   90.17%   90.15%   -0.03%     
==========================================
  Files         630      630              
  Lines      186503   186759     +256     
  Branches    36618    36654      +36     
==========================================
+ Hits       168188   168365     +177     
- Misses      11120    11192      +72     
- Partials     7195     7202       +7     
Files with missing lines Coverage Δ
lib/_http_outgoing.js 95.76% <100.00%> (+<0.01%) ⬆️
lib/_http_server.js 97.07% <100.00%> (+0.08%) ⬆️
lib/https.js 99.30% <100.00%> (ø)

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

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem. https Issues or PRs related to the https subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants