-
Notifications
You must be signed in to change notification settings - Fork 877
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
Support corepack #1157
Support corepack #1157
Conversation
This adds some basic support for using corepack to manage the tooling via the 'packageManager' field in the package.json. Here we add the ability to download a version of it along with a node version, along with the ability to execute command via corepack such as 'pnpm install' or 'yarn install' depending on the selected package manager. Later we ought to work out how to use the version packaged with the node runtime, but this was inspired by the pnpm download which is downloaded separately, and so this is too.
@eirslett, do you think there's a chance to get this PR merged and released? Corepack seems to be the best way to support modern Yarn (only way I got it to work in my project) |
@eirslett, any change this could get merged? my team would really benefit from this |
In most uses, users will want to ues the version of corepack provided with the NodeJS version they are using, and the plugin now supports this mode of usage by default if no corepack version is explicitly provided.
I've added one more commit to use the corepack version provided with the Node install if no override version is provided (which is probably what most people want to do) |
Thanks! Looks like this is a much requested feature, so I'll merge it in! (given that the test suite works) |
@eirslett Anything I can do to help get this released? I was slightly thrown off by the corepack targets in the readme that didn't seem to work :-) |
Hey! Sorry, I tried to release it but I got some auth issues from Sonatype. It will probably take a few hours of digging :-/ |
Thanks for highlighting. That's very disappointing :( - tho as yet they've not put a timeframe on dropping it from the bundle.
I would suggest that until they do set a timeframe, we can safely continue to use the bundled version. Since bumping the node version on the plugin is an explicit step, even if we changed nothing and a new version of Node is published without corepack - nothing should break for existing users' builds. When they bump their node version on the plugin, they'll pretty quickly realise they need to set a corepack version as well (which, from what I read, should still work and be a supported config). |
* Use eirslett/frontend-maven-plugin#1157 * Test 1 * Test 2 * Test 3 * Testing is finished * #9772 (comment) * #9772 (comment)
Summary
Adds support for using
corepack
to manage the package manager in use on a given build project.Tests and Documentation
README is updated, an integration example has been provided
Fixes: #1032