From 082ab2b1b71652b744d6ca3fe5cafdcf2b100d86 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Tue, 12 Dec 2023 09:00:55 +0000 Subject: [PATCH 1/3] Fix package.json order --- packages/govuk-frontend/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/govuk-frontend/package.json b/packages/govuk-frontend/package.json index b7f2269ee5..c217cf3cad 100644 --- a/packages/govuk-frontend/package.json +++ b/packages/govuk-frontend/package.json @@ -61,12 +61,12 @@ "version": "echo $npm_package_version" }, "devDependencies": { + "@babel/core": "^7.23.6", + "@babel/preset-env": "^7.23.6", "@govuk-frontend/config": "*", "@govuk-frontend/helpers": "*", "@govuk-frontend/lib": "*", "@govuk-frontend/tasks": "*", - "@babel/core": "^7.23.6", - "@babel/preset-env": "^7.23.6", "@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-replace": "^5.0.5", "@rollup/plugin-terser": "^0.4.4", From e811ef26843d26680a310128fa1baa25e996ec82 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Tue, 12 Dec 2023 09:18:27 +0000 Subject: [PATCH 2/3] Avoid Node.js setup cache restore delays Downgrades to v3 to avoid a bug in GitHub actions/cache https://github.com/actions/cache/issues/810 Cache restore times for ~/.npm going over 5 minutes --- .github/workflows/actions/setup-node/action.yml | 2 +- .github/workflows/sass.yaml | 8 ++++---- .github/workflows/tests.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/actions/setup-node/action.yml b/.github/workflows/actions/setup-node/action.yml index 51fbe1aed8..c0dea6cfd1 100644 --- a/.github/workflows/actions/setup-node/action.yml +++ b/.github/workflows/actions/setup-node/action.yml @@ -11,7 +11,7 @@ runs: steps: - name: Setup Node.js - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v3.8.2 id: setup-node with: diff --git a/.github/workflows/sass.yaml b/.github/workflows/sass.yaml index 35a6399da9..7c7cff1a5a 100644 --- a/.github/workflows/sass.yaml +++ b/.github/workflows/sass.yaml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@v4.1.1 - name: Setup Node.js - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v3.8.2 with: cache: npm node-version: 8 # Node.js 8 supported by Dart Sass v1.0.0 @@ -47,7 +47,7 @@ jobs: uses: actions/checkout@v4.1.1 - name: Setup Node.js - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v3.8.2 with: cache: npm check-latest: true @@ -77,7 +77,7 @@ jobs: uses: actions/checkout@v4.1.1 - name: Setup Node.js - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v3.8.2 with: cache: npm node-version: 4 # Node.js 4 supported by Node Sass v3.4.0 @@ -100,7 +100,7 @@ jobs: uses: actions/checkout@v4.1.1 - name: Setup Node.js - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v3.8.2 with: cache: npm check-latest: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 65ddccf9a0..e30e200bb3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -275,7 +275,7 @@ jobs: uses: ./.github/workflows/actions/build - name: Change Node.js version - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v3.8.2 with: node-version: ${{ matrix.node-version }} From 900c1125a88a5da67d2290cce868f91c6b54ade1 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Tue, 12 Dec 2023 09:42:31 +0000 Subject: [PATCH 3/3] Remove Node.js `check-latest: true` Now that Node.js 20 is available to local runners, we no longer need to agressively download the latest version on every run --- .github/workflows/actions/setup-node/action.yml | 1 - .github/workflows/sass.yaml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/actions/setup-node/action.yml b/.github/workflows/actions/setup-node/action.yml index c0dea6cfd1..cc5ac5a92b 100644 --- a/.github/workflows/actions/setup-node/action.yml +++ b/.github/workflows/actions/setup-node/action.yml @@ -16,5 +16,4 @@ runs: with: cache: ${{ inputs.use-cache == 'true' && 'npm' || '' }} - check-latest: true node-version-file: .nvmrc diff --git a/.github/workflows/sass.yaml b/.github/workflows/sass.yaml index 7c7cff1a5a..4e5fcd4220 100644 --- a/.github/workflows/sass.yaml +++ b/.github/workflows/sass.yaml @@ -50,7 +50,6 @@ jobs: uses: actions/setup-node@v3.8.2 with: cache: npm - check-latest: true node-version-file: .nvmrc # Node.js project version must support Dart Sass v1 - name: Install package @@ -103,7 +102,6 @@ jobs: uses: actions/setup-node@v3.8.2 with: cache: npm - check-latest: true node-version-file: .nvmrc # Node.js project version must support Node Sass v8.x - name: Install package