mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-31 21:42:15 -04:00
When save-prefix in .npmrc is set to an empty string, pnpm does not honor it and sets the package version with the default ^ as a prefix. Close #3414 Co-authored-by: amit <amit@enso.security>
5 lines
223 B
TypeScript
5 lines
223 B
TypeScript
export default function getPinnedVersion (opts: { saveExact?: boolean, savePrefix?: string }) {
|
|
if (opts.saveExact === true || opts.savePrefix === '') return 'patch'
|
|
return opts.savePrefix === '~' ? 'minor' : 'major'
|
|
}
|