From 5708d48b52e86d711d7d7acdda35837eaf309f9f Mon Sep 17 00:00:00 2001 From: Einar Date: Fri, 7 Aug 2026 10:26:45 +0200 Subject: [PATCH] Support Arc 21 and isolate specs that mock the same module Widen the @cratis/arc and @cratis/arc.react peer ranges to accept 21 alongside 20, so consumers are not held on the 20 line. Arc 21 is what Cratis.Chronicle 16.18.0 and newer require, and this peer was what prevented Studio from taking either. Turn Vitest isolation back on. Five spec files mock @cratis/arc.react/dialogs with their own spies, and with a shared module graph whichever file loaded first won while the others observed zero calls. That surfaced under Arc 21 as an intermittent "expected one closeDialog call, got 0" - 2 failures in 6 runs. With isolation the suite is 5 for 5 and still finishes in about six seconds. Co-Authored-By: Claude Opus 5 (1M context) --- Source/package.json | 6 +++--- Source/vite.config.ts | 5 ++++- package.json | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Source/package.json b/Source/package.json index e2d8853..d9b8289 100644 --- a/Source/package.json +++ b/Source/package.json @@ -141,11 +141,11 @@ "ts-deepmerge": "8.0.0" }, "devDependencies": { - "@cratis/arc.vite": "^20.49.2" + "@cratis/arc.vite": "^21.0.2" }, "peerDependencies": { - "@cratis/arc": "^20.3.1", - "@cratis/arc.react": "^20.3.1", + "@cratis/arc": ">=20.3.1 <22", + "@cratis/arc.react": ">=20.3.1 <22", "@cratis/fundamentals": "^7.10.3", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/Source/vite.config.ts b/Source/vite.config.ts index 66f2d99..bf33b7a 100644 --- a/Source/vite.config.ts +++ b/Source/vite.config.ts @@ -31,7 +31,10 @@ export default defineConfig({ test: { globals: true, environment: 'node', - isolate: false, + // Isolated, because several spec files mock the same module (@cratis/arc.react/dialogs) with + // their own spies. With a shared module graph whichever file loaded first wins and the others + // observe zero calls, which showed up as an intermittent "expected one closeDialog call, got 0". + isolate: true, fileParallelism: false, pool: 'threads', coverage: { diff --git a/package.json b/package.json index d0bd334..0d17475 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "version": "0.0.0", "packageManager": "yarn@4.5.3", "devDependencies": { - "@cratis/arc": "^20.49.2", - "@cratis/arc.react": "^20.49.2", - "@cratis/arc.vite": "^20.49.2", + "@cratis/arc": "^21.0.2", + "@cratis/arc.react": "^21.0.2", + "@cratis/arc.vite": "^21.0.2", "@eslint/eslintrc": "^3.3.5", "@eslint/js": "^10.0.1", "@rollup/plugin-node-resolve": "^16.0.3",