diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6d591200b2a..274ca19c828 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -15,10 +15,8 @@ jobs: - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: '*' - cache: 'npm' - cache-dependency-path: 'npm-shrinkwrap.json' - check-latest: true + node-version: lts/* + cache: npm - name: Install dependencies run: npm ci --no-audit && npm prune --production - name: Get size diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index fe5b45bc592..986d6f20ea5 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -31,14 +31,13 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'npm' - cache-dependency-path: 'npm-shrinkwrap.json' + cache: npm check-latest: true - name: Cache verdaccio storage uses: actions/cache@v3 with: path: ./.verdaccio-storage - key: verdaccio-e2e-cli-${{ hashFiles('./npm-shrinkwrap.json') }} + key: verdaccio-e2e-cli-${{ hashFiles('./package-lock.json') }} - name: Install dependencies run: npm ci --no-audit - name: Install pnpm diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index c7a11e2dfc1..003cde42e62 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,8 +47,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'npm' - cache-dependency-path: 'npm-shrinkwrap.json' + cache: npm check-latest: true if: '${{!steps.release-check.outputs.IS_RELEASE}}' - name: Setup Deno diff --git a/.github/workflows/legacy-tests.yml b/.github/workflows/legacy-tests.yml index 5a30777129b..83d8e94dbd7 100644 --- a/.github/workflows/legacy-tests.yml +++ b/.github/workflows/legacy-tests.yml @@ -47,8 +47,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'npm' - cache-dependency-path: 'npm-shrinkwrap.json' + cache: npm check-latest: true if: '${{!steps.release-check.outputs.IS_RELEASE}}' - name: Setup Deno diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 5a887e26de9..7280c8b5fe2 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -11,10 +11,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '*' - cache: 'npm' - check-latest: true - cache-dependency-path: 'npm-shrinkwrap.json' + node-version: lts/* + cache: npm registry-url: 'https://registry.npmjs.org' - name: Install core dependencies run: npm ci --no-audit diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index aa4c3dfcc9c..d973cbb18eb 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -30,8 +30,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'npm' - cache-dependency-path: 'npm-shrinkwrap.json' + cache: npm check-latest: true if: '${{!steps.release-check.outputs.IS_RELEASE}}' - name: Install core dependencies diff --git a/.github/workflows/verify-docs.yml b/.github/workflows/verify-docs.yml index 01fc7af781a..dca250bb739 100644 --- a/.github/workflows/verify-docs.yml +++ b/.github/workflows/verify-docs.yml @@ -16,10 +16,8 @@ jobs: - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: '*' - cache: 'npm' - cache-dependency-path: 'npm-shrinkwrap.json' - check-latest: true + node-version: lts/* + cache: npm - name: Install core dependencies run: npm ci --no-audit - name: Install site dependencies diff --git a/package.json b/package.json index 9e008097d55..afbcf6b76db 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ }, "config": { "eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{src,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,html}\" \"*.{mjs,cjs,js,md,html}\" \".*.{mjs,cjs,js,md,html}\"", - "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,yml,json,html}\" \"*.{mjs,cjs,js,yml,json,html}\" \".*.{mjs,cjs,js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!**/*/package-lock.json\" \"!.github/**/*.md\"" + "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,yml,json,html}\" \"*.{mjs,cjs,js,yml,json,html}\" \".*.{mjs,cjs,js,yml,json,html}\" \"!CHANGELOG.md\" \"!**/*/package-lock.json\" \"!.github/**/*.md\"" }, "dependencies": { "@fastify/static": "^6.6.0", diff --git a/tools/affected-test.mjs b/tools/affected-test.mjs index b46e141d400..6e92cd4c213 100755 --- a/tools/affected-test.mjs +++ b/tools/affected-test.mjs @@ -33,7 +33,7 @@ export const getAffectedFiles = (changedFiles) => { // in this case all files are affected if ( - changedFiles.includes('npm-shrinkwrap.json') || + changedFiles.includes('package-lock.json') || changedFiles.includes('package.json') || changedFiles.includes(join('.github', 'workflows', 'main.yml')) ) { diff --git a/tools/tests/affected-files.test.mjs b/tools/tests/affected-files.test.mjs index 3168a33333c..f6d9255b26d 100644 --- a/tools/tests/affected-files.test.mjs +++ b/tools/tests/affected-files.test.mjs @@ -44,9 +44,9 @@ test.only('should get all files marked as affected when the package.json is touc t.deepEqual(affectedFiles, mockedTestFiles) }) -test.serial('should get all files marked as affected when the npm-shrinkwrap.json is touched', async (t) => { +test.serial('should get all files marked as affected when the package-lock.json is touched', async (t) => { const consoleStub = t.context.sandbox.stub(console, 'log').callsFake(() => {}) - const { affectedFiles, mockedTestFiles } = await getAffectedFilesFromMock(['npm-shrinkwrap.json']) + const { affectedFiles, mockedTestFiles } = await getAffectedFilesFromMock(['package-lock.json']) t.truthy(consoleStub.firstCall.calledWith('All files are affected based on the changeset')) t.deepEqual(affectedFiles, mockedTestFiles) diff --git a/tools/tests/utils/file-systems.mjs b/tools/tests/utils/file-systems.mjs index 7ca5c9ec2f4..9d3fb49f2f3 100644 --- a/tools/tests/utils/file-systems.mjs +++ b/tools/tests/utils/file-systems.mjs @@ -1,7 +1,7 @@ import { join } from 'path' const baseFiles = { - 'npm-shrinkwrap.json': '', + 'package-lock.json': '', 'README.md': '', }