react-doctor 0.8.1-dev.61bf03e → 0.8.1-dev.6fcd9c9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c5ad9312-01de-535b-a900-0d45e296a4fa")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="81bdc95e-12f2-565f-a05c-7b8a60a98f81")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import * as NodeChildProcess from "node:child_process";
5
5
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
@@ -37339,15 +37339,15 @@ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
37339
37339
  if (nextMajor === null) return false;
37340
37340
  return nextMajor < currentMajor;
37341
37341
  };
37342
- const shouldReplaceMobxFact = (currentFact, nextFact) => {
37342
+ const shouldReplaceSupportedDependencyFact = (currentFact, nextFact, latestSupportedMajor) => {
37343
37343
  if (currentFact.version === null) return true;
37344
37344
  if (nextFact.version === null) return false;
37345
37345
  const currentMajor = getLowestDependencyMajor(currentFact.version);
37346
37346
  const nextMajor = getLowestDependencyMajor(nextFact.version);
37347
37347
  if (currentMajor === null) return false;
37348
37348
  if (nextMajor === null) return true;
37349
- if (currentMajor > 6) return false;
37350
- if (nextMajor > 6) return true;
37349
+ if (currentMajor > latestSupportedMajor) return false;
37350
+ if (nextMajor > latestSupportedMajor) return true;
37351
37351
  return nextMajor < currentMajor;
37352
37352
  };
37353
37353
  const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
@@ -37383,12 +37383,25 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
37383
37383
  }),
37384
37384
  sourceDirectory: directory
37385
37385
  };
37386
- if (shouldReplaceMobxFact(facts.mobx, nextMobxFact)) facts.mobx = nextMobxFact;
37386
+ if (shouldReplaceSupportedDependencyFact(facts.mobx, nextMobxFact, 6)) facts.mobx = nextMobxFact;
37387
37387
  }
37388
37388
  facts.hasMobxReact = facts.hasMobxReact || getDependencySpec(packageJson, MOBX_REACT_PACKAGE_NAME) !== null;
37389
37389
  facts.hasMobxReactLite = facts.hasMobxReactLite || getDependencySpec(packageJson, MOBX_REACT_LITE_PACKAGE_NAME) !== null;
37390
37390
  facts.hasMobxStateTree = facts.hasMobxStateTree || getDependencySpec(packageJson, MOBX_STATE_TREE_PACKAGE_NAME) !== null;
37391
37391
  facts.hasMobxReactObserver = facts.hasMobxReactObserver || getDependencySpec(packageJson, MOBX_REACT_OBSERVER_PACKAGE_NAME) !== null;
