Skip to content

Commit 89c3894

Browse files
committed
ci: updating package-lock.json during version update
For some reason the optional dependencies show up as regular dependencies. We have to run `npm install` again to ensure that they are not left there.
1 parent 4b7ba1a commit 89c3894

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/version.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ async function main() {
7979
encoding: 'utf-8',
8080
shell: platform === 'win32' ? true : false,
8181
});
82+
console.error('Running npm install again to update the package-lock.json:');
83+
const installArgs_ = [
84+
'install',
85+
'--ignore-scripts',
86+
'--silent',
87+
'--package-lock-only'
88+
];
89+
childProcess.execFileSync('npm', installArgs_, {
90+
stdio: ['inherit', 'inherit', 'inherit'],
91+
windowsHide: true,
92+
encoding: 'utf-8',
93+
shell: platform === 'win32' ? true : false,
94+
});
8295
}
8396
}
8497
/* eslint-enable no-console */

0 commit comments

Comments
 (0)