From d6dbc9a3aec1f4460546582fad92c1e5d6ee901e Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Fri, 6 May 2022 12:11:18 +0200 Subject: [PATCH] fix(version): include the updated root package-lock.json file in commits --- packages/version/src/version-command.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/version/src/version-command.ts b/packages/version/src/version-command.ts index d1d10c41..b5c5f51f 100644 --- a/packages/version/src/version-command.ts +++ b/packages/version/src/version-command.ts @@ -600,7 +600,7 @@ export class VersionCommand extends Command { }) ); - chain = chain.then(() => { + chain = chain.then(() => // update modern lockfile (version 2 or higher) when exist in the project root loadPackageLockFileWhenExists(rootPath) .then(lockFileResponse => { @@ -611,15 +611,15 @@ export class VersionCommand extends Command { } // save the lockfile, only once, after all package versions were updated - saveUpdatedLockJsonFile(lockFileResponse.path, lockFileResponse.json) + return saveUpdatedLockJsonFile(lockFileResponse.path, lockFileResponse.json) .then((lockfilePath) => { if (lockfilePath) { changedFiles.add(lockfilePath); } }); } - }); - }); + }) + ); if (!independentVersions) { this.project.version = this.globalVersion;