diff --git a/.changeset/fix-pnpm-vitest-duplicate.md b/.changeset/fix-pnpm-vitest-duplicate.md new file mode 100644 index 000000000..57b85df94 --- /dev/null +++ b/.changeset/fix-pnpm-vitest-duplicate.md @@ -0,0 +1,11 @@ +--- +"react-doctor": patch +--- + +fix: widen oxlint version range to `>=1.60.0` to prevent duplicate vitest instances in pnpm monorepos + +When `react-doctor` was installed alongside `vite-plus` (which pins `oxlint@=1.63.0`), pnpm created two instances of oxlint with different peer dependency fingerprints. This caused the vitest fork (`@voidzero-dev/vite-plus-test`) to also have two instances, breaking Vitest's internal hook registry and causing "Vitest failed to find the current suite" errors. + +By widening the version range from `^1.66.0` to `>=1.60.0`, pnpm can now dedupe the oxlint dependency when the consumer's workspace already provides a compatible version, preventing the cascade of duplicate instances. + +The CLI features react-doctor uses (`-c`, `--format json`, `--tsconfig`, `--ignore-path`) are stable across oxlint 1.60+. diff --git a/package.json b/package.json index 7f7b79a28..3dffc8f0f 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "unrs-resolver" ], "overrides": { - "oxlint": "^1.66.0", + "oxlint": ">=1.60.0", "oxlint-tsgolint": "^0.23.0" } } diff --git a/packages/core/package.json b/packages/core/package.json index f9fba71f3..b258eb7e4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -28,7 +28,7 @@ "effect": "4.0.0-beta.70", "eslint-plugin-react-hooks": "^7.1.1", "jiti": "^2.7.0", - "oxlint": "^1.66.0", + "oxlint": ">=1.60.0", "oxlint-plugin-react-doctor": "workspace:*", "picomatch": "^4.0.4", "typescript": "^6.0.3" diff --git a/packages/react-doctor/package.json b/packages/react-doctor/package.json index a7afd7687..aa36948f4 100644 --- a/packages/react-doctor/package.json +++ b/packages/react-doctor/package.json @@ -66,7 +66,7 @@ "eslint-plugin-react-hooks": "^7.1.1", "jiti": "^2.7.0", "magicast": "^0.5.3", - "oxlint": "^1.66.0", + "oxlint": ">=1.60.0", "oxlint-plugin-react-doctor": "workspace:*", "prompts": "^2.4.2", "typescript": ">=5.0.4 <7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2eb4e2ee7..b6eba14db 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,7 +5,7 @@ settings: excludeLinksFromLockfile: false overrides: - oxlint: ^1.66.0 + oxlint: '>=1.60.0' oxlint-tsgolint: ^0.23.0 importers: @@ -80,7 +80,7 @@ importers: specifier: ^2.7.0 version: 2.7.0 oxlint: - specifier: ^1.66.0 + specifier: '>=1.60.0' version: 1.66.0(oxlint-tsgolint@0.23.0) oxlint-plugin-react-doctor: specifier: workspace:* @@ -186,7 +186,7 @@ importers: specifier: ^0.5.3 version: 0.5.3 oxlint: - specifier: ^1.66.0 + specifier: '>=1.60.0' version: 1.66.0(oxlint-tsgolint@0.23.0) oxlint-plugin-react-doctor: specifier: workspace:*