From 5c4bc226623bcbfb4d00f11426bc4aa541b12958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Fri, 3 Jan 2025 10:36:15 +0000 Subject: [PATCH 1/4] chore: Upgrade to Node 22 (LTS) --- .github/workflows/pull-request.yml | 18 ++- .github/workflows/push-main.yml | 6 +- .github/workflows/regression-tests.yml | 12 +- .nvmrc | 2 +- README.md | 2 +- api.planx.uk/Dockerfile | 6 +- api.planx.uk/package.json | 2 +- api.planx.uk/pnpm-lock.yaml | 74 ++++----- doc/how-to/how-to-upgrade-nodejs.md | 34 +++++ e2e/package.json | 2 +- e2e/pnpm-lock.yaml | 14 +- e2e/tests/api-driven/package.json | 2 +- e2e/tests/api-driven/pnpm-lock.yaml | 22 +-- e2e/tests/ui-driven/package.json | 2 +- e2e/tests/ui-driven/pnpm-lock.yaml | 16 +- editor.planx.uk/package.json | 2 +- editor.planx.uk/pnpm-lock.yaml | 144 +++++++++--------- .../src/pages/FlowEditor/lib/store/preview.ts | 2 +- infrastructure/application/package.json | 2 +- infrastructure/application/pnpm-lock.yaml | 15 +- infrastructure/certificates/package.json | 2 +- infrastructure/certificates/pnpm-lock.yaml | 15 +- infrastructure/data/package.json | 2 +- infrastructure/data/pnpm-lock.yaml | 15 +- infrastructure/networking/package.json | 2 +- infrastructure/networking/pnpm-lock.yaml | 15 +- sharedb.planx.uk/Dockerfile | 4 +- 27 files changed, 240 insertions(+), 194 deletions(-) create mode 100644 doc/how-to/how-to-upgrade-nodejs.md diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3180d927c9..0532010d74 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -84,7 +84,8 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - run: pnpm install --frozen-lockfile @@ -127,7 +128,8 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Install dependencies @@ -163,7 +165,8 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig @@ -195,7 +198,8 @@ jobs: - uses: actions/setup-node@v4 if: steps.cache-react-build-assets.outputs.cache-hit != 'true' with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig @@ -252,7 +256,8 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - run: pnpm install --frozen-lockfile @@ -465,7 +470,8 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml index d99d4d7b71..39322ccb74 100644 --- a/.github/workflows/push-main.yml +++ b/.github/workflows/push-main.yml @@ -19,7 +19,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 # https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows#using-the-cache-action - name: NPM cache uses: actions/cache@v4 @@ -76,7 +77,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index c8602c0b2b..cd8e3a613e 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -35,7 +35,8 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - run: pnpm install --frozen-lockfile @@ -74,7 +75,8 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig @@ -110,7 +112,8 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig @@ -143,7 +146,8 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ vars.NODE_VERSION }} + # node-version: ${{ vars.NODE_VERSION }} + node-version: 22.10.0 cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig diff --git a/.nvmrc b/.nvmrc index 5e0828ad15..e4f846ddb0 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.16.1 +v22.10.0 diff --git a/README.md b/README.md index 65b5832e4e..92702b4184 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ planx-new is a monorepo containing our full application stack. Here's a quick su - [Docker](https://docs.docker.com/get-docker/) - [Docker Compose](https://docs.docker.com/compose/install/) - [PNPM](https://github.com/pnpm/pnpm) `npm install -g pnpm@8.6.6` -- [Node](https://nodejs.org/en/download) `pnpm env use --global 18.16.1` +- [Node](https://nodejs.org/en/download) `pnpm env use --global 22.10.0` - [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) **If you're an OSL developer:** diff --git a/api.planx.uk/Dockerfile b/api.planx.uk/Dockerfile index 4c283debef..a6dcfec1bc 100644 --- a/api.planx.uk/Dockerfile +++ b/api.planx.uk/Dockerfile @@ -1,6 +1,6 @@ ## BASE ## -# 18.16.1 = LTS -FROM node:18.16.1-alpine as base +# 22.10.0 = LTS +FROM node:22.10.0-alpine as base # Setup Git - required for fetching git dependencies (planx-core) RUN apk add --no-cache git @@ -21,7 +21,7 @@ RUN pnpm install --recursive --prefer-offline RUN pnpm build RUN pnpm prune --production -FROM node:18.16.1-alpine as production +FROM node:22.10.0-alpine as production WORKDIR /api ## PRODUCTION ## diff --git a/api.planx.uk/package.json b/api.planx.uk/package.json index 79765c6199..9661556d83 100644 --- a/api.planx.uk/package.json +++ b/api.planx.uk/package.json @@ -92,7 +92,7 @@ "@types/jsonwebtoken": "^9.0.5", "@types/lodash": "^4.17.0", "@types/multer": "^1.4.11", - "@types/node": "^18.19.13", + "@types/node": "22.10.5", "@types/passport": "^1.0.16", "@types/passport-google-oauth20": "^2.0.14", "@types/supertest": "^6.0.2", diff --git a/api.planx.uk/pnpm-lock.yaml b/api.planx.uk/pnpm-lock.yaml index 237b28af3d..bd06ef01f5 100644 --- a/api.planx.uk/pnpm-lock.yaml +++ b/api.planx.uk/pnpm-lock.yaml @@ -197,8 +197,8 @@ devDependencies: specifier: ^1.4.11 version: 1.4.11 '@types/node': - specifier: ^18.19.13 - version: 18.19.13 + specifier: 22.10.5 + version: 22.10.5 '@types/passport': specifier: ^1.0.16 version: 1.0.16 @@ -273,7 +273,7 @@ devDependencies: version: 10.0.0 vitest: specifier: ^2.1.1 - version: 2.1.1(@types/node@18.19.13)(@vitest/ui@2.1.1)(jsdom@24.1.0) + version: 2.1.1(@types/node@22.10.5)(@vitest/ui@2.1.1)(jsdom@24.1.0) packages: @@ -2685,14 +2685,14 @@ packages: /@types/adm-zip@0.5.0: resolution: {integrity: sha512-FCJBJq9ODsQZUNURo5ILAQueuA8WJhRvuihS3ke2iI25mJlfV2LK8jG2Qj2z2AWg8U0FtWWqBHVRetceLskSaw==} dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 dev: true /@types/body-parser@1.19.5: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 - '@types/node': 18.19.13 + '@types/node': 22.10.5 /@types/caseless@0.12.5: resolution: {integrity: sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==} @@ -2701,7 +2701,7 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 /@types/cookie-parser@1.4.6: resolution: {integrity: sha512-KoooCrD56qlLskXPLGUiJxOMnv5l/8m7cQD2OxJ73NPMhuSz9PmvwRD6EpjDyKBVrdJDdQ4bQK7JFNHnNmax0w==} @@ -2723,7 +2723,7 @@ packages: /@types/cors@2.8.17: resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 dev: true /@types/dompurify@3.0.5: @@ -2746,7 +2746,7 @@ packages: /@types/express-serve-static-core@4.19.6: resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -2769,7 +2769,7 @@ packages: /@types/http-proxy@1.17.15: resolution: {integrity: sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==} dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 dev: false /@types/isomorphic-fetch@0.0.36: @@ -2779,7 +2779,7 @@ packages: /@types/jsdom@21.1.6: resolution: {integrity: sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==} dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 dev: true @@ -2790,7 +2790,7 @@ packages: /@types/jsonwebtoken@9.0.5: resolution: {integrity: sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==} dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 /@types/keygrip@1.0.6: resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==} @@ -2817,21 +2817,15 @@ packages: '@types/express': 4.17.21 dev: true - /@types/node@18.19.13: - resolution: {integrity: sha512-kgnbRDj8ioDyGxoiaXsiu1Ybm/K14ajCgMOkwiqpHrnF7d7QiYRoRqHIpglMMs3DwXinlK4qJ8TZGlj4hfleJg==} - dependencies: - undici-types: 5.26.5 - - /@types/node@22.10.1: - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + /@types/node@22.10.5: + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} dependencies: undici-types: 6.20.0 - dev: false /@types/oauth@0.9.6: resolution: {integrity: sha512-H9TRCVKBNOhZZmyHLqFt9drPM9l+ShWiqqJijU1B8P3DX3ub84NjxDuy+Hjrz+fEca5Kwip3qPMKNyiLgNJtIA==} dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 dev: true /@types/parse-json@4.0.2: @@ -2883,7 +2877,7 @@ packages: /@types/pino@6.3.12: resolution: {integrity: sha512-dsLRTq8/4UtVSpJgl9aeqHvbh6pzdmjYD3C092SYgLD2TyoCqHpTJk6vp8DvCTGGc7iowZ2MoiYiVUUCcu7muw==} dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 '@types/pino-pretty': 5.0.0 '@types/pino-std-serializers': 4.0.0 sonic-boom: 2.8.0 @@ -2919,7 +2913,7 @@ packages: resolution: {integrity: sha512-whjk1EDJPcAR2kYHRbFl/lKeeKYTi05A15K9bnLInCVroNDCtXce57xKdI0/rQaA3K+6q0eFyUBPmqfSndUZdQ==} dependencies: '@types/caseless': 0.12.5 - '@types/node': 18.19.13 + '@types/node': 22.10.5 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 dev: false @@ -2932,13 +2926,13 @@ packages: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 18.19.13 + '@types/node': 22.10.5 /@types/serve-static@1.15.7: resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==} dependencies: '@types/http-errors': 2.0.4 - '@types/node': 18.19.13 + '@types/node': 22.10.5 '@types/send': 0.17.4 /@types/superagent@8.1.9: @@ -2946,7 +2940,7 @@ packages: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 18.19.13 + '@types/node': 22.10.5 form-data: 4.0.0 dev: true @@ -3127,7 +3121,7 @@ packages: magicast: 0.3.5 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.1(@types/node@18.19.13)(@vitest/ui@2.1.1)(jsdom@24.1.0) + vitest: 2.1.1(@types/node@22.10.5)(@vitest/ui@2.1.1)(jsdom@24.1.0) transitivePeerDependencies: - supports-color dev: true @@ -3149,7 +3143,7 @@ packages: dependencies: eslint: 8.57.0 typescript: 5.5.2 - vitest: 2.1.1(@types/node@18.19.13)(@vitest/ui@2.1.1)(jsdom@24.1.0) + vitest: 2.1.1(@types/node@22.10.5)(@vitest/ui@2.1.1)(jsdom@24.1.0) dev: true /@vitest/expect@2.1.1: @@ -3176,7 +3170,7 @@ packages: '@vitest/spy': 2.1.1 estree-walker: 3.0.3 magic-string: 0.30.15 - vite: 5.4.11(@types/node@18.19.13) + vite: 5.4.11(@types/node@22.10.5) dev: true /@vitest/pretty-format@2.1.1: @@ -3224,7 +3218,7 @@ packages: sirv: 2.0.4 tinyglobby: 0.2.10 tinyrainbow: 1.2.0 - vitest: 2.1.1(@types/node@18.19.13)(@vitest/ui@2.1.1)(jsdom@24.1.0) + vitest: 2.1.1(@types/node@22.10.5)(@vitest/ui@2.1.1)(jsdom@24.1.0) dev: true /@vitest/utils@2.1.1: @@ -3962,7 +3956,7 @@ packages: resolution: {integrity: sha512-XOtseSTRrkKN/sV5jNBqyLazyhNpWfaUhpuKc22cs+5DavNjRQvchnohb0g0S+x/96/D06U/i0/U/Gc4E5kwuQ==} engines: {node: '>=10'} dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 hash.js: 1.1.7 jszip: 3.10.1 nanoid: 5.0.9 @@ -6925,12 +6919,8 @@ packages: resolution: {integrity: sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA==} dev: false - /undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - /undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - dev: false /undici@6.21.0: resolution: {integrity: sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==} @@ -7007,7 +6997,7 @@ packages: engines: {node: '>= 0.8'} dev: false - /vite-node@2.1.1(@types/node@18.19.13): + /vite-node@2.1.1(@types/node@22.10.5): resolution: {integrity: sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -7015,7 +7005,7 @@ packages: cac: 6.7.14 debug: 4.4.0 pathe: 1.1.2 - vite: 5.4.11(@types/node@18.19.13) + vite: 5.4.11(@types/node@22.10.5) transitivePeerDependencies: - '@types/node' - less @@ -7028,7 +7018,7 @@ packages: - terser dev: true - /vite@5.4.11(@types/node@18.19.13): + /vite@5.4.11(@types/node@22.10.5): resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -7059,7 +7049,7 @@ packages: terser: optional: true dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 esbuild: 0.21.5 postcss: 8.4.49 rollup: 4.28.1 @@ -7067,7 +7057,7 @@ packages: fsevents: 2.3.3 dev: true - /vitest@2.1.1(@types/node@18.19.13)(@vitest/ui@2.1.1)(jsdom@24.1.0): + /vitest@2.1.1(@types/node@22.10.5)(@vitest/ui@2.1.1)(jsdom@24.1.0): resolution: {integrity: sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -7092,7 +7082,7 @@ packages: jsdom: optional: true dependencies: - '@types/node': 18.19.13 + '@types/node': 22.10.5 '@vitest/expect': 2.1.1 '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.11) '@vitest/pretty-format': 2.1.8 @@ -7111,8 +7101,8 @@ packages: tinyexec: 0.3.1 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@18.19.13) - vite-node: 2.1.1(@types/node@18.19.13) + vite: 5.4.11(@types/node@22.10.5) + vite-node: 2.1.1(@types/node@22.10.5) why-is-node-running: 2.3.0 transitivePeerDependencies: - less diff --git a/doc/how-to/how-to-upgrade-nodejs.md b/doc/how-to/how-to-upgrade-nodejs.md new file mode 100644 index 0000000000..10e8faf96f --- /dev/null +++ b/doc/how-to/how-to-upgrade-nodejs.md @@ -0,0 +1,34 @@ +# How to upgrade Node.js + +This guide walks through the required steps to upgrade Node.js versions across the PlanX repositories. + +We should always aim to be on an LTS version (even release numbers). For the full release schedule please see https://nodejs.org/en/about/previous-releases + +## planx-new +1. Locally install desired Node.js version + +```shell +nvm install 22.10.0 +nvm use 22.10.0 +``` + +2. Update `.nvmrc` file + +3. Update Dockerfiles - + - `api.planx.uk/Dockerfile` + - `sharedb.planx.uk/Dockerfile` + +4. Update `@types/node` package across all projects ([npm](https://www.npmjs.com/package/@types/node)). Note: Only major.minor version need to match e.g. types version 22.10.7893 would be fine for Node 22.10.x ([docs](https://github.com/definitelytyped/definitelytyped#how-do-definitely-typed-package-versions-relate-to-versions-of-the-corresponding-library)). + +5. Fix any type issues flagged by the above change + +5. Update `README.md` + +6. Rebuild docker containers, test and run locally + +6. Upgrade the `NODE_VERSION` on GitHub (Settings > Secrets and variables > Actions > "Variables" tab > Update `NODE_VERSION` variable). This variable is used across our GitHub actions to define which Node version runs our CI services. + +Please note - this update is immediate and will effect other open PRs. It's advisable to hardcode the desired Node version into the GitHub action files initially to test CI and regression tests, before making this change. + +## planx-core +Steps 4, 5 & 6 also apply here and should be updated shortly after. \ No newline at end of file diff --git a/e2e/package.json b/e2e/package.json index 5bdc4466f5..7ef02f15a0 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -22,7 +22,7 @@ }, "packageManager": "pnpm@8.6.6", "devDependencies": { - "@types/node": "18.16.1", + "@types/node": "22.10.5", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "eslint": "^8.57.0", diff --git a/e2e/pnpm-lock.yaml b/e2e/pnpm-lock.yaml index b5bd54c146..0bfd6b10bc 100644 --- a/e2e/pnpm-lock.yaml +++ b/e2e/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: devDependencies: '@types/node': - specifier: 18.16.1 - version: 18.16.1 + specifier: 22.10.5 + version: 22.10.5 '@typescript-eslint/eslint-plugin': specifier: ^5.62.0 version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.57.0)(typescript@5.5.3) @@ -116,8 +116,10 @@ packages: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true - /@types/node@18.16.1: - resolution: {integrity: sha512-DZxSZWXxFfOlx7k7Rv4LAyiMroaxa3Ly/7OOzZO8cBNho0YzAi4qlbrx8W27JGqG57IgR/6J7r+nOJWw6kcvZA==} + /@types/node@22.10.5: + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} + dependencies: + undici-types: 6.20.0 dev: true /@types/semver@7.5.8: @@ -1228,6 +1230,10 @@ packages: hasBin: true dev: true + /undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + dev: true + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: diff --git a/e2e/tests/api-driven/package.json b/e2e/tests/api-driven/package.json index 48a5338190..30da4e9979 100644 --- a/e2e/tests/api-driven/package.json +++ b/e2e/tests/api-driven/package.json @@ -18,7 +18,7 @@ }, "devDependencies": { "@types/lodash.zipobject": "^4.1.7", - "@types/node": "18.16.1", + "@types/node": "22.10.5", "ts-node": "^10.9.1", "typescript": "^5.4.3" } diff --git a/e2e/tests/api-driven/pnpm-lock.yaml b/e2e/tests/api-driven/pnpm-lock.yaml index b560efae1b..b337a2d784 100644 --- a/e2e/tests/api-driven/pnpm-lock.yaml +++ b/e2e/tests/api-driven/pnpm-lock.yaml @@ -38,11 +38,11 @@ devDependencies: specifier: ^4.1.7 version: 4.1.7 '@types/node': - specifier: 18.16.1 - version: 18.16.1 + specifier: 22.10.5 + version: 22.10.5 ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@18.16.1)(typescript@5.4.3) + version: 10.9.1(@types/node@22.10.5)(typescript@5.4.3) typescript: specifier: ^5.4.3 version: 5.4.3 @@ -809,15 +809,10 @@ packages: /@types/lodash@4.17.13: resolution: {integrity: sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==} - /@types/node@18.16.1: - resolution: {integrity: sha512-DZxSZWXxFfOlx7k7Rv4LAyiMroaxa3Ly/7OOzZO8cBNho0YzAi4qlbrx8W27JGqG57IgR/6J7r+nOJWw6kcvZA==} - dev: true - - /@types/node@22.10.1: - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + /@types/node@22.10.5: + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} dependencies: undici-types: 6.20.0 - dev: false /@types/parse-json@4.0.2: resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -1217,7 +1212,7 @@ packages: resolution: {integrity: sha512-XOtseSTRrkKN/sV5jNBqyLazyhNpWfaUhpuKc22cs+5DavNjRQvchnohb0g0S+x/96/D06U/i0/U/Gc4E5kwuQ==} engines: {node: '>=10'} dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 hash.js: 1.1.7 jszip: 3.10.1 nanoid: 5.0.9 @@ -2564,7 +2559,7 @@ packages: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: false - /ts-node@10.9.1(@types/node@18.16.1)(typescript@5.4.3): + /ts-node@10.9.1(@types/node@22.10.5)(typescript@5.4.3): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -2583,7 +2578,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 18.16.1 + '@types/node': 22.10.5 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -2624,7 +2619,6 @@ packages: /undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - dev: false /undici@6.21.0: resolution: {integrity: sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==} diff --git a/e2e/tests/ui-driven/package.json b/e2e/tests/ui-driven/package.json index a873607f5c..fa73cece72 100644 --- a/e2e/tests/ui-driven/package.json +++ b/e2e/tests/ui-driven/package.json @@ -23,7 +23,7 @@ "devDependencies": { "@playwright/test": "^1.49.0", "@types/geojson": "^7946.0.14", - "@types/node": "18.16.1", + "@types/node": "22.10.5", "eslint-plugin-playwright": "^0.20.0" } } diff --git a/e2e/tests/ui-driven/pnpm-lock.yaml b/e2e/tests/ui-driven/pnpm-lock.yaml index 2e921a0ebd..3dad68919f 100644 --- a/e2e/tests/ui-driven/pnpm-lock.yaml +++ b/e2e/tests/ui-driven/pnpm-lock.yaml @@ -44,8 +44,8 @@ devDependencies: specifier: ^7946.0.14 version: 7946.0.14 '@types/node': - specifier: 18.16.1 - version: 18.16.1 + specifier: 22.10.5 + version: 22.10.5 eslint-plugin-playwright: specifier: ^0.20.0 version: 0.20.0(eslint@8.56.0) @@ -663,15 +663,10 @@ packages: resolution: {integrity: sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==} dev: false - /@types/node@18.16.1: - resolution: {integrity: sha512-DZxSZWXxFfOlx7k7Rv4LAyiMroaxa3Ly/7OOzZO8cBNho0YzAi4qlbrx8W27JGqG57IgR/6J7r+nOJWw6kcvZA==} - dev: true - - /@types/node@22.10.1: - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + /@types/node@22.10.5: + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} dependencies: undici-types: 6.20.0 - dev: false /@types/parse-json@4.0.2: resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -1098,7 +1093,7 @@ packages: resolution: {integrity: sha512-XOtseSTRrkKN/sV5jNBqyLazyhNpWfaUhpuKc22cs+5DavNjRQvchnohb0g0S+x/96/D06U/i0/U/Gc4E5kwuQ==} engines: {node: '>=10'} dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 hash.js: 1.1.7 jszip: 3.10.1 nanoid: 5.0.9 @@ -2442,7 +2437,6 @@ packages: /undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - dev: false /undici@6.21.0: resolution: {integrity: sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==} diff --git a/editor.planx.uk/package.json b/editor.planx.uk/package.json index bf4adc513f..98ebfcb628 100644 --- a/editor.planx.uk/package.json +++ b/editor.planx.uk/package.json @@ -125,7 +125,7 @@ "@types/geojson": "^7946.0.14", "@types/jest": "^27.5.2", "@types/lodash": "^4.14.202", - "@types/node": "^17.0.45", + "@types/node": "22.10.5", "@types/ramda": "^0.28.25", "@types/react": "^18.2.45", "@types/react-beautiful-dnd": "^13.1.7", diff --git a/editor.planx.uk/pnpm-lock.yaml b/editor.planx.uk/pnpm-lock.yaml index f43884def3..77236848be 100644 --- a/editor.planx.uk/pnpm-lock.yaml +++ b/editor.planx.uk/pnpm-lock.yaml @@ -214,7 +214,7 @@ dependencies: version: 2.19.3(react@18.2.0) react-dnd: specifier: ^16.0.1 - version: 16.0.1(@types/node@17.0.45)(@types/react@18.2.45)(react@18.2.0) + version: 16.0.1(@types/node@22.10.5)(@types/react@18.2.45)(react@18.2.0) react-dnd-html5-backend: specifier: ^16.0.1 version: 16.0.1 @@ -274,7 +274,7 @@ dependencies: version: 9.0.1 vite: specifier: ^5.4.6 - version: 5.4.6(@types/node@17.0.45)(sass@1.71.1) + version: 5.4.6(@types/node@22.10.5)(sass@1.71.1) vite-jest: specifier: ^0.1.4 version: 0.1.4(jest@29.7.0)(vite@5.4.6) @@ -374,8 +374,8 @@ devDependencies: specifier: ^4.14.202 version: 4.14.202 '@types/node': - specifier: ^17.0.45 - version: 17.0.45 + specifier: 22.10.5 + version: 22.10.5 '@types/ramda': specifier: ^0.28.25 version: 0.28.25 @@ -444,7 +444,7 @@ devDependencies: version: 3.0.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@17.0.45) + version: 29.7.0(@types/node@22.10.5) jest-environment-jsdom: specifier: ^29.7.0 version: 29.7.0 @@ -492,7 +492,7 @@ devDependencies: version: 4.3.2(typescript@5.6.2)(vite@5.4.6) vitest: specifier: ^1.6.0 - version: 1.6.0(@types/node@17.0.45)(sass@1.71.1) + version: 1.6.0(@types/node@22.10.5)(sass@1.71.1) vitest-axe: specifier: 1.0.0-pre.3 version: 1.0.0-pre.3(vitest@1.6.0) @@ -2818,7 +2818,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -2838,14 +2838,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@17.0.45) + jest-config: 29.7.0(@types/node@22.10.5) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -2872,7 +2872,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 jest-mock: 29.7.0 /@jest/expect-utils@29.7.0: @@ -2896,7 +2896,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 17.0.45 + '@types/node': 22.10.5 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2927,7 +2927,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 17.0.45 + '@types/node': 22.10.5 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -3009,7 +3009,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 17.0.45 + '@types/node': 22.10.5 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -3027,7 +3027,7 @@ packages: magic-string: 0.27.0 react-docgen-typescript: 2.2.2(typescript@5.6.2) typescript: 5.6.2 - vite: 5.4.6(@types/node@17.0.45)(sass@1.71.1) + vite: 5.4.6(@types/node@22.10.5)(sass@1.71.1) dev: true /@jridgewell/gen-mapping@0.3.5: @@ -3268,7 +3268,7 @@ packages: '@babel/runtime': 7.26.0 '@floating-ui/react-dom': 2.1.2(react-dom@18.2.0)(react@18.2.0) '@mui/types': 7.2.19(@types/react@18.2.45) - '@mui/utils': 5.15.11(@types/react@18.2.45)(react@18.2.0) + '@mui/utils': 5.16.8(@types/react@18.2.45)(react@18.2.0) '@popperjs/core': 2.11.8 '@types/react': 18.2.45 clsx: 2.1.1 @@ -3291,7 +3291,7 @@ packages: '@babel/runtime': 7.26.0 '@floating-ui/react-dom': 2.1.2(react-dom@18.3.1)(react@18.3.1) '@mui/types': 7.2.19(@types/react@18.2.45) - '@mui/utils': 5.15.11(@types/react@18.2.45)(react@18.3.1) + '@mui/utils': 5.16.8(@types/react@18.2.45)(react@18.3.1) '@popperjs/core': 2.11.8 '@types/react': 18.2.45 clsx: 2.1.1 @@ -4263,7 +4263,7 @@ packages: '@storybook/csf': 0.1.12 '@storybook/global': 5.0.0 '@storybook/icons': 1.3.0(react-dom@18.2.0)(react@18.2.0) - '@types/lodash': 4.14.202 + '@types/lodash': 4.17.13 color-convert: 2.0.1 dequal: 2.0.3 lodash: 4.17.21 @@ -4306,7 +4306,7 @@ packages: storybook: 8.3.1 ts-dedent: 2.2.0 typescript: 5.6.2 - vite: 5.4.6(@types/node@17.0.45)(sass@1.71.1) + vite: 5.4.6(@types/node@22.10.5)(sass@1.71.1) transitivePeerDependencies: - supports-color dev: true @@ -4466,7 +4466,7 @@ packages: resolve: 1.22.8 storybook: 8.3.1 tsconfig-paths: 4.2.0 - vite: 5.4.6(@types/node@17.0.45)(sass@1.71.1) + vite: 5.4.6(@types/node@22.10.5)(sass@1.71.1) transitivePeerDependencies: - '@preact/preset-vite' - '@storybook/test' @@ -4500,7 +4500,7 @@ packages: '@storybook/theming': 8.3.1(storybook@8.3.1) '@types/escodegen': 0.0.6 '@types/estree': 0.0.51 - '@types/node': 22.10.1 + '@types/node': 22.10.5 acorn: 7.4.1 acorn-jsx: 5.3.2(acorn@7.4.1) acorn-walk: 7.2.0 @@ -5301,7 +5301,7 @@ packages: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 - '@types/node': 17.0.45 + '@types/node': 22.10.5 dev: true /@types/caseless@0.12.5: @@ -5311,7 +5311,7 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 17.0.45 + '@types/node': 22.10.5 dev: true /@types/debug@4.1.12: @@ -5365,7 +5365,7 @@ packages: /@types/express-serve-static-core@4.19.6: resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} dependencies: - '@types/node': 17.0.45 + '@types/node': 22.10.5 '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -5391,13 +5391,13 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 17.0.45 + '@types/node': 22.10.5 dev: true /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 17.0.45 + '@types/node': 22.10.5 /@types/hast@2.3.10: resolution: {integrity: sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==} @@ -5457,7 +5457,7 @@ packages: /@types/jsdom@20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} dependencies: - '@types/node': 17.0.45 + '@types/node': 22.10.5 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 dev: true @@ -5474,7 +5474,6 @@ packages: /@types/lodash@4.17.13: resolution: {integrity: sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==} - dev: false /@types/markdown-it@14.1.2: resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} @@ -5509,11 +5508,8 @@ packages: resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} dev: false - /@types/node@17.0.45: - resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - - /@types/node@22.10.1: - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + /@types/node@22.10.5: + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} dependencies: undici-types: 6.20.0 @@ -5602,7 +5598,7 @@ packages: resolution: {integrity: sha512-whjk1EDJPcAR2kYHRbFl/lKeeKYTi05A15K9bnLInCVroNDCtXce57xKdI0/rQaA3K+6q0eFyUBPmqfSndUZdQ==} dependencies: '@types/caseless': 0.12.5 - '@types/node': 17.0.45 + '@types/node': 22.10.5 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 dev: false @@ -5622,14 +5618,14 @@ packages: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 17.0.45 + '@types/node': 22.10.5 dev: true /@types/serve-static@1.15.7: resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==} dependencies: '@types/http-errors': 2.0.4 - '@types/node': 17.0.45 + '@types/node': 22.10.5 '@types/send': 0.17.4 dev: true @@ -5885,7 +5881,7 @@ packages: vite: ^4 || ^5 dependencies: '@swc/core': 1.10.1 - vite: 5.4.6(@types/node@17.0.45)(sass@1.71.1) + vite: 5.4.6(@types/node@22.10.5)(sass@1.71.1) transitivePeerDependencies: - '@swc/helpers' dev: false @@ -5907,7 +5903,7 @@ packages: dependencies: eslint: 8.57.1 typescript: 5.6.2 - vitest: 1.6.0(@types/node@17.0.45)(sass@1.71.1) + vitest: 1.6.0(@types/node@22.10.5)(sass@1.71.1) dev: true /@vitest/expect@1.6.0: @@ -7248,7 +7244,7 @@ packages: typescript: 5.6.2 dev: false - /create-jest@29.7.0(@types/node@17.0.45): + /create-jest@29.7.0(@types/node@22.10.5): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -7257,7 +7253,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@17.0.45) + jest-config: 29.7.0(@types/node@22.10.5) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -7621,7 +7617,7 @@ packages: resolution: {integrity: sha512-XOtseSTRrkKN/sV5jNBqyLazyhNpWfaUhpuKc22cs+5DavNjRQvchnohb0g0S+x/96/D06U/i0/U/Gc4E5kwuQ==} engines: {node: '>=10'} dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 hash.js: 1.1.7 jszip: 3.10.1 nanoid: 5.0.9 @@ -9495,7 +9491,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -9515,7 +9511,7 @@ packages: - babel-plugin-macros - supports-color - /jest-cli@29.7.0(@types/node@17.0.45): + /jest-cli@29.7.0(@types/node@22.10.5): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -9529,10 +9525,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@17.0.45) + create-jest: 29.7.0(@types/node@22.10.5) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@17.0.45) + jest-config: 29.7.0(@types/node@22.10.5) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -9542,7 +9538,7 @@ packages: - supports-color - ts-node - /jest-config@29.7.0(@types/node@17.0.45): + /jest-config@29.7.0(@types/node@22.10.5): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -9557,7 +9553,7 @@ packages: '@babel/core': 7.22.5 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 babel-jest: 29.7.0(@babel/core@7.22.5) chalk: 4.1.2 ci-info: 3.9.0 @@ -9629,7 +9625,7 @@ packages: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 17.0.45 + '@types/node': 22.10.5 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3 @@ -9646,7 +9642,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -9665,7 +9661,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 17.0.45 + '@types/node': 22.10.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -9727,7 +9723,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 jest-util: 29.7.0 /jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -9777,7 +9773,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -9807,7 +9803,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 chalk: 4.1.2 cjs-module-lexer: 1.4.1 collect-v8-coverage: 1.0.2 @@ -9861,7 +9857,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -9884,7 +9880,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 17.0.45 + '@types/node': 22.10.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -9895,7 +9891,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 17.0.45 + '@types/node': 22.10.5 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -9904,12 +9900,12 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 17.0.45 + '@types/node': 22.10.5 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - /jest@29.7.0(@types/node@17.0.45): + /jest@29.7.0(@types/node@22.10.5): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -9922,7 +9918,7 @@ packages: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@17.0.45) + jest-cli: 29.7.0(@types/node@22.10.5) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -11841,7 +11837,7 @@ packages: dnd-core: 16.0.1 dev: false - /react-dnd@16.0.1(@types/node@17.0.45)(@types/react@18.2.45)(react@18.2.0): + /react-dnd@16.0.1(@types/node@22.10.5)(@types/react@18.2.45)(react@18.2.0): resolution: {integrity: sha512-QeoM/i73HHu2XF9aKksIUuamHPDvRglEwdHL4jsp784BgUuWcg6mzfxT0QDdQz8Wj0qyRKx2eMg8iZtWvU4E2Q==} peerDependencies: '@types/hoist-non-react-statics': '>= 3.3.1' @@ -11858,7 +11854,7 @@ packages: dependencies: '@react-dnd/invariant': 4.0.2 '@react-dnd/shallowequal': 4.0.2 - '@types/node': 17.0.45 + '@types/node': 22.10.5 '@types/react': 18.2.45 dnd-core: 16.0.1 fast-deep-equal: 3.1.3 @@ -13457,7 +13453,7 @@ packages: bs-logger: 0.2.6 esbuild: 0.21.3 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@17.0.45) + jest: 29.7.0(@types/node@22.10.5) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -13933,14 +13929,14 @@ packages: dependencies: es-module-lexer: 0.6.0 execa: 5.1.1 - jest: 29.7.0(@types/node@17.0.45) + jest: 29.7.0(@types/node@22.10.5) jest-transform-stub: 2.0.0 magic-string: 0.25.9 slash: 4.0.0 - vite: 5.4.6(@types/node@17.0.45)(sass@1.71.1) + vite: 5.4.6(@types/node@22.10.5)(sass@1.71.1) dev: false - /vite-node@1.6.0(@types/node@17.0.45)(sass@1.71.1): + /vite-node@1.6.0(@types/node@22.10.5)(sass@1.71.1): resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -13949,7 +13945,7 @@ packages: debug: 4.4.0 pathe: 1.1.2 picocolors: 1.1.1 - vite: 5.4.6(@types/node@17.0.45)(sass@1.71.1) + vite: 5.4.6(@types/node@22.10.5)(sass@1.71.1) transitivePeerDependencies: - '@types/node' - less @@ -13970,7 +13966,7 @@ packages: '@rollup/pluginutils': 5.1.3 '@svgr/core': 8.1.0(typescript@5.6.2) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0) - vite: 5.4.6(@types/node@17.0.45)(sass@1.71.1) + vite: 5.4.6(@types/node@22.10.5)(sass@1.71.1) transitivePeerDependencies: - rollup - supports-color @@ -13988,13 +13984,13 @@ packages: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.2) - vite: 5.4.6(@types/node@17.0.45)(sass@1.71.1) + vite: 5.4.6(@types/node@22.10.5)(sass@1.71.1) transitivePeerDependencies: - supports-color - typescript dev: true - /vite@5.4.6(@types/node@17.0.45)(sass@1.71.1): + /vite@5.4.6(@types/node@22.10.5)(sass@1.71.1): resolution: {integrity: sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -14025,7 +14021,7 @@ packages: terser: optional: true dependencies: - '@types/node': 17.0.45 + '@types/node': 22.10.5 esbuild: 0.21.3 postcss: 8.4.49 rollup: 4.28.1 @@ -14041,10 +14037,10 @@ packages: axe-core: 4.10.2 chalk: 5.3.0 lodash-es: 4.17.21 - vitest: 1.6.0(@types/node@17.0.45)(sass@1.71.1) + vitest: 1.6.0(@types/node@22.10.5)(sass@1.71.1) dev: true - /vitest@1.6.0(@types/node@17.0.45)(sass@1.71.1): + /vitest@1.6.0(@types/node@22.10.5)(sass@1.71.1): resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -14069,7 +14065,7 @@ packages: jsdom: optional: true dependencies: - '@types/node': 17.0.45 + '@types/node': 22.10.5 '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 '@vitest/snapshot': 1.6.0 @@ -14087,8 +14083,8 @@ packages: strip-literal: 2.1.1 tinybench: 2.9.0 tinypool: 0.8.4 - vite: 5.4.6(@types/node@17.0.45)(sass@1.71.1) - vite-node: 1.6.0(@types/node@17.0.45)(sass@1.71.1) + vite: 5.4.6(@types/node@22.10.5)(sass@1.71.1) + vite-node: 1.6.0(@types/node@22.10.5)(sass@1.71.1) why-is-node-running: 2.3.0 transitivePeerDependencies: - less diff --git a/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts b/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts index add41d41eb..77c0dd9d96 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts +++ b/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts @@ -531,7 +531,7 @@ export const previewStore: StateCreator< if (!visitedFns.length) return; // For each visited node, get the data values of its' options (aka edges or Answer nodes) - let visitedOptionVals: string[] = []; + const visitedOptionVals: string[] = []; visitedFns.forEach(([nodeId, _breadcrumb]) => { flow[nodeId].edges?.map((edgeId) => { if (flow[edgeId].type === TYPES.Answer && flow[edgeId].data?.val) { diff --git a/infrastructure/application/package.json b/infrastructure/application/package.json index aa65adf6d6..20c5083b88 100644 --- a/infrastructure/application/package.json +++ b/infrastructure/application/package.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@types/node": "^17.0.38", + "@types/node": "22.10.5", "@types/tldjs": "^2.3.1" }, "dependencies": { diff --git a/infrastructure/application/pnpm-lock.yaml b/infrastructure/application/pnpm-lock.yaml index 0a6589bbdd..3c4d06b5a1 100644 --- a/infrastructure/application/pnpm-lock.yaml +++ b/infrastructure/application/pnpm-lock.yaml @@ -45,8 +45,8 @@ dependencies: devDependencies: '@types/node': - specifier: ^17.0.38 - version: 17.0.38 + specifier: 22.10.5 + version: 22.10.5 '@types/tldjs': specifier: ^2.3.1 version: 2.3.1 @@ -398,8 +398,10 @@ packages: resolution: {integrity: sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q==} dev: false - /@types/node@17.0.38: - resolution: {integrity: sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g==} + /@types/node@22.10.5: + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} + dependencies: + undici-types: 6.20.0 /@types/tldjs@2.3.1: resolution: {integrity: sha512-BQR04zLE0ve2eNrqxXw/Qp/f6LxvNrj/4A8ZgdQi3SzbBqxFhleI7N4DS/mSjDnODrUaEGgoWg4grAZR1kVj8w==} @@ -1319,7 +1321,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 17.0.38 + '@types/node': 22.10.5 long: 5.2.3 dev: false @@ -1680,6 +1682,9 @@ packages: which-boxed-primitive: 1.0.2 dev: false + /undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + /upath@1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} diff --git a/infrastructure/certificates/package.json b/infrastructure/certificates/package.json index ab8d8e38cf..7b41bfd5d7 100644 --- a/infrastructure/certificates/package.json +++ b/infrastructure/certificates/package.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@types/node": "^14.14.41", + "@types/node": "22.10.5", "@types/tldjs": "^2.3.1" }, "dependencies": { diff --git a/infrastructure/certificates/pnpm-lock.yaml b/infrastructure/certificates/pnpm-lock.yaml index f778369177..90d36fbeee 100644 --- a/infrastructure/certificates/pnpm-lock.yaml +++ b/infrastructure/certificates/pnpm-lock.yaml @@ -28,8 +28,8 @@ dependencies: devDependencies: '@types/node': - specifier: ^14.14.41 - version: 14.14.41 + specifier: 22.10.5 + version: 22.10.5 '@types/tldjs': specifier: ^2.3.1 version: 2.3.1 @@ -177,8 +177,10 @@ packages: resolution: {integrity: sha512-4Dh3dk2TUcbdfHrX0Al90mNGJDvA9NBiTQPzbrjGi/dLxzKCGOYgT8YQ47jUKNFALkAJAadifq0pzyjIUlhVhg==} dev: false - /@types/node@14.14.41: - resolution: {integrity: sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g==} + /@types/node@22.10.5: + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} + dependencies: + undici-types: 6.20.0 /@types/tldjs@2.3.1: resolution: {integrity: sha512-BQR04zLE0ve2eNrqxXw/Qp/f6LxvNrj/4A8ZgdQi3SzbBqxFhleI7N4DS/mSjDnODrUaEGgoWg4grAZR1kVj8w==} @@ -923,7 +925,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.14.41 + '@types/node': 22.10.5 long: 5.2.3 dev: false @@ -1268,6 +1270,9 @@ packages: which-boxed-primitive: 1.0.2 dev: false + /undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + /upath@1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} diff --git a/infrastructure/data/package.json b/infrastructure/data/package.json index 8ee29c4301..c48feb6dd7 100644 --- a/infrastructure/data/package.json +++ b/infrastructure/data/package.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@types/node": "^14.14.41" + "@types/node": "22.10.5" }, "dependencies": { "@pulumi/aws": "^4.0.0", diff --git a/infrastructure/data/pnpm-lock.yaml b/infrastructure/data/pnpm-lock.yaml index 21c2752a68..ec3a8fffee 100644 --- a/infrastructure/data/pnpm-lock.yaml +++ b/infrastructure/data/pnpm-lock.yaml @@ -21,8 +21,8 @@ dependencies: devDependencies: '@types/node': - specifier: ^14.14.41 - version: 14.14.41 + specifier: 22.10.5 + version: 22.10.5 packages: @@ -318,8 +318,10 @@ packages: resolution: {integrity: sha512-dtByW6WiFk5W5Jfgz1VM+YPA21xMXTuSFoLYIDY0L44jDLLflVPtZkYuu3/YxpGcvjzKFBZLU+GyKjR0HOYtyw==} dev: false - /@types/node@14.14.41: - resolution: {integrity: sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g==} + /@types/node@22.10.5: + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} + dependencies: + undici-types: 6.20.0 /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} @@ -1223,7 +1225,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.14.41 + '@types/node': 22.10.5 long: 5.2.3 dev: false @@ -1557,6 +1559,9 @@ packages: which-boxed-primitive: 1.0.2 dev: false + /undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + /upath@1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} diff --git a/infrastructure/networking/package.json b/infrastructure/networking/package.json index 8ee29c4301..c48feb6dd7 100644 --- a/infrastructure/networking/package.json +++ b/infrastructure/networking/package.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@types/node": "^14.14.41" + "@types/node": "22.10.5" }, "dependencies": { "@pulumi/aws": "^4.0.0", diff --git a/infrastructure/networking/pnpm-lock.yaml b/infrastructure/networking/pnpm-lock.yaml index 21c2752a68..ec3a8fffee 100644 --- a/infrastructure/networking/pnpm-lock.yaml +++ b/infrastructure/networking/pnpm-lock.yaml @@ -21,8 +21,8 @@ dependencies: devDependencies: '@types/node': - specifier: ^14.14.41 - version: 14.14.41 + specifier: 22.10.5 + version: 22.10.5 packages: @@ -318,8 +318,10 @@ packages: resolution: {integrity: sha512-dtByW6WiFk5W5Jfgz1VM+YPA21xMXTuSFoLYIDY0L44jDLLflVPtZkYuu3/YxpGcvjzKFBZLU+GyKjR0HOYtyw==} dev: false - /@types/node@14.14.41: - resolution: {integrity: sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g==} + /@types/node@22.10.5: + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} + dependencies: + undici-types: 6.20.0 /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} @@ -1223,7 +1225,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.14.41 + '@types/node': 22.10.5 long: 5.2.3 dev: false @@ -1557,6 +1559,9 @@ packages: which-boxed-primitive: 1.0.2 dev: false + /undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + /upath@1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} diff --git a/sharedb.planx.uk/Dockerfile b/sharedb.planx.uk/Dockerfile index 12d66af13c..2b3b140860 100644 --- a/sharedb.planx.uk/Dockerfile +++ b/sharedb.planx.uk/Dockerfile @@ -1,5 +1,5 @@ -# 18.16.1 = LTS -FROM node:18.16.1-alpine as base +# 22.10.0 = LTS +FROM node:22.10.0-alpine as base WORKDIR /sharedb RUN npm install -g pnpm@8.6.6 From c504a7bdb9b9f07751d5e6d2e94943fda7bea746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Fri, 3 Jan 2025 11:18:43 +0000 Subject: [PATCH 2/4] chore: Remove hardcoded node version --- .github/workflows/pull-request.yml | 18 ++++++------------ .github/workflows/push-main.yml | 6 ++---- .github/workflows/regression-tests.yml | 12 ++++-------- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0532010d74..3180d927c9 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -84,8 +84,7 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - run: pnpm install --frozen-lockfile @@ -128,8 +127,7 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Install dependencies @@ -165,8 +163,7 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig @@ -198,8 +195,7 @@ jobs: - uses: actions/setup-node@v4 if: steps.cache-react-build-assets.outputs.cache-hit != 'true' with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig @@ -256,8 +252,7 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - run: pnpm install --frozen-lockfile @@ -470,8 +465,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml index 39322ccb74..d99d4d7b71 100644 --- a/.github/workflows/push-main.yml +++ b/.github/workflows/push-main.yml @@ -19,8 +19,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} # https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows#using-the-cache-action - name: NPM cache uses: actions/cache@v4 @@ -77,8 +76,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index cd8e3a613e..c8602c0b2b 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -35,8 +35,7 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - run: pnpm install --frozen-lockfile @@ -75,8 +74,7 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig @@ -112,8 +110,7 @@ jobs: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig @@ -146,8 +143,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - # node-version: ${{ vars.NODE_VERSION }} - node-version: 22.10.0 + node-version: ${{ vars.NODE_VERSION }} cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - name: Setup .gitconfig From f101079d5b693b6f77f9678b64eb31ca62cf9b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Fri, 3 Jan 2025 11:50:27 +0000 Subject: [PATCH 3/4] chore: Update engine --- api.planx.uk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.planx.uk/package.json b/api.planx.uk/package.json index 9661556d83..5d84bf7552 100644 --- a/api.planx.uk/package.json +++ b/api.planx.uk/package.json @@ -6,7 +6,7 @@ "type": "module", "exports": "./dist/index.js", "engines": { - "node": ">=18.16", + "node": ">=22.10", "pnpm": "8.6.6" }, "dependencies": { From e2d86e553f622abe717c0c7ecb0152f4ce6b1786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Fri, 3 Jan 2025 12:10:42 +0000 Subject: [PATCH 4/4] docs: Update how to doc --- doc/how-to/how-to-upgrade-nodejs.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/how-to/how-to-upgrade-nodejs.md b/doc/how-to/how-to-upgrade-nodejs.md index 10e8faf96f..a628e13bcb 100644 --- a/doc/how-to/how-to-upgrade-nodejs.md +++ b/doc/how-to/how-to-upgrade-nodejs.md @@ -22,13 +22,15 @@ nvm use 22.10.0 5. Fix any type issues flagged by the above change -5. Update `README.md` +6. Update references to `engines` in API `package.json` file -6. Rebuild docker containers, test and run locally +7. Update `README.md` -6. Upgrade the `NODE_VERSION` on GitHub (Settings > Secrets and variables > Actions > "Variables" tab > Update `NODE_VERSION` variable). This variable is used across our GitHub actions to define which Node version runs our CI services. +8. Rebuild docker containers, test and run locally + +9. Upgrade the `NODE_VERSION` on GitHub (Settings > Secrets and variables > Actions > "Variables" tab > Update `NODE_VERSION` variable). This variable is used across our GitHub actions to define which Node version runs our CI services. Please note - this update is immediate and will effect other open PRs. It's advisable to hardcode the desired Node version into the GitHub action files initially to test CI and regression tests, before making this change. ## planx-core -Steps 4, 5 & 6 also apply here and should be updated shortly after. \ No newline at end of file +Steps 4, 5 & 9 also apply here and should be updated shortly after. \ No newline at end of file