Skip to content

Commit 8a6af22

Browse files
committed
chore: update node to v22 (LTS) and pnpm v9
1 parent a3804aa commit 8a6af22

File tree

7 files changed

+6372
-4939
lines changed

7 files changed

+6372
-4939
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-18",
77
"features": {
88
"ghcr.io/devcontainers-contrib/features/pnpm:2": {
9-
"version": "8.15.4"
9+
"version": "9.12.3"
1010
}
1111
},
1212
// Features to add to the dev container. More info: https://containers.dev/features.

.github/workflows/lint.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ name: lint
2020
on:
2121
push:
2222

23+
2324
jobs:
2425
Lint:
2526
runs-on: ubuntu-latest
@@ -28,7 +29,7 @@ jobs:
2829
uses: actions/checkout@v4
2930
- uses: pnpm/[email protected]
3031
with:
31-
version: 8.15.4
32+
version: 9.12.3
3233
run_install: false
3334
- name: Setup Node
3435
uses: actions/setup-node@v4
@@ -47,7 +48,7 @@ jobs:
4748
uses: actions/checkout@v4
4849
- uses: pnpm/[email protected]
4950
with:
50-
version: 8.15.4
51+
version: 9.12.3
5152
run_install: false
5253
- name: Setup Node
5354
uses: actions/setup-node@v4

.github/workflows/nextjs_bundle_analysis.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- master # change this if your default branch is named differently
77
workflow_dispatch:
88

9+
910
defaults:
1011
run:
1112
# change this if your nextjs app does not live at the root of the repo
@@ -19,7 +20,7 @@ jobs:
1920

2021
- uses: pnpm/[email protected]
2122
with:
22-
version: 8.15.4
23+
version: 9.12.3
2324
run_install: false
2425
- name: Setup Node
2526
uses: actions/setup-node@v4

.github/workflows/test.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ name: test
2323
on:
2424
push:
2525

26+
2627
jobs:
2728
# check that both APIs are responding normally before running tests
2829
check-api:
@@ -48,7 +49,7 @@ jobs:
4849
uses: actions/checkout@v4
4950
- uses: pnpm/[email protected]
5051
with:
51-
version: 8.15.4
52+
version: 9.12.3
5253
run_install: false
5354
- name: Setup Node
5455
uses: actions/setup-node@v4
@@ -66,7 +67,8 @@ jobs:
6667
path: |
6768
${{ github.workspace }}/.next/cache
6869
# Generate a new cache whenever packages or source files change.
69-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
70+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{
71+
hashFiles('**.[jt]s', '**.[jt]sx') }}
7072
# If source files changed but packages didn't, rebuild from a prior cache.
7173
restore-keys: |
7274
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
@@ -98,7 +100,8 @@ jobs:
98100
DONT_USE_STANDALONE_OUTPUT: true
99101
DANGEROUS__DISABLE_SSL_CERT_CHECK_IN_API_PROXY: 1
100102
DATA_MANAGER_API_SERVER: "https://data-manager-test.xchem-dev.diamond.ac.uk/data-manager-api"
101-
ACCOUNT_SERVER_API_SERVER: "https://account-server-test.xchem-dev.diamond.ac.uk/account-server-api"
103+
ACCOUNT_SERVER_API_SERVER: "https://account-server-test.xchem-dev.diamond.ac.uk\
104+
/account-server-api"
102105
KEYCLOAK_URL: "https://keycloak-test.xchem-dev.diamond.ac.uk/auth/realms/squonk"
103106
PW_USERNAME: "dmit-user-a"
104107
PW_PASSWORD: "${{ secrets.DMIT_USER_A_PASSWORD }}"
@@ -120,7 +123,7 @@ jobs:
120123
uses: actions/checkout@v4
121124
- uses: pnpm/[email protected]
122125
with:
123-
version: 8.15.4
126+
version: 9.12.3
124127
run_install: false
125128
- name: Setup Node
126129
uses: actions/setup-node@v4
@@ -138,7 +141,8 @@ jobs:
138141
path: |
139142
${{ github.workspace }}/.next/cache
140143
# Generate a new cache whenever packages or source files change.
141-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
144+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{
145+
hashFiles('**.[jt]s', '**.[jt]sx') }}
142146
# If source files changed but packages didn't, rebuild from a prior cache.
143147
restore-keys: |
144148
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
@@ -167,7 +171,8 @@ jobs:
167171
DANGEROUS__DISABLE_SSL_CERT_CHECK_IN_API_PROXY: 1
168172
BASE_PATH: ""
169173
DATA_MANAGER_API_SERVER: "https://data-manager-test.xchem-dev.diamond.ac.uk/data-manager-api"
170-
ACCOUNT_SERVER_API_SERVER: "https://account-server-test.xchem-dev.diamond.ac.uk/account-server-api"
174+
ACCOUNT_SERVER_API_SERVER: "https://account-server-test.xchem-dev.diamond.ac.uk\
175+
/account-server-api"
171176
KEYCLOAK_URL: "https://keycloak-test.xchem-dev.diamond.ac.uk/auth/realms/squonk"
172177
PW_USERNAME: "dmit-user-a"
173178
PW_PASSWORD: "${{ secrets.DMIT_USER_A_PASSWORD }}"

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Install dependencies only when needed
2-
FROM node:20.11.1-alpine3.18 AS base
2+
FROM node:22.11.0-a1pine3.20 AS base
33

44
FROM base AS deps
55
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
@@ -12,7 +12,7 @@ ARG SKIP_CHECKS
1212
ENV SKIP_CHECKS=${SKIP_CHECKS:-0}
1313
RUN echo "SKIP_CHECKS=${SKIP_CHECKS}"
1414

15-
RUN npm i -g pnpm@8.15.4
15+
RUN npm i -g pnpm@9.12.3
1616
RUN if $SKIP_CHECKS; then pnpm fetch --prod; else pnpm fetch; fi
1717
RUN if $SKIP_CHECKS; \
1818
then pnpm i -P --frozen-lockfile --offline --ignore-scripts; \
@@ -40,7 +40,7 @@ ENV GIT_SHA=${GIT_SHA:-""}
4040
ARG BASE_PATH
4141
ENV BASE_PATH=${BASE_PATH}
4242

43-
# RUN npm i -g pnpm@8.15.4
43+
# RUN npm i -g pnpm@9.12.3
4444
RUN echo "GIT_SHA=${GIT_SHA}" && npm run build
4545

4646
# If using npm comment out above and use below instead

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"@tanstack/react-query-devtools": "5.59.20",
6262
"@tanstack/react-table": "8.20.5",
6363
"@types/lodash-es": "4.17.12",
64-
"@types/node": "20.11.26",
64+
"@types/node": "22.9.0",
6565
"@types/plotly.js-basic-dist": "1.54.4",
6666
"@types/prismjs": "1.26.5",
6767
"@types/react": "18.3.12",

0 commit comments

Comments
 (0)