From e4d63724901def79eee0f3a0c62a83b8bdc35f75 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 25 Oct 2023 03:03:31 +0000 Subject: [PATCH 1/3] Update Node.js to v20 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 36ad0a2f9..76115308d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,7 +71,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": "18.x" + "node": "20.x" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 57fec99c9..252cf11a8 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "private": true, "engines": { - "node": "18.x" + "node": "20.x" }, "dependencies": { "@angular-devkit/build-angular": "^16.1.0", From f707532ca90fecaa1716ba14c89342854836c94c Mon Sep 17 00:00:00 2001 From: Lukas Merz Date: Wed, 25 Oct 2023 11:46:07 +0200 Subject: [PATCH 2/3] node-20-update: Adjust node version where needed; update README --- .azure-pipelines/templates/variables.yaml | 2 +- .nvmrc | 1 + Dockerfile | 2 +- README.md | 28 ++++++++++++++++++----- package-lock.json | 15 +++++++++--- package.json | 2 +- renovate.json | 4 ++-- 7 files changed, 40 insertions(+), 14 deletions(-) create mode 100644 .nvmrc diff --git a/.azure-pipelines/templates/variables.yaml b/.azure-pipelines/templates/variables.yaml index 07bdcd12d..169d334a3 100644 --- a/.azure-pipelines/templates/variables.yaml +++ b/.azure-pipelines/templates/variables.yaml @@ -1,4 +1,4 @@ variables: VM_IMAGE: 'ubuntu-latest' - NODE_VERSION: '18.x' + NODE_VERSION: '20.x' NODE_OPTIONS: '--max_old_space_size=8192' # increase node memory size to avoid out-of-memory exceptions diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..98a61e169 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20.8 diff --git a/Dockerfile b/Dockerfile index 1b654c84e..0c3fc23c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18.15-alpine AS build-app +FROM node:20.8-alpine AS build-app # Provide overrides for APP_VERSION and APP_RELEASE as build-args and expose them as ENV variables for the update-version.js script ARG APP_VERSION diff --git a/README.md b/README.md index 4ae17ba78..3a0496c46 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,28 @@ This project was generated with [Angular CLI](https://github.com/angular/angular > # Table of Contents > -> 1. [Development server](#development-server) -> 2. [Docker](#docker) -> 3. [Local Backend](#local-backend) -> 4. [Naming conventions](#naming-conventions) -> 5. [Code documentation](#code-documentation) -> 6. [Git conventions](#git-conventions) +> 1. [Node version](#node-version) +> 2. [Development server](#development-server) +> 3. [Docker](#docker) +> 4. [Local Backend](#local-backend) +> 5. [Naming conventions](#naming-conventions) +> 6. [Code documentation](#code-documentation) +> 7. [Git conventions](#git-conventions) + +## Node version + +We strive to use the most recent LTS version. Whenever an update is due, make sure you adjust the following: + +- `Dockerfile` +- `.azure-pipelines/templates/variables.yaml` +- `.nvmrc` +- `package.json`, update the `@typed/node` package to the matching version +- `renovate.json` update both `"matchManagers": ["dockerfile"]` and `"matchManagers": ["npm"]` to the matching version + +You should point it towards the latest minor update (e.g. 20.x), such that we can control potentially larger updates. + +If you're using [nvm](https://github.com/nvm-sh/nvm) on a Unix-based environment, you can conveniently use `nvm use` in +the root directory and it will automatically set the node version to the correct one. ## Development server diff --git a/package-lock.json b/package-lock.json index 76115308d..08b903c20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "@ngrx/store-devtools": "^16.0.1", "@terraformer/arcgis": "^2.1.2", "@types/geojson": "^7946.0.10", - "@types/node": "^18.13.0", + "@types/node": "^20.8", "@types/terraformer__arcgis": "^2.0.2", "@types/twitter-for-web": "^0.0.4", "@types/uuid": "^9.0.4", @@ -5071,8 +5071,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.13.0", - "license": "MIT" + "version": "20.8.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.8.tgz", + "integrity": "sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ==", + "dependencies": { + "undici-types": "~5.25.1" + } }, "node_modules/@types/qs": { "version": "6.9.7", @@ -15472,6 +15476,11 @@ "through": "^2.3.8" } }, + "node_modules/undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "license": "MIT", diff --git a/package.json b/package.json index 252cf11a8..1a426420a 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@ngrx/store-devtools": "^16.0.1", "@terraformer/arcgis": "^2.1.2", "@types/geojson": "^7946.0.10", - "@types/node": "^18.13.0", + "@types/node": "^20.8", "@types/terraformer__arcgis": "^2.0.2", "@types/twitter-for-web": "^0.0.4", "@types/uuid": "^9.0.4", diff --git a/renovate.json b/renovate.json index 9d5b33834..3356145a0 100644 --- a/renovate.json +++ b/renovate.json @@ -10,12 +10,12 @@ { "matchManagers": ["npm"], "matchPackageNames": ["@types/node"], - "allowedVersions": "<18" + "allowedVersions": "<20" }, { "matchManagers": ["dockerfile"], "matchPackageNames": ["node"], - "allowedVersions": "<18" + "allowedVersions": "<20" }, { "matchManagers": ["npm"], From eb6fbce118068da29021afd1cd00fb5c020d08be Mon Sep 17 00:00:00 2001 From: Sebastian Wendland Date: Thu, 26 Oct 2023 10:14:36 +0200 Subject: [PATCH 3/3] node-20-update: Minor adjustments in the `README` to also mention `package-lock.json`. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a0496c46..8d315c604 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ We strive to use the most recent LTS version. Whenever an update is due, make su - `Dockerfile` - `.azure-pipelines/templates/variables.yaml` - `.nvmrc` -- `package.json`, update the `@typed/node` package to the matching version +- `package.json`, update the `@typed/node` package to the matching version; run `npm install` afterwards to freshly generate the `package-lock.json` - `renovate.json` update both `"matchManagers": ["dockerfile"]` and `"matchManagers": ["npm"]` to the matching version You should point it towards the latest minor update (e.g. 20.x), such that we can control potentially larger updates.