Contribution
Describe the user story
I always define both packageManager and devEngines.packageManager fields in package.json.
packageManager:
- Makes pnpm always use the correct version,
- Respected by
pnpm/action-setup,
- Makes
yarn install throw an error,
- I think it is used by Vercel.
devEngines.packageManager:
- Makes
npm install throw an error.
After upgrading to v11-rc.2, I get the following warning: Cannot use both "packageManager" and "devEngines.packageManager" in package.json. "packageManager" will be ignored.
As I see it, I have two options to get rid of it:
- Remove
packageManager:
- Now anyone on v10 won't be automatically switched to v11. This is not an option — my entire team has v10 installed locally.
- Remove
devEngines.packageManager:
- Now I'm migrating from the newer standard to the older one,
- There will be no error when accidentally running
npm install.
Alternatively, I can wait for someone on my team to “fix” the warning and break automatic version switching for others.
Describe the solution you'd like
Provide a transition period, where specifying both fields does not result in a warning. Maybe suppress the warning if packageManager and devEngines.packageManager specify the same version, and only show it if there's a conflict.
Not sure if that's the best path forward — I'm open to other solutions.
Describe the drawbacks of your solution
I don't see any.
Describe alternatives you've considered
Telling everyone on my team that automatic version switching only works when you manually upgrade to v11.
Contribution
Describe the user story
I always define both
packageManageranddevEngines.packageManagerfields inpackage.json.packageManager:pnpm/action-setup,yarn installthrow an error,devEngines.packageManager:npm installthrow an error.After upgrading to
v11-rc.2, I get the following warning:Cannot use both "packageManager" and "devEngines.packageManager" in package.json. "packageManager" will be ignored.As I see it, I have two options to get rid of it:
packageManager:devEngines.packageManager:npm install.Alternatively, I can wait for someone on my team to “fix” the warning and break automatic version switching for others.
Describe the solution you'd like
Provide a transition period, where specifying both fields does not result in a warning. Maybe suppress the warning if
packageManageranddevEngines.packageManagerspecify the same version, and only show it if there's a conflict.Not sure if that's the best path forward — I'm open to other solutions.
Describe the drawbacks of your solution
I don't see any.
Describe alternatives you've considered
Telling everyone on my team that automatic version switching only works when you manually upgrade to v11.