Uh oh!
There was an error while loading. Please reload this page.
esm: fix loader hooks accepting too many arguments - #44109
Conversation
Review requested:
cc @targos |
cspotcode
left a comment
There was a problem hiding this comment.
Looks good to me. Github won't let me mark this review as "Approve" so I submitted it as "Comment" instead. I asked a question but it's not a blocker.
Uh oh!
There was an error while loading. Please reload this page.
cspotcode
commented
Aug 2, 2022
Noting for completeness: the code before this pull request also assumed 2 args, so this PR is not introducing an additional limitation or restriction; it was already like that. The switch-case did not check if |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
account for prototype pollution in Array & Object
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
consolidate assignment & set arg0 default
validateArgs array → separate args
…arguments ReflectApply → direct invocation w separate args
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Aug 3, 2022
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Aug 3, 2022
nodejs-github-bot
commented
Aug 4, 2022
nodejs-github-bot
commented
Aug 4, 2022
Commit Queue failed- Loading data for nodejs/node/pull/44109 ✔ Done loading data for nodejs/node/pull/44109 ----------------------------------- PR info ------------------------------------ Title esm: fix loader hooks accepting too many arguments (#44109) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch JakobJingleheimer:fix/esm-loader-accepts-too-many-args -> nodejs:main Labels esm, needs-ci, loaders, commit-queue-squash Commits 7 - esm: fix loader hooks accepting too many arguments - fixup! esm: fix loader hooks accepting too many arguments - fixup! fixup! esm: fix loader hooks accepting too many arguments - fixup! fixup! fixup! esm: fix loader hooks accepting too many arguments - fixup! fixup! fixup! fixup! esm: fix loader hooks accepting too many … - improve substring match - correct context arg passed to nextHook fn Committers 1 - Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com> PR-URL: https://github.com/nodejs/node/pull/44109 Reviewed-By: Geoffrey Booth Reviewed-By: Guy Bedford Reviewed-By: Antoine du Hamel ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/44109 Reviewed-By: Geoffrey Booth Reviewed-By: Guy Bedford Reviewed-By: Antoine du Hamel -------------------------------------------------------------------------------- ℹ This PR was created on Tue, 02 Aug 2022 20:24:18 GMT ✔ Approvals: 3 ✔ - Geoffrey Booth (@GeoffreyBooth) (TSC): https://github.com/nodejs/node/pull/44109#pullrequestreview-1061107695 ✔ - Guy Bedford (@guybedford): https://github.com/nodejs/node/pull/44109#pullrequestreview-1059598743 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/44109#pullrequestreview-1060885869 ✖ This PR needs to wait 11 more hours to land ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-08-04T05:28:44Z: https://ci.nodejs.org/job/node-test-pull-request/45830/ - Querying data for job/node-test-pull-request/45830/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/2795302869 |
JakobJingleheimer
commented
Aug 4, 2022
Grr |
nodejs-github-bot
commented
Aug 4, 2022
Landed in e0b440a |
PR-URL: #44109 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44109 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44109 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs/node#44109 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
When a user supplies too many arguments, those beyond the 2nd arg are currently blindly passed to the
next<HookName>function. Now, those extra args are ignored. It assumes bothresolveandloadshare the same number of args—which they currently do; if that changes, this will need to be updated.Fixes#44108