From 9fdcb33e66d02d2f78db38d4ba045e0a85717cc3 Mon Sep 17 00:00:00 2001 From: Tyler Stark Date: Thu, 5 May 2022 09:56:02 -0500 Subject: [PATCH 1/2] Use npm ci on publish scripts This commit is a copy of [firebase/firebase-functions#940](https://github.com/firebase/firebase-functions/pull/940) --- package.json | 2 +- scripts/publish.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 41e3a6e..500eabd 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "npm i && node_modules/.bin/tsc -p tsconfig.release.json", "build:pack": "npm prune --production && rm -rf lib && npm install && node_modules/.bin/tsc -p tsconfig.release.json && npm pack && npm install", - "build:release": "npm install --production && npm install --no-save typescript firebase-functions firebase-admin && node_modules/.bin/tsc -p tsconfig.release.json", + "build:release": "npm ci --production && npm install --no-save typescript firebase-functions firebase-admin && node_modules/.bin/tsc -p tsconfig.release.json", "lint": "node_modules/.bin/tslint src/{**/*,*}.ts spec/{**/*,*}.ts", "pretest": "node_modules/.bin/tsc", "test": "mocha .tmp/spec/index.spec.js", diff --git a/scripts/publish.sh b/scripts/publish.sh index 7d9cb33..5568c82 100644 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -75,8 +75,8 @@ fi echo "Made sure there is a changelog." echo "Running npm install..." -npm install -echo "Ran npm install." +npm ci +echo "Ran npm ci." echo "Running tests..." npm test From 5300839a3457d8662bed7871636eeeda2204ea8f Mon Sep 17 00:00:00 2001 From: Tyler Stark Date: Thu, 5 May 2022 13:41:34 -0500 Subject: [PATCH 2/2] Update scripts/publish.sh Co-authored-by: Daniel Lee --- scripts/publish.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index 5568c82..7f87a0b 100644 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -74,7 +74,7 @@ if [ ! -s CHANGELOG.md ]; then fi echo "Made sure there is a changelog." -echo "Running npm install..." +echo "Running npm ci..." npm ci echo "Ran npm ci."