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

Ability to set Corepack version #212

Closed
v1nc3n4 opened this issue Oct 11, 2023 · 4 comments
Closed

Ability to set Corepack version #212

v1nc3n4 opened this issue Oct 11, 2023 · 4 comments
Assignees
Labels
DONE Issue is fixed and ready to be delivered Feature Request of a new feature or a behaviour change
Milestone

Comments

@v1nc3n4
Copy link
Member

v1nc3n4 commented Oct 11, 2023

Node.js/Corepack bundles provided in Node.js distributions frequently suffer from bugs that avoid installing package manager or dependencies, and lead to failures when task installFrontend is executed. As a end-user, it is difficult to identify the causes of such failures, and how to work around them quickly (this issue for example).

The plugin could provide a property allowing the end-user to replace the Corepack release bundled by default in the Node.js distribution with another one (typically the latest). A new task installCorepack could use this property to update Corepack release.

DSL

frontend {
    // may be null (by default), or "latest", or a concrete version number
    corepackVersion.set("latest")
}

Task installCorepack

  • Dependency graph: installPackageManager -> installCorepack -> installNode
  • Skippable: if corepackVersion is null
  • Inputs: Property<String> corepackVersion
  • Outputs: DirectoryProperty <nodeInstallDirectory>/node_modules/corepack
@v1nc3n4 v1nc3n4 added the Feature Request of a new feature or a behaviour change label Oct 11, 2023
@v1nc3n4 v1nc3n4 self-assigned this Oct 11, 2023
@MBelniak
Copy link

Yes! I'd love to use COREPACK_NPM_REGISTRY, but it's not there in the currently used version of corepack yet. I wish I could set the version of corepack to something newer.

@v1nc3n4
Copy link
Member Author

v1nc3n4 commented Dec 14, 2023

Hi @MBelniak,

Thank you for using the plugin and your feedback.
I'm not sure I can deal with this new feature before March 2024. You may look at this comment for
a workaround until the feature is released.

BR

@MBelniak
Copy link

I switched to gradle-node-plugin instead :p

@v1nc3n4
Copy link
Member Author

v1nc3n4 commented Dec 14, 2023

Great! I wish you can choose the version of Corepack with a simple configuration option if this feature exists with this plugin. Otherwise, feel free to get in touch with next releases here.

BR

@v1nc3n4 v1nc3n4 added this to the 8.1.0 milestone May 16, 2024
@v1nc3n4 v1nc3n4 added the IN PROGRESS Design and implementation are in progress label Jun 8, 2024
@v1nc3n4 v1nc3n4 added DONE Issue is fixed and ready to be delivered and removed IN PROGRESS Design and implementation are in progress labels Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DONE Issue is fixed and ready to be delivered Feature Request of a new feature or a behaviour change
Projects
None yet
Development

No branches or pull requests

2 participants