-
Notifications
You must be signed in to change notification settings - Fork 31.3k
util: preserve length
of deprecated functions
#57806
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
util: preserve length
of deprecated functions
#57806
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely shouldn't ever do a proxy :-) this is great tho
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57806 +/- ##
=======================================
Coverage 90.21% 90.21%
=======================================
Files 630 630
Lines 185518 185535 +17
Branches 36383 36378 -5
=======================================
+ Hits 167360 167376 +16
- Misses 11033 11048 +15
+ Partials 7125 7111 -14
🚀 New features to boost your workflow:
|
Commit Queue failed- Loading data for nodejs/node/pull/57806 ✔ Done loading data for nodejs/node/pull/57806 ----------------------------------- PR info ------------------------------------ Title util: preserve `length` of deprecated functions (#57806) Author Livia Medeiros <[email protected]> (@LiviaMedeiros) Branch LiviaMedeiros:util-deprecate-preserve-length -> nodejs:main Labels util, author ready, needs-ci Commits 2 - util: preserve `length` of deprecated functions - squash: mitigate prototype pollution Committers 1 - LiviaMedeiros <[email protected]> PR-URL: https://github.com/nodejs/node/pull/57806 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/57806 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Wed, 09 Apr 2025 16:07:02 GMT ✔ Approvals: 6 ✔ - Jordan Harband (@ljharb): https://github.com/nodejs/node/pull/57806#pullrequestreview-2754128591 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/57806#pullrequestreview-2757725368 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/57806#pullrequestreview-2758333132 ✔ - Ruben Bridgewater (@BridgeAR) (TSC): https://github.com/nodejs/node/pull/57806#pullrequestreview-2758600034 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/57806#pullrequestreview-2758723356 ✔ - Marco Ippolito (@marco-ippolito) (TSC): https://github.com/nodejs/node/pull/57806#pullrequestreview-2760421642 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-04-10T01:42:16Z: https://ci.nodejs.org/job/node-test-pull-request/66180/ - Querying data for job/node-test-pull-request/66180/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 57806 From https://github.com/nodejs/node * branch refs/pull/57806/merge -> FETCH_HEAD ✔ Fetched commits as 795dd8eb7988..782cee8be4a5 -------------------------------------------------------------------------------- [main 6a41eac7a6] util: preserve `length` of deprecated functions Author: LiviaMedeiros <[email protected]> Date: Wed Apr 9 23:46:59 2025 +0800 2 files changed, 22 insertions(+) [main 8da3941862] squash: mitigate prototype pollution Author: LiviaMedeiros <[email protected]> Date: Thu Apr 10 00:42:57 2025 +0800 1 file changed, 10 insertions(+), 2 deletions(-) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. Rebasing (2/4) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- util: preserve `length` of deprecated functionshttps://github.com/nodejs/node/actions/runs/14407403600 |
Landed in 86f86a2 |
More radical (and probably breaking some existing tests) solution would be wrapping original function in
Proxy
instead of separatedeprecated()
function.