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
Verify version when resolving Node builtin polyfills #8387
Merged
Merged
Conversation
This file contains 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
mischnic
force-pushed
the
node-builtins-monorepo
branch
from
August 10, 2022 09:44
6092f6a
to
69ef97a
Compare
mischnic
force-pushed
the
node-builtins-monorepo
branch
from
August 24, 2022 17:39
69ef97a
to
02290e2
Compare
devongovett
reviewed
Aug 25, 2022
mischnic
force-pushed
the
node-builtins-monorepo
branch
from
August 31, 2022 08:28
65884f9
to
4ecff55
Compare
mischnic
commented
Aug 31, 2022
@@ -54,6 +54,7 @@ | |||
"mocha-junit-reporter": "^2.0.0", | |||
"mocha-multi-reporters": "^1.5.1", | |||
"prettier": "2.4.1", | |||
"punycode": "^1.4.1", |
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.
The url
polyfill package declares punycode as a dependency
but then does require("punycode")
which uses the node polyfill (as opposed to require("punycode/")
). I needed to declare this version to get the integration tests to pass....
devongovett
approved these changes
Sep 3, 2022
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.
This will call
packageManager.resolve
for every resolution of a Node builtin with the correct range that should be used to catch cases where another instance of some Node builtin polyfill was pulled in by some other dependency, be it in the same package, or in a monorepo situationIf it's the wrong version, it will either autoinstall, or error (using the existing autoinstall logic):
Questions:
Previously, the polyfill was resolved from the actual source file but autoinstalled into the project root. We either need to install it into the local package (what I've done now), or resolve it relative from the monorepo root. (So that resolution base = autoinstall target)Now, all builtin polyfills are resolved from the project rootpackageManager.resolve
is slow? I suspect there won't be that many Node builtins anyway