diff --git a/.circleci/continue-config.yml b/.circleci/continue-config.yml index 15dd4f23b3..94a32bcd74 100644 --- a/.circleci/continue-config.yml +++ b/.circleci/continue-config.yml @@ -108,8 +108,10 @@ commands: - restore_cache: keys: # Prefer using the NPM cache for the package-lock hash, but fall back to any other cache too - - npm-v6-<>-{{ checksum "package-lock.json" }} - - npm-v6-<> + - npm-v7-<>-{{ checksum "package-lock.json" }} + # If you uncomment the next line, we also restore caches if package-lock.json changed in case there is no exact match. + # We decided not to do that for now for enhanced safety: Every time we update the lock file, we build the caches from scratch. Might be a little paranoid, but hardens against possible NPM bugs. + #- npm-v7-<> - run: name: Install NodeJS @@ -140,7 +142,7 @@ commands: - run: npm ci --prefer-offline --cache ~/.npm --no-audit - save_cache: - key: npm-v6-<>-{{ checksum "package-lock.json" }} + key: npm-v7-<>-{{ checksum "package-lock.json" }} paths: - ~/.npm - ~/.fnm diff --git a/package.json b/package.json index a77678944f..effdbf9dcf 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,8 @@ "scripts": { "add-licenses": "copyright-header --license-file support/license-header.txt --syntax support/license-syntax.yaml --add-path core/src:core/test --output-dir .", "bootstrap": "npm install", - "build": "npm run clean && npm run bootstrap && ./scripts/run-script.ts build", + "build": "./scripts/run-script.ts build", + "clean-build": "npm run clean && npm run bootstrap && ./scripts/run-script.ts build", "check-all": "npm run check-package-lock && npm run lint && npm run check-docs", "check-docs": "./scripts/check-docs.sh", "check-package-licenses": "./scripts/check-package-licenses.ts", diff --git a/scripts/check-docs.sh b/scripts/check-docs.sh index f745034607..a2b6f93578 100755 --- a/scripts/check-docs.sh +++ b/scripts/check-docs.sh @@ -3,7 +3,7 @@ # Needs to generate clean docs before we can validate they are up to date npm run generate-docs -git diff --quiet HEAD -- docs/ || (echo 'generated docs are not up-to-date! run \"npm run build && npm run generate-docs\" and commit the changes\n' && exit 1) +git diff --quiet HEAD -- docs/ || (echo 'generated docs are not up-to-date! run \"npm run clean-build && npm run generate-docs\" and commit the changes.\n' && exit 1) # Use "|| true" so we don't exit on empty modified_docs=$(git diff --name-status main docs README.md) || true