Skip to content
Snippets Groups Projects
Unverified Commit 1c004913 authored by Misha Kaletsky's avatar Misha Kaletsky Committed by GitHub
Browse files

fix: add currentValue to yarn upgrade command (#6759)

parent 3305bfc3
No related branches found
No related tags found
No related merge requests found
...@@ -222,7 +222,7 @@ Array [ ...@@ -222,7 +222,7 @@ Array [
}, },
}, },
Object { Object {
"cmd": "yarn upgrade some-dep --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts", "cmd": "yarn upgrade some-dep@^1.2.3 --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts",
"options": Object { "options": Object {
"cwd": "some-dir", "cwd": "some-dir",
"encoding": "utf-8", "encoding": "utf-8",
...@@ -261,7 +261,7 @@ Array [ ...@@ -261,7 +261,7 @@ Array [
}, },
}, },
Object { Object {
"cmd": "yarn upgrade some-dep --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts", "cmd": "yarn upgrade some-dep@^1.2.3 --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts",
"options": Object { "options": Object {
"cwd": "some-dir", "cwd": "some-dir",
"encoding": "utf-8", "encoding": "utf-8",
......
...@@ -65,6 +65,7 @@ describe(getName(__filename), () => { ...@@ -65,6 +65,7 @@ describe(getName(__filename), () => {
const res = await yarnHelper.generateLockFile('some-dir', {}, {}, [ const res = await yarnHelper.generateLockFile('some-dir', {}, {}, [
{ {
depName: 'some-dep', depName: 'some-dep',
currentValue: '^1.2.3',
isLockfileUpdate: true, isLockfileUpdate: true,
}, },
]); ]);
...@@ -87,6 +88,7 @@ describe(getName(__filename), () => { ...@@ -87,6 +88,7 @@ describe(getName(__filename), () => {
const res = await yarnHelper.generateLockFile('some-dir', {}, {}, [ const res = await yarnHelper.generateLockFile('some-dir', {}, {}, [
{ {
depName: 'some-dep', depName: 'some-dep',
currentValue: '^1.2.3',
isLockfileUpdate: true, isLockfileUpdate: true,
}, },
]); ]);
......
...@@ -94,7 +94,7 @@ export async function generateLockFile( ...@@ -94,7 +94,7 @@ export async function generateLockFile(
// rangeStrategy = update-lockfile // rangeStrategy = update-lockfile
const lockUpdates = upgrades const lockUpdates = upgrades
.filter((upgrade) => upgrade.isLockfileUpdate) .filter((upgrade) => upgrade.isLockfileUpdate)
.map((upgrade) => upgrade.depName); .map((upgrade) => `${upgrade.depName}@${upgrade.currentValue}`);
if (lockUpdates.length) { if (lockUpdates.length) {
logger.debug('Performing lockfileUpdate (yarn)'); logger.debug('Performing lockfileUpdate (yarn)');
commands.push( commands.push(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment