esm: fix loader hooks accepting too many arguments#44109
Merged
nodejs-github-bot merged 7 commits intonodejs:mainfrom Aug 4, 2022
Merged
esm: fix loader hooks accepting too many arguments#44109nodejs-github-bot merged 7 commits intonodejs:mainfrom
nodejs-github-bot merged 7 commits intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
cc @targos |
cspotcode
reviewed
Aug 2, 2022
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.
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 |
GeoffreyBooth
approved these changes
Aug 2, 2022
aduh95
reviewed
Aug 2, 2022
guybedford
approved these changes
Aug 3, 2022
account for prototype pollution in Array & Object
aduh95
reviewed
Aug 3, 2022
consolidate assignment & set arg0 default
validateArgs array → separate args
…arguments ReflectApply → direct invocation w separate args
aduh95
reviewed
Aug 3, 2022
aduh95
reviewed
Aug 3, 2022
aduh95
approved these changes
Aug 3, 2022
Collaborator
aduh95
reviewed
Aug 3, 2022
Collaborator
GeoffreyBooth
approved these changes
Aug 3, 2022
Collaborator
Collaborator
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 |
Member
Author
Grr |
Collaborator
|
Landed in e0b440a |
17 tasks
16 tasks
targos
pushed a commit
that referenced
this pull request
Aug 6, 2022
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>
This was referenced Aug 7, 2022
danielleadams
pushed a commit
that referenced
this pull request
Aug 16, 2022
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>
ruyadorno
pushed a commit
that referenced
this pull request
Aug 23, 2022
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>
Fyko
pushed a commit
to Fyko/node
that referenced
this pull request
Sep 15, 2022
PR-URL: nodejs#44109 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
guangwong
pushed a commit
to noslate-project/node
that referenced
this pull request
Oct 10, 2022
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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