From 46ee14371c84fbd120115026104a2cf327465361 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Fri, 27 Mar 2026 23:23:38 -0700 Subject: [PATCH] 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. --- packages/accessibility/package.json | 2 +- packages/api-client/package.json | 2 +- packages/auth-client/package.json | 2 +- packages/auth-ui/package.json | 2 +- packages/auth-ui/vitest.config.ts | 1 + packages/auth/package.json | 2 +- packages/backend-config/package.json | 2 +- packages/backend-flags/package.json | 2 +- packages/backend-telemetry/package.json | 2 +- packages/blob-client/package.json | 2 +- packages/blob/package.json | 2 +- packages/broadcast-client/package.json | 2 +- packages/celebrations/package.json | 2 +- packages/client-encrypt/package.json | 2 +- packages/config/package.json | 2 +- packages/cosmos/package.json | 2 +- packages/create-app/package.json | 2 +- packages/create-app/vitest.config.ts | 1 + packages/dashboard-components/package.json | 2 +- packages/dashboard-components/vitest.config.ts | 1 + packages/dashboard-shell/package.json | 2 +- packages/dashboard-shell/vitest.config.ts | 1 + packages/datastore/package.json | 2 +- packages/design-tokens/package.json | 2 +- packages/diagnostics-client/package.json | 2 +- packages/errors/package.json | 2 +- packages/event-store/package.json | 2 +- packages/events/package.json | 2 +- packages/extraction/package.json | 2 +- packages/fastify-auth/package.json | 2 +- packages/fastify-core/package.json | 2 +- packages/fastify-sse/package.json | 2 +- packages/feature-flag-client/package.json | 2 +- packages/feedback-client/package.json | 2 +- packages/field-encrypt/package.json | 2 +- packages/gentle-notifications/package.json | 2 +- packages/kill-switch-client/package.json | 2 +- packages/llm-router/package.json | 2 +- packages/llm-router/vitest.config.ts | 1 + packages/llm/package.json | 2 +- packages/logger/package.json | 2 +- packages/marketplace-client/package.json | 2 +- packages/monitoring/package.json | 2 +- packages/offline-queue/package.json | 2 +- packages/org-client/package.json | 2 +- packages/platform-client/package.json | 2 +- packages/push/package.json | 2 +- packages/queue/package.json | 2 +- packages/quick-actions/package.json | 2 +- packages/react-auth/package.json | 2 +- packages/react-auth/vitest.config.ts | 1 + packages/react-native-platform-sdk/package.json | 2 +- packages/referral-client/package.json | 2 +- packages/secure-storage-web/package.json | 2 +- packages/speech/package.json | 2 +- packages/storage/package.json | 2 +- packages/subscription-client/package.json | 2 +- packages/survey-client/package.json | 2 +- packages/sync/package.json | 2 +- packages/sync/vitest.config.ts | 1 + packages/telemetry-client/package.json | 2 +- packages/testing/package.json | 2 +- packages/time-references/package.json | 2 +- packages/webhook-dispatch/package.json | 2 +- services/extraction-service/package.json | 2 +- services/mcp-server/package.json | 2 +- services/mcp-server/vitest.config.ts | 1 + services/platform-service/package.json | 2 +- services/platform-service/vitest.config.ts | 2 +- 69 files changed, 69 insertions(+), 61 deletions(-) diff --git a/packages/accessibility/package.json b/packages/accessibility/package.json index 14e21917..2bc49418 100644 --- a/packages/accessibility/package.json +++ b/packages/accessibility/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 00d41901..b06ced3a 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/auth-client/package.json b/packages/auth-client/package.json index 150f722e..9919a78c 100644 --- a/packages/auth-client/package.json +++ b/packages/auth-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/auth-ui/package.json b/packages/auth-ui/package.json index 8ac7ca94..e8b63884 100644 --- a/packages/auth-ui/package.json +++ b/packages/auth-ui/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "peerDependencies": { "react": ">=18.0.0", diff --git a/packages/auth-ui/vitest.config.ts b/packages/auth-ui/vitest.config.ts index a9f5456f..cf326865 100644 --- a/packages/auth-ui/vitest.config.ts +++ b/packages/auth-ui/vitest.config.ts @@ -3,5 +3,6 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { environment: 'happy-dom', + pool: 'forks', }, }); diff --git a/packages/auth/package.json b/packages/auth/package.json index b511848c..dae05591 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "dependencies": { "@bytelyst/errors": "workspace:*" diff --git a/packages/backend-config/package.json b/packages/backend-config/package.json index bfec4918..bf26ec2d 100644 --- a/packages/backend-config/package.json +++ b/packages/backend-config/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "tsc", "typecheck": "tsc --noEmit", - "test": "vitest run", + "test": "vitest run --pool forks", "clean": "rm -rf dist" }, "dependencies": { diff --git a/packages/backend-flags/package.json b/packages/backend-flags/package.json index 3cd0ffd3..e3093040 100644 --- a/packages/backend-flags/package.json +++ b/packages/backend-flags/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "tsc", "typecheck": "tsc --noEmit", - "test": "vitest run", + "test": "vitest run --pool forks", "clean": "rm -rf dist" }, "devDependencies": { diff --git a/packages/backend-telemetry/package.json b/packages/backend-telemetry/package.json index f55d38d8..b7668935 100644 --- a/packages/backend-telemetry/package.json +++ b/packages/backend-telemetry/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "tsc", "typecheck": "tsc --noEmit", - "test": "vitest run", + "test": "vitest run --pool forks", "clean": "rm -rf dist" }, "devDependencies": { diff --git a/packages/blob-client/package.json b/packages/blob-client/package.json index 4fb6acc0..1403e745 100644 --- a/packages/blob-client/package.json +++ b/packages/blob-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/blob/package.json b/packages/blob/package.json index ee8d5b68..e098448e 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -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:*" diff --git a/packages/broadcast-client/package.json b/packages/broadcast-client/package.json index 05847463..3c3df909 100644 --- a/packages/broadcast-client/package.json +++ b/packages/broadcast-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/celebrations/package.json b/packages/celebrations/package.json index f0924e78..47b79960 100644 --- a/packages/celebrations/package.json +++ b/packages/celebrations/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/client-encrypt/package.json b/packages/client-encrypt/package.json index f554370e..73feaadf 100644 --- a/packages/client-encrypt/package.json +++ b/packages/client-encrypt/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "devDependencies": { "vitest": "^3.0.0" diff --git a/packages/config/package.json b/packages/config/package.json index 53bf0584..2e54967c 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -23,7 +23,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "peerDependencies": { "@azure/identity": ">=4.0.0", diff --git a/packages/cosmos/package.json b/packages/cosmos/package.json index da8fe8ea..4c9692df 100644 --- a/packages/cosmos/package.json +++ b/packages/cosmos/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "peerDependencies": { "@azure/cosmos": ">=4.0.0" diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 7ad2fb32..a8a6babc 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -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" diff --git a/packages/create-app/vitest.config.ts b/packages/create-app/vitest.config.ts index b33bef1c..19bef515 100644 --- a/packages/create-app/vitest.config.ts +++ b/packages/create-app/vitest.config.ts @@ -3,5 +3,6 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { passWithNoTests: true, + pool: 'forks', }, }); diff --git a/packages/dashboard-components/package.json b/packages/dashboard-components/package.json index 45e26994..03079ea7 100644 --- a/packages/dashboard-components/package.json +++ b/packages/dashboard-components/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run", + "test": "vitest run --pool forks", "typecheck": "tsc --noEmit" }, "peerDependencies": { diff --git a/packages/dashboard-components/vitest.config.ts b/packages/dashboard-components/vitest.config.ts index 7b00b489..e8ecb581 100644 --- a/packages/dashboard-components/vitest.config.ts +++ b/packages/dashboard-components/vitest.config.ts @@ -5,5 +5,6 @@ export default defineConfig({ globals: true, environment: 'happy-dom', passWithNoTests: true, + pool: 'forks', }, }); diff --git a/packages/dashboard-shell/package.json b/packages/dashboard-shell/package.json index bd15b4bf..4fa3eb69 100644 --- a/packages/dashboard-shell/package.json +++ b/packages/dashboard-shell/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run", + "test": "vitest run --pool forks", "typecheck": "tsc --noEmit" }, "peerDependencies": { diff --git a/packages/dashboard-shell/vitest.config.ts b/packages/dashboard-shell/vitest.config.ts index a9f5456f..cf326865 100644 --- a/packages/dashboard-shell/vitest.config.ts +++ b/packages/dashboard-shell/vitest.config.ts @@ -3,5 +3,6 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { environment: 'happy-dom', + pool: 'forks', }, }); diff --git a/packages/datastore/package.json b/packages/datastore/package.json index 6188eedf..cb851755 100644 --- a/packages/datastore/package.json +++ b/packages/datastore/package.json @@ -19,7 +19,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "peerDependencies": { "@azure/cosmos": ">=4.0.0" diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index f6403299..6f0df6a4 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -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" diff --git a/packages/diagnostics-client/package.json b/packages/diagnostics-client/package.json index eb9eef92..4acac151 100644 --- a/packages/diagnostics-client/package.json +++ b/packages/diagnostics-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "dependencies": { "@bytelyst/api-client": "workspace:*" diff --git a/packages/errors/package.json b/packages/errors/package.json index 76c90205..876b32cb 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/event-store/package.json b/packages/event-store/package.json index a4f35c50..d425d01c 100644 --- a/packages/event-store/package.json +++ b/packages/event-store/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/events/package.json b/packages/events/package.json index 810debac..fe4bec0f 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "dependencies": { "@bytelyst/queue": "workspace:*" diff --git a/packages/extraction/package.json b/packages/extraction/package.json index 248668d5..576e9555 100644 --- a/packages/extraction/package.json +++ b/packages/extraction/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "peerDependencies": { "@bytelyst/api-client": "workspace:*" diff --git a/packages/fastify-auth/package.json b/packages/fastify-auth/package.json index cd9362fc..55df7e1e 100644 --- a/packages/fastify-auth/package.json +++ b/packages/fastify-auth/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "tsc", "typecheck": "tsc --noEmit", - "test": "vitest run", + "test": "vitest run --pool forks", "clean": "rm -rf dist" }, "peerDependencies": { diff --git a/packages/fastify-core/package.json b/packages/fastify-core/package.json index 8255c190..e1839f79 100644 --- a/packages/fastify-core/package.json +++ b/packages/fastify-core/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "dependencies": { "@bytelyst/errors": "workspace:*" diff --git a/packages/fastify-sse/package.json b/packages/fastify-sse/package.json index 0959a8b3..84ece4fc 100644 --- a/packages/fastify-sse/package.json +++ b/packages/fastify-sse/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "peerDependencies": { "fastify": "^5.0.0" diff --git a/packages/feature-flag-client/package.json b/packages/feature-flag-client/package.json index 66bee63a..a385dda7 100644 --- a/packages/feature-flag-client/package.json +++ b/packages/feature-flag-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/feedback-client/package.json b/packages/feedback-client/package.json index a9b4b1ea..dfbfe8da 100644 --- a/packages/feedback-client/package.json +++ b/packages/feedback-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "dependencies": { "@bytelyst/api-client": "workspace:*" diff --git a/packages/field-encrypt/package.json b/packages/field-encrypt/package.json index e368cdb1..cc560a07 100644 --- a/packages/field-encrypt/package.json +++ b/packages/field-encrypt/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "dependencies": { "@bytelyst/errors": "workspace:*" diff --git a/packages/gentle-notifications/package.json b/packages/gentle-notifications/package.json index 9e820e59..8237e5ad 100644 --- a/packages/gentle-notifications/package.json +++ b/packages/gentle-notifications/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/kill-switch-client/package.json b/packages/kill-switch-client/package.json index e7df29bd..5dd34da1 100644 --- a/packages/kill-switch-client/package.json +++ b/packages/kill-switch-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/llm-router/package.json b/packages/llm-router/package.json index e4f04014..fbdcf4dc 100644 --- a/packages/llm-router/package.json +++ b/packages/llm-router/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run", + "test": "vitest run --pool forks", "typecheck": "tsc --noEmit" }, "devDependencies": { diff --git a/packages/llm-router/vitest.config.ts b/packages/llm-router/vitest.config.ts index cc7b9264..811c18ac 100644 --- a/packages/llm-router/vitest.config.ts +++ b/packages/llm-router/vitest.config.ts @@ -4,5 +4,6 @@ export default defineConfig({ test: { globals: true, passWithNoTests: true, + pool: 'forks', }, }); diff --git a/packages/llm/package.json b/packages/llm/package.json index 441b3df8..21373639 100644 --- a/packages/llm/package.json +++ b/packages/llm/package.json @@ -19,7 +19,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "devDependencies": { "vitest": "^3.0.0" diff --git a/packages/logger/package.json b/packages/logger/package.json index ede5db8a..0348f410 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/marketplace-client/package.json b/packages/marketplace-client/package.json index fb2ee143..bcaaf90a 100644 --- a/packages/marketplace-client/package.json +++ b/packages/marketplace-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/monitoring/package.json b/packages/monitoring/package.json index 79dfee0c..746217e0 100644 --- a/packages/monitoring/package.json +++ b/packages/monitoring/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/offline-queue/package.json b/packages/offline-queue/package.json index 830e598e..d2448a7d 100644 --- a/packages/offline-queue/package.json +++ b/packages/offline-queue/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/org-client/package.json b/packages/org-client/package.json index 900eec19..b4c85b50 100644 --- a/packages/org-client/package.json +++ b/packages/org-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/platform-client/package.json b/packages/platform-client/package.json index 19bf6b11..34cedfd7 100644 --- a/packages/platform-client/package.json +++ b/packages/platform-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/push/package.json b/packages/push/package.json index 90ff8aab..c90f36a8 100644 --- a/packages/push/package.json +++ b/packages/push/package.json @@ -19,7 +19,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "devDependencies": { "vitest": "^3.0.0" diff --git a/packages/queue/package.json b/packages/queue/package.json index 8cf91e82..9d382448 100644 --- a/packages/queue/package.json +++ b/packages/queue/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "devDependencies": { "@types/node": "^22.12.0", diff --git a/packages/quick-actions/package.json b/packages/quick-actions/package.json index f50dc360..94bef140 100644 --- a/packages/quick-actions/package.json +++ b/packages/quick-actions/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/react-auth/package.json b/packages/react-auth/package.json index fe50f111..db7cf025 100644 --- a/packages/react-auth/package.json +++ b/packages/react-auth/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "peerDependencies": { "react": ">=18.0.0" diff --git a/packages/react-auth/vitest.config.ts b/packages/react-auth/vitest.config.ts index 329187ed..9eaeb03e 100644 --- a/packages/react-auth/vitest.config.ts +++ b/packages/react-auth/vitest.config.ts @@ -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', }, }); diff --git a/packages/react-native-platform-sdk/package.json b/packages/react-native-platform-sdk/package.json index e4f04dce..ce80f4cd 100644 --- a/packages/react-native-platform-sdk/package.json +++ b/packages/react-native-platform-sdk/package.json @@ -37,7 +37,7 @@ }, "scripts": { "build": "tsc", - "test": "vitest run", + "test": "vitest run --pool forks", "lint": "eslint src/**/*.ts", "typecheck": "tsc --noEmit" }, diff --git a/packages/referral-client/package.json b/packages/referral-client/package.json index a6ece0d5..927e368b 100644 --- a/packages/referral-client/package.json +++ b/packages/referral-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/secure-storage-web/package.json b/packages/secure-storage-web/package.json index 2f73000b..f263dbab 100644 --- a/packages/secure-storage-web/package.json +++ b/packages/secure-storage-web/package.json @@ -15,7 +15,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "devDependencies": { "vitest": "^3.0.0", diff --git a/packages/speech/package.json b/packages/speech/package.json index 348cd08b..34fb8466 100644 --- a/packages/speech/package.json +++ b/packages/speech/package.json @@ -14,7 +14,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "peerDependencies": {}, "devDependencies": { diff --git a/packages/storage/package.json b/packages/storage/package.json index 824c9808..86e050ea 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -19,7 +19,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "dependencies": { "@azure/storage-blob": ">=12.0.0" diff --git a/packages/subscription-client/package.json b/packages/subscription-client/package.json index 8effb4ca..b4df8c39 100644 --- a/packages/subscription-client/package.json +++ b/packages/subscription-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/survey-client/package.json b/packages/survey-client/package.json index 9951f257..624ee14f 100644 --- a/packages/survey-client/package.json +++ b/packages/survey-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/sync/package.json b/packages/sync/package.json index e992ba64..04667dec 100644 --- a/packages/sync/package.json +++ b/packages/sync/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "tsc", - "test": "vitest run", + "test": "vitest run --pool forks", "test:watch": "vitest", "typecheck": "tsc --noEmit" }, diff --git a/packages/sync/vitest.config.ts b/packages/sync/vitest.config.ts index 04b92498..5e0718b2 100644 --- a/packages/sync/vitest.config.ts +++ b/packages/sync/vitest.config.ts @@ -4,6 +4,7 @@ export default defineConfig({ test: { globals: true, environment: 'node', + pool: 'forks', include: ['src/**/*.test.ts'], coverage: { reporter: ['text', 'json', 'html'], diff --git a/packages/telemetry-client/package.json b/packages/telemetry-client/package.json index 6e1206c1..aa35a0ab 100644 --- a/packages/telemetry-client/package.json +++ b/packages/telemetry-client/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/testing/package.json b/packages/testing/package.json index de6ddb25..f68c46d9 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -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:*", diff --git a/packages/time-references/package.json b/packages/time-references/package.json index 939236ef..22758e93 100644 --- a/packages/time-references/package.json +++ b/packages/time-references/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/packages/webhook-dispatch/package.json b/packages/webhook-dispatch/package.json index bf71b043..164beaf4 100644 --- a/packages/webhook-dispatch/package.json +++ b/packages/webhook-dispatch/package.json @@ -16,7 +16,7 @@ ], "scripts": { "build": "tsc", - "test": "vitest run" + "test": "vitest run --pool forks" }, "publishConfig": { "registry": "http://localhost:3300/api/packages/bytelyst/npm/" diff --git a/services/extraction-service/package.json b/services/extraction-service/package.json index 33ebccf5..8ca793f3 100644 --- a/services/extraction-service/package.json +++ b/services/extraction-service/package.json @@ -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", diff --git a/services/mcp-server/package.json b/services/mcp-server/package.json index 83f5172d..c8f52a51 100644 --- a/services/mcp-server/package.json +++ b/services/mcp-server/package.json @@ -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" }, diff --git a/services/mcp-server/vitest.config.ts b/services/mcp-server/vitest.config.ts index 8e730d50..611facff 100644 --- a/services/mcp-server/vitest.config.ts +++ b/services/mcp-server/vitest.config.ts @@ -4,5 +4,6 @@ export default defineConfig({ test: { globals: true, environment: 'node', + pool: 'forks', }, }); diff --git a/services/platform-service/package.json b/services/platform-service/package.json index f336f95e..e8dd2762 100644 --- a/services/platform-service/package.json +++ b/services/platform-service/package.json @@ -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" diff --git a/services/platform-service/vitest.config.ts b/services/platform-service/vitest.config.ts index 6b33bfad..4f937c30 100644 --- a/services/platform-service/vitest.config.ts +++ b/services/platform-service/vitest.config.ts @@ -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',