mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
feat: the default depth of an update is Infinity (#3210)
This commit is contained in:
5
.changeset/rich-insects-promise.md
Normal file
5
.changeset/rich-insects-promise.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-installation": major
|
||||
---
|
||||
|
||||
The default depth of an update is Infinity, not 0.
|
||||
@@ -104,7 +104,7 @@ For options that may be used with `-r`, see "pnpm help recursive"',
|
||||
shortAlias: '-g',
|
||||
},
|
||||
{
|
||||
description: 'How deep should levels of dependencies be inspected. 0 is default, which means top-level dependencies',
|
||||
description: 'How deep should levels of dependencies be inspected. Infinity is default. 0 would mean top-level dependencies only',
|
||||
name: '--depth <number>',
|
||||
},
|
||||
{
|
||||
@@ -238,12 +238,14 @@ async function update (
|
||||
devDependencies: opts.dev !== false,
|
||||
optionalDependencies: opts.optional !== false,
|
||||
}
|
||||
const depth = opts.depth ?? Infinity
|
||||
return installDeps({
|
||||
...opts,
|
||||
allowNew: false,
|
||||
depth,
|
||||
includeDirect,
|
||||
update: true,
|
||||
updateMatching: dependencies.length && dependencies.every(dep => !dep.substring(1).includes('@')) && opts.depth && opts.depth > 0 && !opts.latest
|
||||
updateMatching: dependencies.length && dependencies.every(dep => !dep.substring(1).includes('@')) && depth > 0 && !opts.latest
|
||||
? matcher(dependencies) : undefined,
|
||||
updatePackageManifest: opts.save !== false,
|
||||
}, dependencies)
|
||||
|
||||
Reference in New Issue
Block a user