nodejs / nodejs/corepack

AUTO_PIN should not change to different package manager

Open
#695 1 comment 0 reactions 0 assignees View on GitHub

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 COREPACK_ENABLE_AUTO_PIN is not set to 0 If COREPACK_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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.