37392
+ const zustandSpec = getDependencySpec(packageJson, "zustand");
37393
+ if (zustandSpec !== null) {
37394
+ const nextZustandFact = {
37395
+ version: resolveCatalogBackedDependencyVersion({
37396
+ rootDirectory: directory,
37397
+ rootPackageJson: packageJson,
37398
+ packageName: "zustand",
37399
+ version: zustandSpec
37400
+ }),
37401
+ sourceDirectory: directory
37402
+ };
37403
+ if (shouldReplaceSupportedDependencyFact(facts.zustand, nextZustandFact, 5)) facts.zustand = nextZustandFact;
37404
+ }
37392
37405
  if (facts.reanimatedVersion === null) {
37393
37406
  const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
37394
37407
  if (spec !== null) facts.reanimatedVersion = spec;
@@ -37446,6 +37459,10 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
37446
37459
  hasMobxReactLite: false,
37447
37460
  hasMobxStateTree: false,
37448
37461
  hasMobxReactObserver: false,
37462
+ zustand: {
37463
+ version: null,
37464
+ sourceDirectory: null
37465
+ },
37449
37466
  hasReactNativeAwarePackage: false,
37450
37467
  hasReanimatedAwarePackage: false,
37451
37468
  hasSsrDependency: false,
@@ -37690,6 +37707,8 @@ const discoverProjectWithoutPackageJson = (directory) => {
37690
37707
  hasMobxReactLite: false,
37691
37708
  hasMobxStateTree: false,
37692
37709
  hasMobxReactObserver: false,
37710
+ zustandVersion: null,
37711
+ zustandMajorVersion: null,
37693
37712
  framework: "unknown",
37694
37713
  hasTypeScript: hasOwnTsConfig,
37695
37714
  hasReactCompiler: false,
@@ -37798,6 +37817,12 @@ const discoverProject = (directory) => {
37798
37817
  packageName: SHOPIFY_FLASH_LIST_PACKAGE_NAME,
37799
37818
  version: workspaceFacts.shopifyFlashList.version
37800
37819
  }) : null;
37820
+ const zustandVersion = resolveCatalogBackedDependencyVersion({
37821
+ rootDirectory: directory,
37822
+ rootPackageJson: packageJson,
37823
+ packageName: "zustand",
37824
+ version: workspaceFacts.zustand.version
37825
+ });
37801
37826
  const hasReanimated = hasReactNativeWorkspace && workspaceFacts.hasReanimatedAwarePackage;
37802
37827
  const reanimatedVersion = hasReanimated ? workspaceFacts.reanimatedVersion : null;
37803
37828
  const nextjsVersion = framework === "nextjs" ? resolveCatalogBackedDependencyVersion({
@@ -37835,6 +37860,8 @@ const discoverProject = (directory) => {
37835
37860
  hasMobxReactLite: workspaceFacts.hasMobxReactLite,
37836
37861
  hasMobxStateTree: workspaceFacts.hasMobxStateTree,
37837
37862
  hasMobxReactObserver: workspaceFacts.hasMobxReactObserver,
37863
+ zustandVersion,
37864
+ zustandMajorVersion: zustandVersion === null ? null : getLowestDependencyMajor(zustandVersion),
37838
37865
  framework,
37839
37866
  hasTypeScript,
37840
37867
  hasReactCompiler: detectReactCompiler(directory, packageJson),
@@ -41189,6 +41216,8 @@ const buildCapabilities = (project) => {
41189
41216
  if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
41190
41217
  if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
41191
41218
  if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
41219
+ if (project.zustandVersion !== void 0 && project.zustandVersion !== null) capabilities.add("zustand");
41220
+ if (project.zustandMajorVersion !== void 0 && project.zustandMajorVersion !== null && project.zustandMajorVersion >= 1 && project.zustandMajorVersion <= 5) addMajorLadder(capabilities, "zustand", project.zustandMajorVersion, 1, 5);
41192
41221
  if (project.isPreES2023Target) capabilities.add("pre-es2023");
41193
41222
  if (project.hasReactCompiler) capabilities.add("react-compiler");
41194
41223
  if (project.hasTanStackQuery) capabilities.add("tanstack-query");
@@ -47481,7 +47510,7 @@ const makeNoopConsole = () => ({
47481
47510
  });
47482
47511
  //#endregion
47483
47512
  //#region src/cli/utils/version.ts
47484
- const VERSION = "0.8.1-dev.61bf03e";
47513
+ const VERSION = "0.8.1-dev.6fcd9c9";
47485
47514
  //#endregion
47486
47515
  //#region src/cli/utils/json-mode.ts
47487
47516
  let context = null;
@@ -47833,13 +47862,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
47833
47862
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
47834
47863
  * standard `SENTRY_RELEASE` override.
47835
47864
  */
47836
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.61bf03e`;
47865
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.6fcd9c9`;
47837
47866
  /**
47838
47867
  * Deployment environment shown in Sentry's environment filter. Defaults to
47839
47868
  * `production` for tagged releases and `development` for dev/unbuilt versions,
47840
47869
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
47841
47870
  */
47842
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.61bf03e") ? "development" : "production");
47871
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.6fcd9c9") ? "development" : "production");
47843
47872
  /**
47844
47873
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
47845
47874
  * (set to `0` to disable tracing) and falls back to
@@ -66519,4 +66548,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
66519
66548
  export {};
66520
66549
 
66521
66550
  //# sourceMappingURL=cli.js.map
66522
- //# debugId=c5ad9312-01de-535b-a900-0d45e296a4fa
66551
+ //# debugId=81bdc95e-12f2-565f-a05c-7b8a60a98f81
package/dist/index.d.ts CHANGED
@@ -9551,6 +9551,10 @@ interface ProjectInfo {
9551
9551
  hasMobxReactLite?: boolean;
9552
9552
  hasMobxStateTree?: boolean;
9553
9553
  hasMobxReactObserver?: boolean;
9554
+ /** Declared Zustand version spec. Optional so existing `ProjectInfo` consumers remain source-compatible. */
9555
+ zustandVersion?: string | null;
9556
+ /** Parsed major from `zustandVersion`, or `null` when absent/unparseable. */
9557
+ zustandMajorVersion?: number | null;
9554
9558
  framework: Framework;
9555
9559
  hasTypeScript: boolean;
9556
9560
  hasReactCompiler: boolean;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1d61ce96-d819-561a-9f41-f616d6355f62")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6aa1c6e1-8fcc-50d4-a076-3e864425bdc5")}catch(e){}}();
3
3
  import { r as __toESM$1, t as __commonJSMin$1 } from "./chunk-N93fKeF6.js";
4
4
  import { createRequire } from "node:module";
5
5
  import reactDoctorPlugin, { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor";
@@ -34143,15 +34143,15 @@ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
34143
34143
  if (nextMajor === null) return false;
34144
34144
  return nextMajor < currentMajor;
34145
34145
  };
34146
- const shouldReplaceMobxFact = (currentFact, nextFact) => {
34146
+ const shouldReplaceSupportedDependencyFact = (currentFact, nextFact, latestSupportedMajor) => {
34147
34147
  if (currentFact.version === null) return true;
34148
34148
  if (nextFact.version === null) return false;
34149
34149
  const currentMajor = getLowestDependencyMajor(currentFact.version);
34150
34150
  const nextMajor = getLowestDependencyMajor(nextFact.version);
34151
34151
  if (currentMajor === null) return false;
34152
34152
  if (nextMajor === null) return true;
34153
- if (currentMajor > 6) return false;
34154
- if (nextMajor > 6) return true;
34153
+ if (currentMajor > latestSupportedMajor) return false;
34154
+ if (nextMajor > latestSupportedMajor) return true;
34155
34155
  return nextMajor < currentMajor;
34156
34156
  };
34157
34157
  const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
@@ -34187,12 +34187,25 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
34187
34187
  }),
34188
34188
  sourceDirectory: directory
34189
34189
  };
