Skip to content
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

fix(builtin): yarn_install with vendored yarn .cjs file breaks #3350

Merged
merged 1 commit into from
Mar 1, 2022

Conversation

devversion
Copy link
Contributor

yarn_install allows for a vendored/custom Yarn JavaScript file. To ensure
that Yarn runs with the proper Node version, yarn_install calls the JS file
with the host NodeJS version also installed through Bazel. Currently the detection
logic does not account for .cjs or .mjs. This is a little confusing as the
install continues to work but breaks surprisingly in Windows then, or when a engines
requirement is no longer satisifed (there are more reasons as well)

We should support cjs and mjs to avoid confusion, and especially cjs
since Yarn itself always vendors itself with that extension!

Fixes #3349

devversion added a commit to devversion/dev-infra that referenced this pull request Mar 1, 2022
More details here: bazel-contrib/rules_nodejs#3350.

This commit adds a little wrapper script as temporary workaround to fix
CI.
`yarn_install` allows for a vendored/custom Yarn JavaScript file. To ensure
that Yarn runs with the proper Node version, `yarn_install` calls the JS file
with the host NodeJS version also installed through Bazel. Currently the detection
logic does not account for `.cjs` or `.mjs`. This is a little confusing as the
install continues to work but breaks surprisingly in Windows then, or when a engines
requirement is no longer satisifed (there are more reasons as well)

We should support `cjs` and `mjs` to avoid confusion, and especially `cjs`
since Yarn itself always vendors itself with that extension!
@devversion devversion marked this pull request as ready for review March 1, 2022 21:35
devversion added a commit to angular/dev-infra that referenced this pull request Mar 1, 2022
More details here: bazel-contrib/rules_nodejs#3350.

This commit adds a little wrapper script as temporary workaround to fix
CI.
@alexeagle alexeagle merged commit 4a025c0 into bazel-contrib:stable Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vendored Yarn support not compatible with Windows
2 participants