From 41d1fe2e2792ec7637e57bbc921f45520992250d Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Mon, 26 Sep 2022 17:32:55 +0200 Subject: [PATCH] feat(build): Have npm scripts run npm ci first where applicable Have any npm script that have external effects (e.g. publishing an npm package, pushing a new version to appengine, or updating GitHub Pages) start by running npm ci to ensure that all dependencies are up-to-date with respect to package-lock.json. (This is done by npm and not a gulp script because gulp itself might need updating. So might npm, but that is less likely to make any difference to what gets published/pushed.) --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index fca7b345a..5403c1acf 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "clean:build": "gulp cleanBuildDir", "clean:release": "gulp cleanReleaseDir", "checkin": "gulp checkin", - "deployDemos": "gulp deployDemos", - "deployDemos:beta": "gulp deployDemosBeta", + "deployDemos": "npm ci && gulp deployDemos", + "deployDemos:beta": "npm ci && gulp deployDemosBeta", "format": "gulp format", "format:sortrequires": "gulp sortRequires", "generate:langfiles": "gulp generateLangfiles", @@ -44,8 +44,8 @@ "package": "gulp package", "prepare": "gulp prepare", "prepareDemos": "gulp prepareDemos", - "publish": "gulp publish", - "publish:beta": "gulp publishBeta", + "publish": "npm ci && gulp publish", + "publish:beta": "npm ci && gulp publishBeta", "recompile": "gulp recompile", "release": "gulp gitCreateRC", "start": "http-server ./ -o /tests/playground.html -c-1", @@ -53,7 +53,7 @@ "test:generators": "tests/scripts/run_generators.sh", "test:mocha:interactive": "http-server ./ -o /tests/mocha/index.html -c-1", "test:compile:advanced": "gulp buildAdvancedCompilationTest --debug", - "updateGithubPages": "gulp gitUpdateGithubPages" + "updateGithubPages": "npm ci && gulp gitUpdateGithubPages" }, "main": "./index.js", "umd": "./blockly.min.js",