Skip to content

Commit 31d52b7

Browse files
authored
Use npm ci on publish scripts. (#940)
I kept seeing error on the npm version command claiming that the directory was dirty. I believe this is because version of the npm used in our builder image is >7 which uses lockfileversion 2 instead of 1 checked into the repo. Using npm ci instead, but we should also think about updating the package-lock.json to lockfileversion 2.
1 parent 94414f4 commit 31d52b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"scripts": {
7575
"apidocs": "node docgen/generate-docs.js",
7676
"build:pack": "rm -rf lib && npm install && tsc -p tsconfig.release.json && npm pack",
77-
"build:release": "npm install --production && npm install --no-save typescript firebase-admin && tsc -p tsconfig.release.json",
77+
"build:release": "npm ci --production && npm install --no-save typescript firebase-admin && tsc -p tsconfig.release.json",
7878
"build": "tsc -p tsconfig.release.json",
7979
"build:watch": "npm run build -- -w",
8080
"format": "prettier --check '**/*.{json,md,ts,yml,yaml}'",

scripts/publish.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ if [ ! -s CHANGELOG.md ]; then
7474
fi
7575
echo "Made sure there is a changelog."
7676

77-
echo "Running npm install..."
78-
npm install
79-
echo "Ran npm install."
77+
echo "Running npm ci..."
78+
npm ci
79+
echo "Ran npm ci."
8080

8181
echo "Running tests..."
8282
npm test

0 commit comments

Comments
 (0)