mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
feat!: resolution-mode is lowest-direct by default (#6047)
This commit is contained in:
7
.changeset/strong-papayas-learn.md
Normal file
7
.changeset/strong-papayas-learn.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@pnpm/core": major
|
||||
"@pnpm/config": major
|
||||
"pnpm": major
|
||||
---
|
||||
|
||||
`resolution-mode` is `lowest-direct` by default.
|
||||
@@ -216,7 +216,7 @@ export async function getConfig (
|
||||
],
|
||||
'recursive-install': true,
|
||||
registry: npmDefaults.registry,
|
||||
'resolution-mode': 'highest',
|
||||
'resolution-mode': 'lowest-direct',
|
||||
'resolve-peers-from-workspace-root': true,
|
||||
'save-peer': false,
|
||||
'save-workspace-protocol': 'rolling',
|
||||
|
||||
@@ -178,7 +178,7 @@ const defaults = async (opts: InstallOptions) => {
|
||||
pruneStore: false,
|
||||
rawConfig: {},
|
||||
registries: DEFAULT_REGISTRIES,
|
||||
resolutionMode: 'highest',
|
||||
resolutionMode: 'lowest-direct',
|
||||
saveWorkspaceProtocol: 'rolling',
|
||||
lockfileIncludeTarballUrl: false,
|
||||
scriptsPrependNodePath: false,
|
||||
|
||||
@@ -274,6 +274,7 @@ async function update (
|
||||
? createMatcher(dependencies)
|
||||
: undefined,
|
||||
updatePackageManifest: opts.save !== false,
|
||||
resolutionMode: opts.save === false ? 'highest' : opts.resolutionMode,
|
||||
}, dependencies)
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ test('interactive update of dev dependencies only', async () => {
|
||||
expect(
|
||||
Object.keys(lockfile.packages ?? {})
|
||||
).toStrictEqual(
|
||||
['/is-negative@1.0.1', '/is-negative@2.1.0']
|
||||
['/is-negative@1.0.0', '/is-negative@2.1.0']
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user