AUTO_PIN should not change to different package manager
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 279
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
What would you like?
Corepack AUTO_PIN should not attempt to automatically change to a different package manager in a project, such as attempting to change an npm project into a Yarn project.
Why is this needed?
By default, and if the environment variable If COREPACK_ENABLE_AUTO_PIN is not set to 0COREPACK_ENABLE_AUTO_PIN is set to 1, then Corepack adds a packageManager field to an existing package.json file if the field is not present.
If a project is identifiable through a lock file
| Lock file | Package Manager |
|---|---|
package-lock.json |
npm |
pnpm-lock.yaml |
pnpm |
yarn.lock |
Yarn Classic |
yarn.lock |
Yarn Modern |
then AUTO_PIN should not attempt to add a packageManager field for a different package manager.
Other
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Corepack's AUTO_PIN behavior controlled by COREPACK_ENABLE_AUTO_PIN and inspect how it reads package.json and package-lock.json, pnpm-lock.yaml, or yarn.lock. The change is complete when AUTO_PIN does not add a packageManager field for a package manager different from the detected lockfile, as described in related issue 691.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100