Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [20.9.0, 20.x, 22.0.0, 22.x, 24.0.0, 24.x]
node-version: [20.18.1, 20.x, 22.3.0, 22.x, 24.0.0, 24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
Expand Down
9 changes: 0 additions & 9 deletions example/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import assert from "node:assert/strict";
import { EventSource } from "undici";
import { spawn } from "node:child_process";
import { createReadStream, readFileSync } from "node:fs";
import { Client, Subscription } from "./example.client";
Expand All @@ -18,14 +17,6 @@ describe("Example", async () => {
const port = givePort("example");
await vi.waitFor(() => assert(out.includes(`Listening`)), { timeout: 1e4 });

beforeAll(() => {
/**
* @todo when min Node v22.3.0 and 20.18.0, can use the --experimental-eventsource flag and remove undici
* @todo later, revisit when unflagged https://nodejs.org/docs/v24.0.0/api/globals.html#eventsource
*/
vi.stubGlobal("EventSource", EventSource);
});

afterAll(async () => {
example.stdout.removeListener("data", listener);
example.kill();
Expand Down
7 changes: 3 additions & 4 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
"build:docs": "tsx generate-documentation.ts",
"build:client": "tsx generate-client.ts",
"pretest": "tsc --noEmit",
"test": "vitest run --globals index.spec.ts",
"validate": "vitest run --globals validate.spec.ts"
"test": "vitest run index.spec.ts",
"validate": "vitest run validate.spec.ts"
},
"dependencies": {
"express-zod-api": "workspace:*",
"swagger-ui-express": "^5.0.0"
},
"devDependencies": {
"@types/swagger-ui-express": "^4.1.8",
"undici": "^6.19.8"
"@types/swagger-ui-express": "^4.1.8"
}
}
14 changes: 14 additions & 0 deletions example/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
globals: true,
pool: "threads",
poolOptions: {
threads: {
/** @todo remove when unflagged https://nodejs.org/docs/v24.0.0/api/globals.html#eventsource */
execArgv: ["--experimental-eventsource"],
},
},
},
});
4 changes: 2 additions & 2 deletions express-zod-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"*.md"
],
"engines": {
"node": "^20.9.0 || ^22.0.0 || ^24.0.0"
"node": "^20.18.1 || ^22.3.0 || ^24.0.0"
},
"dependencies": {
"ansis": "^4.1.0",
Expand Down Expand Up @@ -111,7 +111,7 @@
"semver": "^7.7.2",
"snakify-ts": "^2.3.0",
"tsup": "^8.5.0",
"undici": "^6.19.8"
"undici": "^7.10.0"
},
"keywords": [
"nodejs",
Expand Down
15 changes: 6 additions & 9 deletions pnpm-lock.yaml

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