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.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
   ```
  • Loading branch information
l0b0 committed Nov 10, 2024
1 parent e30dff9 commit b633958
Show file tree
Hide file tree
Showing 6 changed files with 8 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
Expand Up @@ -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
Expand Down
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

- name: Generate Readme
run: |
Expand Down Expand Up @@ -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
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 @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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

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.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/**"
Expand Down

0 comments on commit b633958

Please sign in to comment.