Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update to Node.js 22 TDE-1193
Browse files Browse the repository at this point in the history
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.2.0"' package.json | sponge package.json
   ```
2. Update the lock file:

   ```
   npm install
   ```
3. 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
   ```
4. 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
   ```
5. Run Node.js tests without an argument. Something changed in the
   Node.js CLI in this release, breaking the old invocation.
l0b0 committed Sep 22, 2024
1 parent 249799a commit 40955e4
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-container.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:
steps:
- uses: linz/action-typescript@dee99184c4305aea6c380a52db9b2d7abaaa3e78 # v3
with:
node-version: 20.x
node-version: 22.x

- name: Setup GIT version
id: version
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:20-slim@sha256:cffed8cd39d6a380434e6d08116d188c53e70611175cd5ec7700f93f32a935a6
# Use manifest digest for multi-platform support
FROM node:22-slim@sha256:54284c1aa369d17342e9b029339992695df9597829cc8313bd11008ec091699a

RUN apt-get update && apt-get install openssh-client git -y

2 changes: 1 addition & 1 deletion package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -21,14 +21,14 @@
"scripts": {
"build": "tsc",
"lint": "npx eslint . --ignore-path .gitignore",
"test": "node --test build/"
"test": "node --test 'build/**/*.test.js'"
},
"publishConfig": {
"access": "restricted"
},
"type": "module",
"engines": {
"node": "^20.13.1"
"node": "^22.2.0"
},
"files": [
"build/src/**"

0 comments on commit 40955e4

Please sign in to comment.