Skip to content

Commit

Permalink
chore: node 20 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
bryn-pins committed Nov 7, 2024
1 parent 7013f97 commit 4b46ff4
Show file tree
Hide file tree
Showing 29 changed files with 57 additions and 58 deletions.
3 changes: 1 addition & 2 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
18

20
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Note: when starting a new appeal as an appellant, if you cannot progress beyond
Install NodeJS using [nvm](https://github.com/nvm-sh/nvm#installing-and-updating)

```
nvm install 18
nvm use 18
nvm alias default 18
nvm install 20.17.0
nvm use 20.17.0
nvm alias default 20
```

### Dependencies
Expand Down
10 changes: 5 additions & 5 deletions azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,23 @@ extends:
steps:
- template: ../steps/node_script.yml
parameters:
nodeVersion: 18
nodeVersion: 20
script: npm ci
- template: ../steps/node_script.yml
parameters:
condition: succeededOrFailed()
script: npm run lint
nodeVersion: 18
nodeVersion: 20
- template: ../steps/node_script.yml
parameters:
condition: succeededOrFailed()
script: npm run test
nodeVersion: 18
nodeVersion: 20
- template: ../steps/node_script.yml
parameters:
condition: and(succeededOrFailed(),eq(variables['Build.SourceBranchName'], 'main'))
script: npm run integration-test
nodeVersion: 18
nodeVersion: 20
- template: ../steps/check_changed_files.yml
parameters:
pathFilters:
Expand Down Expand Up @@ -200,7 +200,7 @@ extends:
steps:
- template: ../steps/node_script.yml
parameters:
nodeVersion: 18
nodeVersion: 20
script: npm ci --omit=dev
workingDirectory: $(Build.Repository.LocalPath)
- script: |
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines-db-seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- checkout: self
- template: steps/node_script.yml@templates
parameters:
nodeVersion: 18
nodeVersion: 20
script: npm ci
- template: steps/azure_auth.yml@templates
- template: steps/azure_get_secrets.yml@templates
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ extends:
- ${{ if eq(parameters.schemaMigration, true) }}:
- template: ../steps/node_script.yml
parameters:
nodeVersion: 18
nodeVersion: 20
environmentVariables:
SQL_CONNECTION_STRING_ADMIN: $(SQL_CONNECTION_STRING_ADMIN)
script: npm run migrate:prod
workingDirectory: $(Build.Repository.LocalPath)/packages/database
- ${{ if eq(parameters.seedData, true) }}:
- template: ../steps/node_script.yml
parameters:
nodeVersion: 18
nodeVersion: 20
environmentVariables:
SQL_CONNECTION_STRING: $(SQL_CONNECTION_STRING)
script: npm run seed:prod
Expand Down
10 changes: 5 additions & 5 deletions azure-pipelines-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resources:
type: github
endpoint: Planning-Inspectorate
name: Planning-Inspectorate/common-pipeline-templates
ref: refs/tags/release/3.17.0
ref: refs/tags/release/3.18.0

extends:
template: stages/wrapper_ci.yml@templates
Expand All @@ -27,20 +27,20 @@ extends:
steps:
- template: ../steps/node_script.yml
parameters:
nodeVersion: 18
nodeVersion: 20
script: npm ci
- template: ../steps/node_script.yml
parameters:
condition: succeededOrFailed()
script: npm run lint
nodeVersion: 18
nodeVersion: 20
- template: ../steps/node_script.yml
parameters:
condition: succeededOrFailed()
script: npm run test
nodeVersion: 18
nodeVersion: 20
- template: ../steps/node_script.yml
parameters:
condition: succeededOrFailed()
script: npm run integration-test
nodeVersion: 18
nodeVersion: 20
8 changes: 4 additions & 4 deletions azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ extends:
- ${{ if eq(parameters.schemaMigration, true) }}:
- template: ../steps/node_script.yml
parameters:
nodeVersion: 18
nodeVersion: 20
environmentVariables:
SQL_CONNECTION_STRING_ADMIN: $(SQL_CONNECTION_STRING_ADMIN)
script: npm run migrate:prod
workingDirectory: $(Build.Repository.LocalPath)/packages/database
- ${{ if eq(parameters.seedData, true) }}:
- template: ../steps/node_script.yml
parameters:
nodeVersion: 18
nodeVersion: 20
environmentVariables:
SQL_CONNECTION_STRING: $(SQL_CONNECTION_STRING)
script: npm run seed:prod
Expand Down Expand Up @@ -190,11 +190,11 @@ extends:
persistCredentials: true
- template: ../steps/node_script.yml
parameters:
nodeVersion: 18
nodeVersion: 20
script: npm ci
- template: ../steps/node_script.yml
parameters:
nodeVersion: 18
nodeVersion: 20
script: npm run release
environmentVariables:
GH_TOKEN: $(GH_TOKEN)
Expand Down
2 changes: 1 addition & 1 deletion dev/data/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:20-alpine

# copy app
WORKDIR /opt/app/data
Expand Down
2 changes: 1 addition & 1 deletion dev/mock-horizon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:20-alpine

# copy app
WORKDIR /opt/dev/mock-horizon
Expand Down
2 changes: 1 addition & 1 deletion dev/mock-notify/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:20-alpine

# copy app
WORKDIR /opt/dev/mock-notify
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version: '3.7'
services:
clamav-server:
profiles: ['all', 'appeals']
image: node:18-alpine
image: node:20-alpine
ports:
- 3310:3310
working_dir: /opt/mock-clamav
Expand All @@ -23,7 +23,7 @@ services:

pdf-service-api:
profiles: ['all', 'appeals']
image: node:18-alpine
image: node:20-alpine
ports:
- 3004:3000
working_dir: /opt/mock-pdf
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version: '3.7'
services:
auth-server:
profiles: ['all', 'api', 'appeals', 'comment', 'documents']
image: node:18-alpine
image: node:20-alpine
environment:
# Logging
LOGGER_LEVEL: 'debug'
Expand Down Expand Up @@ -70,7 +70,7 @@ services:

appeals-service-api:
profiles: ['all', 'api', 'appeals', 'comment']
image: node:18-alpine
image: node:20-alpine
environment:
APP_APPEALS_BASE_URL: http://forms-web-app:9003
APP_LPA_QUESTIONNAIRE_BASE_URL: http://lpa-questionnaire-web-app:9001
Expand Down Expand Up @@ -138,7 +138,7 @@ services:

document-service-api: &document-service
profiles: ['all', 'api', 'appeals', 'documents']
image: node:18-alpine
image: node:20-alpine
environment:
AUTH_BASE_URL: http://auth-server:3000
BO_STORAGE_CONTAINER_HOST: http://localhost:4004/devstoreaccount1
Expand Down Expand Up @@ -184,7 +184,7 @@ services:

forms-web-app:
profiles: ['all', 'appeals']
image: node:18-alpine
image: node:20-alpine
environment:
ALLOW_TESTING_OVERRIDES: 'true'
APPEALS_SERVICE_API_URL: http://appeals-service-api:3000
Expand Down Expand Up @@ -229,7 +229,7 @@ services:
- ./packages/common:/opt/app/node_modules/@pins/common
- ./packages/database:/opt/app/node_modules/@pins/database
- ./packages/forms-web-app:/opt/app
command: npm run start:dev:debug
command: npm run start:dev
# if enabling debug, be sure to uncomment / expose the debug port above.
# command: npm run start:dev:debug

Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"engines": {
"node": ">=18.0.0 <19.0.0",
"node": ">=20.0.0 <21.0.0",
"npm": ">=9.0.0 <11.0.0"
},
"description": "Appeal a planning decision - these are utility scripts for the whole repo",
Expand Down
2 changes: 1 addition & 1 deletion packages/appeals-service-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1/2: Build
FROM node:18-alpine AS build
FROM node:20-alpine AS build

WORKDIR /opt/packages/appeals-service-api

Expand Down
2 changes: 1 addition & 1 deletion packages/appeals-service-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"engines": {
"node": ">=18.0.0 <19.0.0",
"node": ">=20.0.0 <21.0.0",
"npm": ">=9.0.0 <11.0.0"
},
"main": "src/main.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1/2: Build
FROM node:18-alpine AS build
FROM node:20-alpine AS build

WORKDIR /opt/packages/auth-server

Expand Down
2 changes: 1 addition & 1 deletion packages/auth-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"description": "Auth server for appeals",
"engines": {
"node": ">=18.0.0 <19.0.0",
"node": ">=20.0.0 <21.0.0",
"npm": ">=9.0.0 <11.0.0"
},
"prisma": {
Expand Down
2 changes: 1 addition & 1 deletion packages/business-rules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"main": "src/index.js",
"engines": {
"node": ">=18.0.0 <19.0.0",
"node": ">=20.0.0 <21.0.0",
"npm": ">=9.0.0 <11.0.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Common modules to use between services",
"private": true,
"engines": {
"node": ">=18.0.0 <19.0.0",
"node": ">=20.0.0 <21.0.0",
"npm": ">=9.0.0 <11.0.0"
},
"main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Common sql database access",
"private": true,
"engines": {
"node": ">=18.0.0 <19.0.0",
"node": ">=20.0.0 <21.0.0",
"npm": ">=9.0.0 <11.0.0"
},
"prisma": {
Expand Down
2 changes: 1 addition & 1 deletion packages/document-service-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1/2: Build
FROM node:18-alpine AS build
FROM node:20-alpine AS build

WORKDIR /opt/packages/document-service-api

Expand Down
Loading

0 comments on commit 4b46ff4

Please sign in to comment.