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

Add support for corepack the node package manager manager #18525

Closed
tobni opened this issue Mar 18, 2023 · 0 comments · Fixed by #18748
Closed

Add support for corepack the node package manager manager #18525

tobni opened this issue Mar 18, 2023 · 0 comments · Fixed by #18748
Labels
backend: JavaScript JavaScript backend-related issues enhancement

Comments

@tobni
Copy link
Contributor

tobni commented Mar 18, 2023

Is your feature request related to a problem? Please describe.
Currently npm is installed as a bi-effect of downloading node. This assumption is fine as long npm is the package manager of choice, and the user doesn't much care which npm version they use.

Describe the solution you'd like
node distributions now ship with corepack, a wrapper script for managing package manager versions. Pants should use
this script to install the package manager version users request. Corepack ships with good features, such as a "good known release" list which pants can rely on.
Describe alternatives you've considered
Manage package managers in pants via template tool downloads or sandboxing npm installations. Essentially re-invent the wheel.

Additional context
🤷‍♂️

@huonw huonw added the backend: JavaScript JavaScript backend-related issues label Mar 18, 2023
stuhood pushed a commit that referenced this issue Apr 18, 2023
Enables users to configure a wanted version of a package manager blessed
by Corepack, either by:
1. Setting a package manager version in the nodejs subsystem; or
2. Placing a `packageManager` entry in their `package.json`, the feature
of Corepack.

This is a prerequisite for pnpm and yarn support.

Fixes #18525.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: JavaScript JavaScript backend-related issues enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants