From 576d8951634016192b19b3d573e2e24d5fd8e6c1 Mon Sep 17 00:00:00 2001 From: Costas Papastathis Date: Wed, 24 Jun 2026 12:55:21 +0200 Subject: [PATCH 1/2] feat!: remove Node 20 support --- .github/workflows/ci.yml | 2 +- README.md | 2 +- package-lock.json | 40 ++++++++++++++++++++++++++++++---------- package.json | 4 ++-- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 485f49e..997166f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - node-version: [20.x, 22.x, 24.x] + node-version: [22.x, 24.x] os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/README.md b/README.md index dda98dd..5af9a29 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ path, allowing you to execute a single file as a function. | --------------- | ------------- | | License: | Apache-2.0 | | Issue tracker: | https://github.com/nodeshift/faas-js-runtime/issues | -| Engines: | Node.js >= 20 | +| Engines: | Node.js >= 22 | The function is loaded and then invoked for incoming HTTP requests at `localhost:8080`. The incoming request may be a diff --git a/package-lock.json b/package-lock.json index d81dfe2..3fb9494 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@cyclonedx/cyclonedx-npm": "^3.0.0", - "@types/node": "^20.4.7", + "@types/node": "^24.0.0", "@typescript-eslint/eslint-plugin": "^6.4.0", "@typescript-eslint/parser": "^6.4.1", "colortape": "^0.1.2", @@ -38,7 +38,7 @@ "typescript": "^5.7.3" }, "engines": { - "node": "^24 || ^22 || ^20" + "node": "^24 || ^22" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1205,10 +1205,14 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.4.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.7.tgz", - "integrity": "sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==", - "dev": true + "version": "24.13.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.2.tgz", + "integrity": "sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -7597,6 +7601,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + }, "node_modules/unique-filename": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-4.0.0.tgz", @@ -8713,10 +8724,13 @@ "dev": true }, "@types/node": { - "version": "20.4.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.7.tgz", - "integrity": "sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==", - "dev": true + "version": "24.13.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.2.tgz", + "integrity": "sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==", + "dev": true, + "requires": { + "undici-types": "~7.18.0" + } }, "@types/normalize-package-data": { "version": "2.4.1", @@ -13015,6 +13029,12 @@ "which-boxed-primitive": "^1.0.2" } }, + "undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true + }, "unique-filename": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-4.0.0.tgz", diff --git a/package.json b/package.json index 65f66e4..431a1b0 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "author": "Red Hat, Inc.", "license": "Apache-2.0", "engines": { - "node": "^24 || ^22 || ^20" + "node": "^24 || ^22" }, "type": "commonjs", "scripts": { @@ -47,7 +47,7 @@ }, "devDependencies": { "@cyclonedx/cyclonedx-npm": "^3.0.0", - "@types/node": "^20.4.7", + "@types/node": "^24.0.0", "@typescript-eslint/eslint-plugin": "^6.4.0", "@typescript-eslint/parser": "^6.4.1", "colortape": "^0.1.2", From 5428c01f22bb512017eb6d1a27ccf6863de43ca6 Mon Sep 17 00:00:00 2001 From: Costas Papastathis Date: Wed, 24 Jun 2026 13:45:21 +0200 Subject: [PATCH 2/2] fix: updating CI workflows --- .../{ci.yml => nodejs-ci-action.yml} | 30 +++++++--- .github/workflows/release-please.yaml | 36 +++++++++--- .github/workflows/release.yaml | 21 ------- .release-please-manifest.json | 3 + release-please-config.json | 57 +++++++++++++++++++ 5 files changed, 109 insertions(+), 38 deletions(-) rename .github/workflows/{ci.yml => nodejs-ci-action.yml} (57%) delete mode 100644 .github/workflows/release.yaml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/ci.yml b/.github/workflows/nodejs-ci-action.yml similarity index 57% rename from .github/workflows/ci.yml rename to .github/workflows/nodejs-ci-action.yml index 997166f..56d5d34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/nodejs-ci-action.yml @@ -1,39 +1,51 @@ name: Node.js CI on: - push: - branches: [ main ] pull_request: - branches: [ main ] + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: nodejs-ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build: strategy: + fail-fast: false matrix: - node-version: [22.x, 24.x] + node-version: [22.x, 24.x, 26.x] os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} + steps: - uses: actions/checkout@v6 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} + - run: npm ci - run: npm run build --if-present - run: npm test + - name: Coveralls Parallel - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@v2 with: - github-token: ${{ secrets.github_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} flag-name: run-${{ matrix.node-version }} parallel: true + finish: + name: Node.js CI needs: build runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@v2 with: - github-token: ${{ secrets.github_token }} - parallel-finished: true \ No newline at end of file + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 2873472..d30a189 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -1,29 +1,49 @@ +name: release-please on: push: branches: - main -name: release-please + +permissions: + contents: write + issues: write + pull-requests: write + id-token: write + jobs: release-please: runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} steps: - - uses: GoogleCloudPlatform/release-please-action@v5 + - uses: googleapis/release-please-action@v4 id: release with: - token: ${{ secrets.NODESHIFT_RELEASES_TOKEN }} release-type: node - bump-minor-pre-major: "true" - package-name: faas-js-runtime - changelog-types: '[{"type":"enhancement","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"cleanup","section":"Miscellaneous","hidden":false},{"type":"api-change","section":"API Changes","hidden":false},{"type":"documentation","section":"Documentation","hidden":false},{"type":"techdebt","section":"Miscellaneous","hidden":false},{"type":"proposal","section":"Miscellaneous","hidden":false},{"type":"feat","section":"Features","hidden":false}]' + + publish: + runs-on: ubuntu-latest + needs: release-please + if: needs.release-please.outputs.release_created == 'true' + + steps: - uses: actions/checkout@v6 with: ref: release-please--branches--main--components--faas-js-runtime - name: Update package SBOM - if: ${{steps.release.outputs.release-created}} == 'false' run: | git config --global user.name "NodeShift Bot (As Luke Holmquist)" git config --global user.email "lholmqui@redhat.com" npm run sbom git add . git commit --signoff -m "chore: update SBOM" - git push origin release-please--branches--main--components--faas-js-runtime + git push origin release-please--branches--main--components--faas-js-runtime + + - uses: actions/setup-node@v6 + with: + node-version: 24 + registry-url: "https://registry.npmjs.org" + package-manager-cache: false + - run: npm ci + - run: npm test + - run: npm publish \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 7e0a826..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Publish to npmjs -on: - release: - types: [created] -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v6 - with: - node-version: '22.x' - registry-url: 'https://registry.npmjs.org' - - run: npm install -g npm - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.FAAS_JS_RUNTIME_PUBLISH }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..e28eff5 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "3.0.2" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..a30777c --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "bump-minor-pre-major": true, + "packages": { + ".": { + "release-type": "node", + "include-component-in-tag": false, + "changelog-sections": [ + { + "type": "enhancement", + "section": "Features", + "hidden": false + }, + { + "type": "fix", + "section": "Bug Fixes", + "hidden": false + }, + { + "type": "chore", + "section": "Miscellaneous", + "hidden": false + }, + { + "type": "cleanup", + "section": "Miscellaneous", + "hidden": false + }, + { + "type": "api-change", + "section": "API Changes", + "hidden": false + }, + { + "type": "documentation", + "section": "Documentation", + "hidden": false + }, + { + "type": "techdebt", + "section": "Miscellaneous", + "hidden": false + }, + { + "type": "proposal", + "section": "Miscellaneous", + "hidden": false + }, + { + "type": "feat", + "section": "Features", + "hidden": false + } + ] + } + } +} \ No newline at end of file