feat: upgrade project to run node v20

This commit is contained in:
Luke Watts
2023-09-30 15:49:36 +02:00
parent 24738566ee
commit b0dcadeebb
10 changed files with 22 additions and 16 deletions

View File

@@ -27,7 +27,7 @@ aliases:
# use a base image running node v18 with chrome/firefox browsers preinstalled # use a base image running node v18 with chrome/firefox browsers preinstalled
# This can be applied to any job via `docker: *docker` syntax # This can be applied to any job via `docker: *docker` syntax
- &docker - &docker
- image: cimg/node:18.17.1-browsers - image: cimg/node:20.7.0-browsers
# Use base image with support for node version parameter and matrix # Use base image with support for node version parameter and matrix
# This can be applied to any job via `<<: *docker_matrix` syntax # This can be applied to any job via `<<: *docker_matrix` syntax
@@ -35,7 +35,7 @@ aliases:
parameters: parameters:
node-version: node-version:
type: string type: string
default: 18.17.1-browsers default: 20.7.0-browsers
docker: docker:
- image: cimg/node:<< parameters.node-version >> - image: cimg/node:<< parameters.node-version >>

View File

@@ -1,4 +1,4 @@
image: node:18 image: node:20
tasks: tasks:
- init: yarn install && yarn run build - init: yarn install && yarn run build
command: yarn run start command: yarn run start

View File

@@ -1 +1 @@
18.17.1 20.8.0

1
.nvmrc
View File

@@ -1 +0,0 @@
18

View File

@@ -27,7 +27,7 @@ This project and everyone participating in it is governed by the [Code of Conduc
**Prerequisites** **Prerequisites**
- [Node.js v18](https://nodejs.org/en/download/) - [Node.js v20](https://nodejs.org/en/download/)
- [Yarn v3](https://yarnpkg.com/getting-started/install) - [Yarn v3](https://yarnpkg.com/getting-started/install)
With the above tools available, you are ready: With the above tools available, you are ready:

View File

@@ -48,7 +48,7 @@
"@types/dateformat": "^3.0.1", "@types/dateformat": "^3.0.1",
"@types/fs-extra": "^9.0.2", "@types/fs-extra": "^9.0.2",
"@types/jest": "^29.2.0", "@types/jest": "^29.2.0",
"@types/node": "18", "@types/node": "^20.8.0",
"@types/request": "^2.48.5", "@types/request": "^2.48.5",
"@types/uuid": "^9.0.0", "@types/uuid": "^9.0.0",
"@types/webpack": "^5.28.0", "@types/webpack": "^5.28.0",
@@ -70,7 +70,7 @@
"webpack-node-externals": "^3.0.0" "webpack-node-externals": "^3.0.0"
}, },
"engines": { "engines": {
"node": "18" "node": "20"
}, },
"private": true "private": true
} }

View File

@@ -140,7 +140,7 @@
"@types/browser-image-compression": "^1.0.9", "@types/browser-image-compression": "^1.0.9",
"@types/flux-standard-action": "1.1.0", "@types/flux-standard-action": "1.1.0",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/node": "18", "@types/node": "^20.8.0",
"@types/pubsub-js": "^1.5.18", "@types/pubsub-js": "^1.5.18",
"@types/react": "17.0.2", "@types/react": "17.0.2",
"@types/react-dom": "17.0.2", "@types/react-dom": "17.0.2",
@@ -211,7 +211,7 @@
}, },
"engines": { "engines": {
"npm": "please-use-yarn", "npm": "please-use-yarn",
"node": ">=18.17.1 <19.0.0" "node": ">=20"
}, },
"packageManager": "yarn@3.6.3" "packageManager": "yarn@3.6.3"
} }

View File

@@ -14,7 +14,7 @@ title: Local Setup
This will be used to run the local server. It included the `npm` package manager This will be used to run the local server. It included the `npm` package manager
:::tip :::tip
The recommended version of node to use is **node 18** as this is what also runs in the production environment. If running a higher version and experiencing issues please file a bug report. The recommended version of node to use is **node 20** as this is what also runs in the production environment. If running a higher version and experiencing issues please file a bug report.
You can use tools like You can use tools like
[nodenv](https://github.com/nodenv/nodenv) [nodenv](https://github.com/nodenv/nodenv)

View File

@@ -7,8 +7,8 @@ function envCheck() {
exec: () => /yarn/.test(process.env.npm_execpath), exec: () => /yarn/.test(process.env.npm_execpath),
}, },
{ {
message: 'Use Node v18', message: 'Use Node v20',
exec: () => process.versions.node.split('.')[0] === '18', exec: () => process.versions.node.split('.')[0] === '20',
}, },
] ]

View File

@@ -10652,7 +10652,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/node@npm:*, @types/node@npm:18, @types/node@npm:>=12, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0, @types/node@npm:^18.11.18": "@types/node@npm:*, @types/node@npm:>=12, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0, @types/node@npm:^18.11.18":
version: 18.14.0 version: 18.14.0
resolution: "@types/node@npm:18.14.0" resolution: "@types/node@npm:18.14.0"
checksum: d83fcf5e4ed544755dd9028f5cbb6b9d46235043159111bb2ad62223729aee581c0144a9f6df8ba73d74011db9ed4ebd7af2fd5e0996714e3beb508a5da8ac5c checksum: d83fcf5e4ed544755dd9028f5cbb6b9d46235043159111bb2ad62223729aee581c0144a9f6df8ba73d74011db9ed4ebd7af2fd5e0996714e3beb508a5da8ac5c
@@ -10680,6 +10680,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/node@npm:^20.8.0":
version: 20.8.0
resolution: "@types/node@npm:20.8.0"
checksum: ebad6342d54238a24bf980d7750117a5d67749c9b72cbb7a974a1e932c39034aa3a810d669e007e8a5071782a253aa069a187b614407a382403c9826e837c849
languageName: node
linkType: hard
"@types/normalize-package-data@npm:^2.4.0": "@types/normalize-package-data@npm:^2.4.0":
version: 2.4.1 version: 2.4.1
resolution: "@types/normalize-package-data@npm:2.4.1" resolution: "@types/normalize-package-data@npm:2.4.1"
@@ -19923,7 +19930,7 @@ __metadata:
"@types/dateformat": ^3.0.1 "@types/dateformat": ^3.0.1
"@types/fs-extra": ^9.0.2 "@types/fs-extra": ^9.0.2
"@types/jest": ^29.2.0 "@types/jest": ^29.2.0
"@types/node": 18 "@types/node": ^20.8.0
"@types/request": ^2.48.5 "@types/request": ^2.48.5
"@types/uuid": ^9.0.0 "@types/uuid": ^9.0.0
"@types/webpack": ^5.28.0 "@types/webpack": ^5.28.0
@@ -27228,7 +27235,7 @@ __metadata:
"@types/browser-image-compression": ^1.0.9 "@types/browser-image-compression": ^1.0.9
"@types/flux-standard-action": 1.1.0 "@types/flux-standard-action": 1.1.0
"@types/jest": ^27.4.1 "@types/jest": ^27.4.1
"@types/node": 18 "@types/node": ^20.8.0
"@types/pubsub-js": ^1.5.18 "@types/pubsub-js": ^1.5.18
"@types/react": 17.0.2 "@types/react": 17.0.2
"@types/react-dom": 17.0.2 "@types/react-dom": 17.0.2