diff --git a/lib/modules/manager/npm/post-update/__snapshots__/yarn.spec.ts.snap b/lib/modules/manager/npm/post-update/__snapshots__/yarn.spec.ts.snap index ec217838dca065..98f903a0ce3829 100644 --- a/lib/modules/manager/npm/post-update/__snapshots__/yarn.spec.ts.snap +++ b/lib/modules/manager/npm/post-update/__snapshots__/yarn.spec.ts.snap @@ -884,7 +884,7 @@ exports[`modules/manager/npm/post-update/yarn performs lock file updates using y }, }, { - "cmd": "yarn up 'some-dep@^1.0.0'", + "cmd": "yarn up -R some-dep", "options": { "cwd": "some-dir", "encoding": "utf-8", @@ -934,7 +934,7 @@ exports[`modules/manager/npm/post-update/yarn performs lock file updates using y }, }, { - "cmd": "yarn up 'some-dep@^1.0.0' --mode=update-lockfile", + "cmd": "yarn up -R some-dep --mode=update-lockfile", "options": { "cwd": "some-dir", "encoding": "utf-8", diff --git a/lib/modules/manager/npm/post-update/yarn.ts b/lib/modules/manager/npm/post-update/yarn.ts index eb11a5f281606a..907da6bf1a009b 100644 --- a/lib/modules/manager/npm/post-update/yarn.ts +++ b/lib/modules/manager/npm/post-update/yarn.ts @@ -221,11 +221,11 @@ export async function generateLockFile( .join(' ')}${cmdOptions}` ); } else { - // `yarn up` updates to the latest release, so the range should be specified + // `yarn up -R` updates to the latest release in each range commands.push( - `yarn up ${lockUpdates + `yarn up -R ${lockUpdates // TODO: types (#7154) - .map((update) => `${update.depName!}@${update.newValue!}`) + .map((update) => `${update.depName!}`) .filter(uniqueStrings) .map(quote) .join(' ')}${cmdOptions}`