mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
6
.changeset/hot-dingos-act.md
Normal file
6
.changeset/hot-dingos-act.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/manifest-utils": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Dependencies specified via `*` should be updated to semver ranges by `pnpm update` [#5681](https://github.com/pnpm/pnpm/issues/5681).
|
||||
@@ -19,7 +19,6 @@ export function getPref (
|
||||
export function createVersionSpec (version: string | undefined, opts: { pinnedVersion?: PinnedVersion, rolling?: boolean }) {
|
||||
switch (opts.pinnedVersion ?? 'major') {
|
||||
case 'none':
|
||||
return '*'
|
||||
case 'major':
|
||||
if (opts.rolling) return '^'
|
||||
return !version ? '*' : `^${version}`
|
||||
|
||||
@@ -25,7 +25,7 @@ test('getPref()', () => {
|
||||
getPref('foo', 'foo', '4.0.0', {
|
||||
pinnedVersion: 'none',
|
||||
})
|
||||
).toEqual('*')
|
||||
).toEqual('^4.0.0')
|
||||
|
||||
expect(
|
||||
getPref('foo', 'foo', undefined, {
|
||||
|
||||
Reference in New Issue
Block a user