34190
- if (shouldReplaceMobxFact(facts.mobx, nextMobxFact)) facts.mobx = nextMobxFact;
34190
+ if (shouldReplaceSupportedDependencyFact(facts.mobx, nextMobxFact, 6)) facts.mobx = nextMobxFact;
34191
34191
  }
34192
34192
  facts.hasMobxReact = facts.hasMobxReact || getDependencySpec(packageJson, MOBX_REACT_PACKAGE_NAME) !== null;
34193
34193
  facts.hasMobxReactLite = facts.hasMobxReactLite || getDependencySpec(packageJson, MOBX_REACT_LITE_PACKAGE_NAME) !== null;
34194
34194
  facts.hasMobxStateTree = facts.hasMobxStateTree || getDependencySpec(packageJson, MOBX_STATE_TREE_PACKAGE_NAME) !== null;
34195
34195
  facts.hasMobxReactObserver = facts.hasMobxReactObserver || getDependencySpec(packageJson, MOBX_REACT_OBSERVER_PACKAGE_NAME) !== null;
34196
+ const zustandSpec = getDependencySpec(packageJson, "zustand");
34197
+ if (zustandSpec !== null) {
34198
+ const nextZustandFact = {
34199
+ version: resolveCatalogBackedDependencyVersion({
34200
+ rootDirectory: directory,
34201
+ rootPackageJson: packageJson,
34202
+ packageName: "zustand",
34203
+ version: zustandSpec
34204
+ }),
34205
+ sourceDirectory: directory
34206
+ };
34207
+ if (shouldReplaceSupportedDependencyFact(facts.zustand, nextZustandFact, 5)) facts.zustand = nextZustandFact;
34208
+ }
34196
34209
  if (facts.reanimatedVersion === null) {
34197
34210
  const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
34198
34211
  if (spec !== null) facts.reanimatedVersion = spec;
@@ -34250,6 +34263,10 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
34250
34263
  hasMobxReactLite: false,
34251
34264
  hasMobxStateTree: false,
34252
34265
  hasMobxReactObserver: false,
34266
+ zustand: {
34267
+ version: null,
34268
+ sourceDirectory: null
34269
+ },
34253
34270
  hasReactNativeAwarePackage: false,
34254
34271
  hasReanimatedAwarePackage: false,
34255
34272
  hasSsrDependency: false,
@@ -34497,6 +34514,8 @@ const discoverProjectWithoutPackageJson = (directory) => {
34497
34514
  hasMobxReactLite: false,
34498
34515
  hasMobxStateTree: false,
34499
34516
  hasMobxReactObserver: false,
34517
+ zustandVersion: null,
34518
+ zustandMajorVersion: null,
34500
34519
  framework: "unknown",
34501
34520
  hasTypeScript: hasOwnTsConfig,
34502
34521
  hasReactCompiler: false,
@@ -34605,6 +34624,12 @@ const discoverProject = (directory) => {
34605
34624
  packageName: SHOPIFY_FLASH_LIST_PACKAGE_NAME,
34606
34625
  version: workspaceFacts.shopifyFlashList.version
34607
34626
  }) : null;
34627
+ const zustandVersion = resolveCatalogBackedDependencyVersion({
34628
+ rootDirectory: directory,
34629
+ rootPackageJson: packageJson,
34630
+ packageName: "zustand",
34631
+ version: workspaceFacts.zustand.version
34632
+ });
34608
34633
  const hasReanimated = hasReactNativeWorkspace && workspaceFacts.hasReanimatedAwarePackage;
34609
34634
  const reanimatedVersion = hasReanimated ? workspaceFacts.reanimatedVersion : null;
34610
34635
  const nextjsVersion = framework === "nextjs" ? resolveCatalogBackedDependencyVersion({
@@ -34642,6 +34667,8 @@ const discoverProject = (directory) => {
34642
34667
  hasMobxReactLite: workspaceFacts.hasMobxReactLite,
34643
34668
  hasMobxStateTree: workspaceFacts.hasMobxStateTree,
34644
34669
  hasMobxReactObserver: workspaceFacts.hasMobxReactObserver,
34670
+ zustandVersion,
34671
+ zustandMajorVersion: zustandVersion === null ? null : getLowestDependencyMajor(zustandVersion),
34645
34672
  framework,
34646
34673
  hasTypeScript,
34647
34674
  hasReactCompiler: detectReactCompiler(directory, packageJson),
@@ -37961,6 +37988,8 @@ const buildCapabilities = (project) => {
37961
37988
  if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
37962
37989
  if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
37963
37990
  if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
37991
+ if (project.zustandVersion !== void 0 && project.zustandVersion !== null) capabilities.add("zustand");
37992
+ if (project.zustandMajorVersion !== void 0 && project.zustandMajorVersion !== null && project.zustandMajorVersion >= 1 && project.zustandMajorVersion <= 5) addMajorLadder(capabilities, "zustand", project.zustandMajorVersion, 1, 5);
37964
37993
  if (project.isPreES2023Target) capabilities.add("pre-es2023");
37965
37994
  if (project.hasReactCompiler) capabilities.add("react-compiler");
37966
37995
  if (project.hasTanStackQuery) capabilities.add("tanstack-query");
@@ -43953,4 +43982,4 @@ const toJsonReport = (result, options) => buildJsonReport({
43953
43982
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
43954
43983
 
43955
43984
  //# sourceMappingURL=index.js.map
43956
- //# debugId=1d61ce96-d819-561a-9f41-f616d6355f62
43985
+ //# debugId=6aa1c6e1-8fcc-50d4-a076-3e864425bdc5
package/dist/lsp.js CHANGED
@@ -34195,15 +34195,15 @@ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
34195
34195
  if (nextMajor === null) return false;
34196
34196
  return nextMajor < currentMajor;
34197
34197
  };
34198
- const shouldReplaceMobxFact = (currentFact, nextFact) => {
34198
+ const shouldReplaceSupportedDependencyFact = (currentFact, nextFact, latestSupportedMajor) => {
34199
34199
  if (currentFact.version === null) return true;
34200
34200
  if (nextFact.version === null) return false;
34201
34201
  const currentMajor = getLowestDependencyMajor(currentFact.version);
34202
34202
  const nextMajor = getLowestDependencyMajor(nextFact.version);
34203
34203
  if (currentMajor === null) return false;
34204
34204
  if (nextMajor === null) return true;
34205
- if (currentMajor > 6) return false;
34206
- if (nextMajor > 6) return true;
34205
+ if (currentMajor > latestSupportedMajor) return false;
34206
+ if (nextMajor > latestSupportedMajor) return true;
34207
34207
  return nextMajor < currentMajor;
34208
34208
  };
34209
34209
  const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
@@ -34239,12 +34239,25 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
34239
34239
  }),
34240
34240
  sourceDirectory: directory
34241
34241
  };
34242
- if (shouldReplaceMobxFact(facts.mobx, nextMobxFact)) facts.mobx = nextMobxFact;
34242
+ if (shouldReplaceSupportedDependencyFact(facts.mobx, nextMobxFact, 6)) facts.mobx = nextMobxFact;
34243
34243
  }
34244
34244
  facts.hasMobxReact = facts.hasMobxReact || getDependencySpec(packageJson, MOBX_REACT_PACKAGE_NAME) !== null;
34245
34245
  facts.hasMobxReactLite = facts.hasMobxReactLite || getDependencySpec(packageJson, MOBX_REACT_LITE_PACKAGE_NAME) !== null;
34246
34246
  facts.hasMobxStateTree = facts.hasMobxStateTree || getDependencySpec(packageJson, MOBX_STATE_TREE_PACKAGE_NAME) !== null;
34247
34247
  facts.hasMobxReactObserver = facts.hasMobxReactObserver || getDependencySpec(packageJson, MOBX_REACT_OBSERVER_PACKAGE_NAME) !== null;
34248
+ const zustandSpec = getDependencySpec(packageJson, "zustand");
34249
+ if (zustandSpec !== null) {
34250
+ const nextZustandFact = {
34251
+ version: resolveCatalogBackedDependencyVersion({
34252
+ rootDirectory: directory,
34253
+ rootPackageJson: packageJson,
34254
+ packageName: "zustand",
34255
+ version: zustandSpec
34256
+ }),
34257
+ sourceDirectory: directory
34258
+ };
34259
+ if (shouldReplaceSupportedDependencyFact(facts.zustand, nextZustandFact, 5)) facts.zustand = nextZustandFact;
34260
+ }
34248
34261
  if (facts.reanimatedVersion === null) {
34249
34262
  const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
34250
34263
  if (spec !== null) facts.reanimatedVersion = spec;
@@ -34302,6 +34315,10 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
34302
34315
  hasMobxReactLite: false,
34303
34316
  hasMobxStateTree: false,
34304
34317
  hasMobxReactObserver: false,
34318
+ zustand: {
34319
+ version: null,
34320
+ sourceDirectory: null
34321
+ },
34305
34322
  hasReactNativeAwarePackage: false,
34306
34323
  hasReanimatedAwarePackage: false,
34307
34324
  hasSsrDependency: false,
@@ -34549,6 +34566,8 @@ const discoverProjectWithoutPackageJson = (directory) => {
34549
34566
  hasMobxReactLite: false,
34550
34567
  hasMobxStateTree: false,
34551
34568
  hasMobxReactObserver: false,
34569
+ zustandVersion: null,
34570
+ zustandMajorVersion: null,
34552
34571
  framework: "unknown",
34553
34572
  hasTypeScript: hasOwnTsConfig,
34554
34573
  hasReactCompiler: false,
@@ -34657,6 +34676,12 @@ const discoverProject = (directory) => {
34657
34676
  packageName: SHOPIFY_FLASH_LIST_PACKAGE_NAME,
34658
34677
  version: workspaceFacts.shopifyFlashList.version
34659
34678
  }) : null;
34679
+ const zustandVersion = resolveCatalogBackedDependencyVersion({
34680
+ rootDirectory: directory,
34681
+ rootPackageJson: packageJson,
34682
+ packageName: "zustand",
34683
+ version: workspaceFacts.zustand.version
34684
+ });
34660
34685
  const hasReanimated = hasReactNativeWorkspace && workspaceFacts.hasReanimatedAwarePackage;
34661
34686
  const reanimatedVersion = hasReanimated ? workspaceFacts.reanimatedVersion : null;
34662
34687
  const nextjsVersion = framework === "nextjs" ? resolveCatalogBackedDependencyVersion({
@@ -34694,6 +34719,8 @@ const discoverProject = (directory) => {
34694
34719
  hasMobxReactLite: workspaceFacts.hasMobxReactLite,
34695
34720
  hasMobxStateTree: workspaceFacts.hasMobxStateTree,
34696
34721
  hasMobxReactObserver: workspaceFacts.hasMobxReactObserver,
34722
+ zustandVersion,
34723
+ zustandMajorVersion: zustandVersion === null ? null : getLowestDependencyMajor(zustandVersion),
34697
34724
  framework,
34698
34725
  hasTypeScript,
34699
34726
  hasReactCompiler: detectReactCompiler(directory, packageJson),
@@ -37939,6 +37966,8 @@ const buildCapabilities = (project) => {
37939
37966
  if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
37940
37967
  if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
37941
37968
  if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
37969
+ if (project.zustandVersion !== void 0 && project.zustandVersion !== null) capabilities.add("zustand");
37970
+ if (project.zustandMajorVersion !== void 0 && project.zustandMajorVersion !== null && project.zustandMajorVersion >= 1 && project.zustandMajorVersion <= 5) addMajorLadder(capabilities, "zustand", project.zustandMajorVersion, 1, 5);
37942
37971
  if (project.isPreES2023Target) capabilities.add("pre-es2023");
37943
37972
  if (project.hasReactCompiler) capabilities.add("react-compiler");
37944
37973
  if (project.hasTanStackQuery) capabilities.add("tanstack-query");
@@ -45573,5 +45602,5 @@ const startLanguageServer = () => {
45573
45602
  };
45574
45603
  //#endregion
45575
45604
  export { startLanguageServer };
45576
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="23f6c159-20b7-5636-888d-5add4f4c7fc3")}catch(e){}}();
45577
- //# debugId=23f6c159-20b7-5636-888d-5add4f4c7fc3
45605
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f2369b82-a22a-50e5-b71b-2ceb30eaee9f")}catch(e){}}();
45606
+ //# debugId=f2369b82-a22a-50e5-b71b-2ceb30eaee9f
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.8.1-dev.61bf03e",
3
+ "version": "0.8.1-dev.6fcd9c9",
4
4
  "description": "Your agent writes bad React. This catches it",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -65,8 +65,8 @@
65
65
  "vscode-languageserver-textdocument": "^1.0.12",
66
66
  "vscode-uri": "^3.1.0",
67
67
  "yaml": "^2.9.0",
68
- "deslop-js": "0.8.1",
69
- "oxlint-plugin-react-doctor": "0.8.1-dev.61bf03e"
68
+ "oxlint-plugin-react-doctor": "0.8.1-dev.6fcd9c9",
69
+ "deslop-js": "0.8.1"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",
@@ -74,9 +74,9 @@
74
74
  "@xterm/headless": "^6.0.0",
75
75
  "commander": "^14.0.3",
76
76
  "ora": "^9.4.0",
77
- "@react-doctor/core": "0.8.1",
78
77
  "@react-doctor/api": "0.8.1",
79
- "@react-doctor/language-server": "0.8.1"
78
+ "@react-doctor/language-server": "0.8.1",
79
+ "@react-doctor/core": "0.8.1"
80
80
  },
81
81
  "engines": {
82
82
  "node": "^20.19.0 || >=22.13.0"