Skip to content

Commit

Permalink
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) = "20.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
   ```
  • Loading branch information
l0b0 committed Jun 3, 2024
1 parent 87b7a0c commit 22dd5a5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
steps:
- uses: linz/action-typescript@dee99184c4305aea6c380a52db9b2d7abaaa3e78 # v3
with:
node-version: 20.x
node-version: 22.x
# Only build containers on branches otherwise container builds are duplicated deploy-nonprod-containers
- name: Set up Docker Buildx
if: ${{ github.ref != 'refs/heads/master' }}
Expand Down Expand Up @@ -38,7 +38,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
- name: Run actionlint to check workflow files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
- uses: linz/action-typescript@dee99184c4305aea6c380a52db9b2d7abaaa3e78 # v3
with:
node-version: 20.x
node-version: 22.x
- name: Setup GIT version
id: version
run: |
Expand Down
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

Expand Down
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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"type": "module",
"engines": {
"node": "^20.13.1"
"node": "^22.2.0"
},
"files": [
"build/src/**"
Expand Down

0 comments on commit 22dd5a5

Please sign in to comment.