-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: add npm version management for publish command #10092
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
base: main
Are you sure you want to change the base?
Conversation
zkochan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to use the devEngines.packageManager field for this. But then pnpm will fail to run because it will tell that another package manager should be used... We could probably have an array of package managers. So, both pnpm and npm.
|
Sounds good, that approach should also fix #9924. |
alleviates pnpm/pnpm#10092
| } | ||
|
|
||
| manifest[dependenciesFieldName] ??= {} | ||
| manifest[dependenciesFieldName]![packageManagerName] = `packageManager:${versionToUse}` |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
Fixes #9812 (comment)
Added support for specifying npm version in
pnpm-workspace.yamlto enable features like OIDC publishing that require specific npm versions.When running pnpm publish, the specified npm version is automatically downloaded, cached to
$PNPM_HOME/.tools/npm/{version}/, and used for publishing.