Skip to content

Commit

Permalink
chore: Upgrade to Node 22 (LTS)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Jan 3, 2025
1 parent 0d5e368 commit 5c4bc22
Show file tree
Hide file tree
Showing 27 changed files with 240 additions and 194 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.16.1
v22.10.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down
6 changes: 3 additions & 3 deletions api.planx.uk/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 ##
Expand Down
2 changes: 1 addition & 1 deletion api.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 5c4bc22

Please sign in to comment.