From 53d2830aca1cf454396dfc3f835d3b22d3bfc125 Mon Sep 17 00:00:00 2001 From: Alan Cruikshanks Date: Sat, 23 Sep 2023 10:13:44 +0100 Subject: [PATCH 1/3] Upgrade to Node 20 https://eaflood.atlassian.net/browse/WATER-4077 Our environments are currently running on Node.js Version 14. [v14 went end-of-life in April 2023](https://endoflife.date/nodejs) which means no more maintenance or security fixes will be provided. The current Long Term Support (LTS) version is currently v18 though in a couple of weeks it will switch to v20. So, we're updating our environments to run with Node v20. This covers all changes needed to support the upgrade. --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index b6a7d89c68..209e3ef4b6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +20 From beebcaeb66cc49a216240a1bef35d734d60e2ba8 Mon Sep 17 00:00:00 2001 From: Alan Cruikshanks Date: Sat, 23 Sep 2023 10:40:07 +0100 Subject: [PATCH 2/3] Simplify node install in CI Happened to spot that https://github.com/actions/setup-node supports setting the version using the .nvmrc file directly. Seems as good a time as any to simplify our CI workflow. --- .github/workflows/ci.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 134bac34dd..6a66f0ab86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,18 +74,11 @@ jobs: run: | ! grep -R 'describe.only(\|it.only(' test - # Our projects use .nvmrc files to specify the node version to use. We can read and then output it as the result - # this step. Subsequent steps can then access the value - - name: Read Node version - run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" - # Give the step an ID to make it easier to refer to - id: nvm - # Gets the version to use by referring to the previous step - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.nvm.outputs.NVMRC }}" + node-version-file: ".nvmrc" # Speeds up workflows by reading the node modules from cache. Obviously you need to run it at least once, and the # cache will be updated should the package-lock.json file change From 242f51c244df3c09633f4ad72aa88d7358a66c32 Mon Sep 17 00:00:00 2001 From: Alan Cruikshanks Date: Sat, 23 Sep 2023 10:46:14 +0100 Subject: [PATCH 3/3] Remove redundant comment --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a66f0ab86..2a141bdff8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,6 @@ jobs: run: | ! grep -R 'describe.only(\|it.only(' test - # Gets the version to use by referring to the previous step - name: Install Node uses: actions/setup-node@v3 with: