fix(ci): add --pool forks to all vitest test scripts to fix kill EPERM on Node v25

Root cause: tinypool worker teardown calls kill() which returns EPERM
in the act_runner host environment on Node.js v25.2.1. Tests pass but
the vitest process crashes during cleanup, causing CI failure.

Fix: --pool forks CLI flag on every package/service test script, plus
pool: 'forks' in all vitest.config.ts files. This uses child_process.fork()
worker management which handles termination cleanly.

60 package.json files updated, 10 vitest.config.ts files updated.
This commit is contained in:
saravanakumardb1 2026-03-27 23:23:38 -07:00
parent 86d0d89601
commit 46ee14371c
69 changed files with 69 additions and 61 deletions

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"peerDependencies": {
"react": ">=18.0.0",

View File

@ -3,5 +3,6 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'happy-dom',
pool: 'forks',
},
});

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"dependencies": {
"@bytelyst/errors": "workspace:*"

View File

@ -14,7 +14,7 @@
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test": "vitest run --pool forks",
"clean": "rm -rf dist"
},
"dependencies": {

View File

@ -14,7 +14,7 @@
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test": "vitest run --pool forks",
"clean": "rm -rf dist"
},
"devDependencies": {

View File

@ -14,7 +14,7 @@
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test": "vitest run --pool forks",
"clean": "rm -rf dist"
},
"devDependencies": {

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
"scripts": {
"pretest": "pnpm --dir ../.. --filter @bytelyst/storage build",
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"dependencies": {
"@bytelyst/storage": "workspace:*"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"devDependencies": {
"vitest": "^3.0.0"

View File

@ -23,7 +23,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"peerDependencies": {
"@azure/identity": ">=4.0.0",

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"peerDependencies": {
"@azure/cosmos": ">=4.0.0"

View File

@ -11,7 +11,7 @@
},
"scripts": {
"build": "tsc",
"test": "vitest run",
"test": "vitest run --pool forks",
"create-app": "tsx src/scaffolder.ts",
"gen:api-route": "tsx src/generators/api-routes.ts",
"gen:agents-md": "tsx src/generators/agents-md.ts"

View File

@ -3,5 +3,6 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
passWithNoTests: true,
pool: 'forks',
},
});

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run",
"test": "vitest run --pool forks",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {

View File

@ -5,5 +5,6 @@ export default defineConfig({
globals: true,
environment: 'happy-dom',
passWithNoTests: true,
pool: 'forks',
},
});

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run",
"test": "vitest run --pool forks",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {

View File

@ -3,5 +3,6 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'happy-dom',
pool: 'forks',
},
});

View File

@ -19,7 +19,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"peerDependencies": {
"@azure/cosmos": ">=4.0.0"

View File

@ -22,7 +22,7 @@
"scripts": {
"build": "tsc",
"generate": "tsx scripts/generate.ts",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"devDependencies": {
"tsx": "^4.0.0"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"dependencies": {
"@bytelyst/api-client": "workspace:*"

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"dependencies": {
"@bytelyst/queue": "workspace:*"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"peerDependencies": {
"@bytelyst/api-client": "workspace:*"

View File

@ -14,7 +14,7 @@
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test": "vitest run --pool forks",
"clean": "rm -rf dist"
},
"peerDependencies": {

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"dependencies": {
"@bytelyst/errors": "workspace:*"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"peerDependencies": {
"fastify": "^5.0.0"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"dependencies": {
"@bytelyst/api-client": "workspace:*"

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"dependencies": {
"@bytelyst/errors": "workspace:*"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run",
"test": "vitest run --pool forks",
"typecheck": "tsc --noEmit"
},
"devDependencies": {

View File

@ -4,5 +4,6 @@ export default defineConfig({
test: {
globals: true,
passWithNoTests: true,
pool: 'forks',
},
});

View File

@ -19,7 +19,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"devDependencies": {
"vitest": "^3.0.0"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -19,7 +19,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"devDependencies": {
"vitest": "^3.0.0"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"devDependencies": {
"@types/node": "^22.12.0",

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"peerDependencies": {
"react": ">=18.0.0"

View File

@ -5,5 +5,6 @@ export default defineConfig({
// Use happy-dom to avoid jsdom's heavy dependency chain and ESM/CJS edge cases.
// This package only needs a minimal DOM + localStorage for unit tests.
environment: 'happy-dom',
pool: 'forks',
},
});

View File

@ -37,7 +37,7 @@
},
"scripts": {
"build": "tsc",
"test": "vitest run",
"test": "vitest run --pool forks",
"lint": "eslint src/**/*.ts",
"typecheck": "tsc --noEmit"
},

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -15,7 +15,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"devDependencies": {
"vitest": "^3.0.0",

View File

@ -14,7 +14,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"peerDependencies": {},
"devDependencies": {

View File

@ -19,7 +19,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"dependencies": {
"@azure/storage-blob": ">=12.0.0"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -12,7 +12,7 @@
},
"scripts": {
"build": "tsc",
"test": "vitest run",
"test": "vitest run --pool forks",
"test:watch": "vitest",
"typecheck": "tsc --noEmit"
},

View File

@ -4,6 +4,7 @@ export default defineConfig({
test: {
globals: true,
environment: 'node',
pool: 'forks',
include: ['src/**/*.test.ts'],
coverage: {
reporter: ['text', 'json', 'html'],

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
"scripts": {
"pretest": "pnpm --dir ../.. --filter @bytelyst/fastify-core build",
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"devDependencies": {
"@bytelyst/fastify-core": "workspace:*",

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -16,7 +16,7 @@
],
"scripts": {
"build": "tsc",
"test": "vitest run"
"test": "vitest run --pool forks"
},
"publishConfig": {
"registry": "http://localhost:3300/api/packages/bytelyst/npm/"

View File

@ -8,7 +8,7 @@
"dev": "tsx watch src/server.ts",
"build": "tsc",
"start": "node dist/server.js",
"test": "vitest run",
"test": "vitest run --pool forks",
"test:watch": "vitest",
"lint": "eslint src/",
"eval": "bash evals/run-evals.sh",

View File

@ -8,7 +8,7 @@
"dev": "tsx watch src/server.ts",
"build": "tsc",
"start": "node dist/server.js",
"test": "vitest run",
"test": "vitest run --pool forks",
"test:watch": "vitest",
"typecheck": "tsc --noEmit"
},

View File

@ -4,5 +4,6 @@ export default defineConfig({
test: {
globals: true,
environment: 'node',
pool: 'forks',
},
});

View File

@ -9,7 +9,7 @@
"build": "tsc",
"start": "node dist/server.js",
"pretest": "pnpm --dir ../.. --filter @bytelyst/auth --filter @bytelyst/blob --filter @bytelyst/storage --filter @bytelyst/config --filter @bytelyst/cosmos --filter @bytelyst/datastore --filter @bytelyst/errors --filter @bytelyst/queue --filter @bytelyst/events --filter @bytelyst/fastify-core build",
"test": "vitest run",
"test": "vitest run --pool forks",
"test:watch": "vitest",
"lint": "eslint src/",
"gen:module": "tsx scripts/gen-module.ts"

View File

@ -5,7 +5,7 @@ export default defineConfig({
globals: true,
environment: 'node',
include: ['src/**/*.test.ts'],
pool: 'threads',
pool: 'forks',
env: {
DB_PROVIDER: 'memory',
RATE_LIMIT_STORE_MODE: 'memory',