diff --git a/scripts/release/__tests__/version.test.ts b/scripts/release/__tests__/version.test.ts index 43ef929db0fe..c33c5fc31b8b 100644 --- a/scripts/release/__tests__/version.test.ts +++ b/scripts/release/__tests__/version.test.ts @@ -225,8 +225,8 @@ describe('Version', () => { }), { spaces: 2 } ); - expect(execaCommand).toHaveBeenCalledWith('yarn task --task=install', { - cwd: path.join(CODE_DIR_PATH, '..'), + expect(execaCommand).toHaveBeenCalledWith('yarn install --mode=update-lockfile', { + cwd: path.join(CODE_DIR_PATH), stdio: undefined, }); } diff --git a/scripts/release/version.ts b/scripts/release/version.ts index 2b442319d454..03f608567392 100644 --- a/scripts/release/version.ts +++ b/scripts/release/version.ts @@ -238,12 +238,12 @@ export const run = async (options: unknown) => { await bumpVersionSources(currentVersion, nextVersion); await bumpAllPackageJsons({ packages, currentVersion, nextVersion, verbose }); - console.log(`⬆️ Updating lock file with ${chalk.blue('yarn install')}`); - await execaCommand(`yarn install`, { + console.log(`⬆️ Updating lock file with ${chalk.blue('yarn install --mode=update-lockfile')}`); + await execaCommand(`yarn install --mode=update-lockfile`, { cwd: path.join(CODE_DIR_PATH), stdio: verbose ? 'inherit' : undefined, }); - console.log(`✅ Updated lock file with ${chalk.blue('yarn install')}`); + console.log(`✅ Updated lock file with ${chalk.blue('yarn install --mode=update-lockfile')}`); if (process.env.GITHUB_ACTIONS === 'true') { setOutput('current-version', currentVersion);