From b633958aa6176a2a16a2940f9744829142cafcfe Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Tue, 4 Jun 2024 09:05:36 +1200 Subject: [PATCH] build: update to Node.js 22 TDE-1193 Keep our software up to date, and get any useful features, fixes, and optimisations from new versions of dependencies. 1. Update the engine: ``` jq '.engines.node = "^22.11.0"' package.json | sponge package.json ``` 2. Update the uses of `linz/action-typescript`: ``` for path in .github/workflows/*.y*ml; do yq --inplace '(.jobs.*.steps[] | select(.uses == "linz/action-typescript*").with.node-version) = "22.x"' "$path" done ``` 3. Update Dockerfile manifest digest: ``` sed --in-place --expression="s/^FROM node:.*/FROM node:22-slim@$(docker manifest inspect node:22-slim | jq --raw-output '.manifests[] | select(.platform.architecture == "amd64" and .platform.os == "linux") | .digest')/" Dockerfile ``` 4. Verify the change: ``` git clean -fdx --exclude=.idea npm install npm run build npm run test npm run docs npm run lint ``` --- .github/workflows/pull-request-container.yml | 2 +- .github/workflows/push.yml | 4 ++-- .github/workflows/release-please.yml | 2 +- Dockerfile | 2 +- package-lock.json | 2 +- package.json | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull-request-container.yml b/.github/workflows/pull-request-container.yml index 6b6bbf59..a06005f0 100644 --- a/.github/workflows/pull-request-container.yml +++ b/.github/workflows/pull-request-container.yml @@ -26,7 +26,7 @@ jobs: steps: - uses: linz/action-typescript@dee99184c4305aea6c380a52db9b2d7abaaa3e78 # v3 with: - node-version: 20.x + node-version: 22.x - name: Setup GIT version id: version diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7cc599a9..1b512046 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -6,7 +6,7 @@ jobs: steps: - uses: linz/action-typescript@dee99184c4305aea6c380a52db9b2d7abaaa3e78 # v3 with: - node-version: 20.x + node-version: 22.x - name: Generate Readme run: | @@ -55,7 +55,7 @@ jobs: steps: - uses: linz/action-typescript@dee99184c4305aea6c380a52db9b2d7abaaa3e78 # v3 with: - node-version: 20.x + node-version: 22.x - name: Download actionlint run: docker build --tag actionlint - < .github/workflows/actionlint.dockerfile diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index a1356b4c..9f338129 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -36,7 +36,7 @@ jobs: steps: - uses: linz/action-typescript@dee99184c4305aea6c380a52db9b2d7abaaa3e78 # v3 with: - node-version: 20.x + node-version: 22.x - name: Setup GIT version id: version diff --git a/Dockerfile b/Dockerfile index 1ce55934..e80f4bad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-slim@sha256:cffed8cd39d6a380434e6d08116d188c53e70611175cd5ec7700f93f32a935a6 +FROM node:22-slim@sha256:3a17df2ede55682bccb79e45d71b5213295ce5eae25a0816877b0e548595de1b RUN apt-get update && apt-get install openssh-client git -y diff --git a/package-lock.json b/package-lock.json index 1e29a826..2aa9b57f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "stac-ts": "^1.0.3" }, "engines": { - "node": "^20.13.1" + "node": "^22.11.0" } }, "node_modules/@aws-crypto/crc32": { diff --git a/package.json b/package.json index 39a38a3d..a126887a 100644 --- a/package.json +++ b/package.json @@ -22,14 +22,14 @@ "build": "tsc", "docs": "node build/src/readme/readme.generate.js", "lint": "npx eslint . --ignore-path .gitignore", - "test": "node --test build/" + "test": "node --test" }, "publishConfig": { "access": "restricted" }, "type": "module", "engines": { - "node": "^20.13.1" + "node": "^22.11.0" }, "files": [ "build/src/**"