Skip to content

Commit 74348a3

Browse files
committedJul 12, 2022
Run npm install to update version in package-lock.json, too
1 parent 648279c commit 74348a3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
 

‎package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎scripts/setVersion.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* This file is used only in dev time, feel free to use es6
44
*/
55
const fs = require("fs");
6-
const path = require("path");
6+
const { execSync } = require("child_process");
77

88
const packageSpec = JSON.parse(fs.readFileSync("./package.json", "utf8"));
99
const { version, name } = packageSpec;
@@ -48,3 +48,6 @@ let package_name = ref "${name}"
4848
`,
4949
"utf8"
5050
);
51+
52+
// For some reason, the version number is also in npm's package-lock.json. This updates it.
53+
execSync("npm i --ignore-scripts", { stdio: "inherit" });

0 commit comments

Comments
 (0)
Please sign in to comment.