Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(yarn): use yarn up -R for lock file updating #21309

Merged
merged 2 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/npm/post-update/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ export async function generateLockFile(
} else {
// `yarn up` updates to the latest release, so the range should be specified
viceice marked this conversation as resolved.
Show resolved Hide resolved
rarkins marked this conversation as resolved.
Show resolved Hide resolved
commands.push(
`yarn up ${lockUpdates
`yarn up -R ${lockUpdates
// TODO: types (#7154)
.map((update) => `${update.depName!}@${update.newValue!}`)
.map((update) => `${update.depName!}`)
rarkins marked this conversation as resolved.
Show resolved Hide resolved
.filter(uniqueStrings)
.map(quote)
.join(' ')}${cmdOptions}`
Expand Down