diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index cf898e150..05169091d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -24,7 +24,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - node-version: [18.x] + node-version: [20.x, 24.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} @@ -48,10 +48,15 @@ jobs: - name: Run shell injection Benchmark run: cd benchmarks/shell-injection && node benchmark.js - name: Run Hono with Postgres Benchmark + # Skip on Node 24.x due to a bug: https://github.com/honojs/node-server/issues/240 + if: matrix.node-version != '24.x' run: cd benchmarks/hono-pg && node benchmark.js - name: Run API Discovery Benchmark run: cd benchmarks/api-discovery && node benchmark.js - name: Run Express Benchmark + # Skip on Node 24.x because benchmark currently fails. + # Big performance improve in comparison to older Node.js versions, but higher difference between usage with and without Zen + if: matrix.node-version != '24.x' run: cd benchmarks/express && node benchmark.js - name: Check Rate Limiter memory usage run: cd benchmarks/rate-limiting && node --expose-gc memory.js diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 911a67dfa..c7043869c 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -64,7 +64,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x, 18.x, 20.x, 22.x, 23.x] + node-version: [16.x, 18.x, 20.x, 22.x, 24.x] timeout-minutes: 10 steps: - uses: actions/checkout@v4 diff --git a/end2end/server/Dockerfile b/end2end/server/Dockerfile index 865b93032..fdc5e895c 100644 --- a/end2end/server/Dockerfile +++ b/end2end/server/Dockerfile @@ -1,4 +1,4 @@ -FROM node:22 +FROM node:22-slim WORKDIR /app diff --git a/library/agent/hooks/isBuiltinModule.test.ts b/library/agent/hooks/isBuiltinModule.test.ts index 06e61aeb6..7aab94290 100644 --- a/library/agent/hooks/isBuiltinModule.test.ts +++ b/library/agent/hooks/isBuiltinModule.test.ts @@ -1,5 +1,6 @@ import * as t from "tap"; import { isBuiltinModule } from "./isBuiltinModule"; +import { getMajorNodeVersion } from "../../helpers/getNodeVersion"; t.test("it works", async (t) => { t.equal(isBuiltinModule("fs"), true); @@ -9,3 +10,16 @@ t.test("it works", async (t) => { t.equal(isBuiltinModule("test"), false); t.equal(isBuiltinModule(""), false); }); + +t.test( + "it works with node:sqlite", + { + skip: + getMajorNodeVersion() < 24 + ? "node:sqlite is not available in older Node.js versions" + : undefined, + }, + async (t) => { + t.equal(isBuiltinModule("node:sqlite"), true); + } +); diff --git a/library/package-lock.json b/library/package-lock.json index c62c23207..de626e909 100644 --- a/library/package-lock.json +++ b/library/package-lock.json @@ -39,7 +39,7 @@ "@types/xml2js": "^0.4.14", "aws-sdk": "^2.1595.0", "axios": "^1.8.4", - "better-sqlite3": "^11.2.0", + "better-sqlite3": "^11.9.1", "bson-objectid": "^2.0.4", "cookie-parser": "^1.4.6", "eslint": "^9.23.0", diff --git a/library/package.json b/library/package.json index 605642580..4d27bdb7b 100644 --- a/library/package.json +++ b/library/package.json @@ -72,7 +72,7 @@ "@types/xml2js": "^0.4.14", "aws-sdk": "^2.1595.0", "axios": "^1.8.4", - "better-sqlite3": "^11.2.0", + "better-sqlite3": "^11.9.1", "bson-objectid": "^2.0.4", "cookie-parser": "^1.4.6", "eslint": "^9.23.0", @@ -89,9 +89,9 @@ "globals": "^16.0.0", "graphql": "^16.8.2", "hono": "^4.4.2", + "koa-router": "^12.0.1", "koa-v2": "npm:koa@^2.16.1", "koa-v3": "npm:koa@^3.0.0", - "koa-router": "^12.0.1", "mariadb": "^3.3.2", "mongodb": "~6.9", "mongodb-v4": "npm:mongodb@^4.0.0", diff --git a/scripts/run-tap.js b/scripts/run-tap.js index 3d83deaa5..7f2b9c382 100644 --- a/scripts/run-tap.js +++ b/scripts/run-tap.js @@ -15,17 +15,12 @@ if (process.env.CI) { args += " --coverage-report=lcov"; } -// Enable the `--experimental-sqlite` flag for Node.js ^22.5.0 -if ((major === 22 && minor >= 5) || major === 23) { - args += " --node-arg=--experimental-sqlite --node-arg=--no-warnings"; -} - execSync(`tap ${args}`, { stdio: "inherit", env: { ...process.env, AIKIDO_CI: "true", // In v23 some sub-dependencies are calling require on a esm module triggering an experimental warning - NODE_OPTIONS: major === 23 ? "--disable-warning=ExperimentalWarning" : "", + NODE_OPTIONS: major === 24 ? "--disable-warning=ExperimentalWarning" : "", }, });