react-doctor 0.8.1-dev.f5f13b8 → 0.8.1-dev.fc1b3a3

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]="87efffda-8fc4-5b52-80e1-7ec503c85206")}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]="d92b0964-cd34-5965-a1bf-ce1d06faf742")}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";
@@ -36063,58 +36063,6 @@ const IGNORED_DIRECTORIES = new Set([
36063
36063
  ]);
36064
36064
  const JSX_FILE_PATTERN = /\.(tsx|jsx)$/;
36065
36065
  const MILLISECONDS_PER_SECOND = 1e3;
36066
- const REACT_ROUTER_CAPABILITY_THRESHOLDS = [
36067
- {
36068
- capability: "react-router:6.4",
36069
- major: 6,
36070
- minor: 4
36071
- },
36072
- {
36073
- capability: "react-router:6.7",
36074
- major: 6,
36075
- minor: 7
36076
- },
36077
- {
36078
- capability: "react-router:6.9",
36079
- major: 6,
36080
- minor: 9
36081
- },
36082
- {
36083
- capability: "react-router:6.19",
36084
- major: 6,
36085
- minor: 19
36086
- },
36087
- {
36088
- capability: "react-router:7",
36089
- major: 7,
36090
- minor: 0
36091
- },
36092
- {
36093
- capability: "react-router:7.8",
36094
- major: 7,
36095
- minor: 8
36096
- },
36097
- {
36098
- capability: "react-router:7.9",
36099
- major: 7,
36100
- minor: 9
36101
- },
36102
- {
36103
- capability: "react-router:7.10",
36104
- major: 7,
36105
- minor: 10
36106
- },
36107
- {
36108
- capability: "react-router:7.15",
36109
- major: 7,
36110
- minor: 15
36111
- },
36112
- {
36113
- capability: "react-router:8",
36114
- major: 8,
36115
- minor: 0
36116
- }
36117
- ];
36118
36066
  const SCORE_API_URL = "https://www.react.doctor/api/score";
36119
36067
  const ENTERPRISE_CONTACT_URL = "https://react.doctor/enterprise";
36120
36068
  const SHARE_BASE_URL = "https://react.doctor/share";
@@ -36738,7 +36686,7 @@ const detectNextjsStaticExport = (directory) => NEXT_CONFIG_FILENAMES.some((file
36738
36686
  const filePath = Path.join(directory, filename);
36739
36687
  return isFile(filePath) && STATIC_EXPORT_OUTPUT_PATTERN.test(NFS.readFileSync(filePath, "utf-8"));
36740
36688
  });
36741
- const UNRESOLVABLE_PROTOCOL_VERSION = /^(?:catalog|file|git|github|https?|link|patch|portal|workspace|npm):/i;
36689
+ const UNRESOLVABLE_PROTOCOL_VERSION = /^(?:file|git|github|https?|link|patch|portal|workspace|npm):/i;
36742
36690
  const DIST_TAG_VERSION = /^[a-z][a-z0-9._-]*$/i;
36743
36691
  const WILDCARD_VERSION = /^[*xX](?:\.[*xX])*$/;
36744
36692
  const NPM_ALIAS_VERSION = /^npm:(?:@[^/]+\/[^@]+|[^@]+)@(.+)$/i;
@@ -36924,15 +36872,6 @@ const parseReactMajorMinor = (reactVersion) => {
36924
36872
  };
36925
36873
  };
36926
36874
  const parseLowerBoundVersion = (versionSpec) => import_semver.validRange(versionSpec) !== null ? import_semver.minVersion(versionSpec) : import_semver.coerce(versionSpec);
36927
- const parseThreeRelease = (threeVersion) => {
36928
- if (typeof threeVersion !== "string") return null;
36929
- const normalizedVersion = normalizeDependencyVersion(threeVersion);
36930
- if (normalizedVersion === null) return null;
36931
- const lowerBound = parseLowerBoundVersion(normalizedVersion);
36932
- if (lowerBound === null) return null;
36933
- if (lowerBound.major > 0) return Number.MAX_SAFE_INTEGER;
36934
- return lowerBound.minor > 0 ? lowerBound.minor : null;
36935
- };
36936
36875
  const parseDependencyMajorMinor = (dependencyVersion) => {
36937
36876
  if (typeof dependencyVersion !== "string") return null;
36938
36877
  const trimmed = dependencyVersion.trim();
@@ -36966,7 +36905,7 @@ const resolveEffectiveReactMajor = (reactVersion, packageJson) => {
36966
36905
  if (peerFloor === null) return hasUpperBoundOnlyPeerRange(peerReactRange) ? null : installedReactMajor;
36967
36906
  return installedReactMajor !== null ? Math.min(installedReactMajor, peerFloor) : peerFloor;
36968
36907
  };
36969
- const isCatalogReference = (version) => typeof version === "string" && version.startsWith("catalog:");
36908
+ const isCatalogReference = (version) => version.startsWith("catalog:");
36970
36909
  const extractCatalogName = (version) => {
36971
36910
  if (!isCatalogReference(version)) return null;
36972
36911
  const name = version.slice(8).trim();
@@ -37116,12 +37055,6 @@ const TAILWIND_ZOD_SECTIONS = [
37116
37055
  "devDependencies",
37117
37056
  "peerDependencies"
37118
37057
  ];
37119
- const DEPENDENCY_SPEC_SECTIONS = [
37120
- "dependencies",
37121
- "devDependencies",
37122
- "peerDependencies",
37123
- "optionalDependencies"
37124
- ];
37125
37058
  const EMPTY_DEPENDENCY_INFO = {
37126
37059
  reactVersion: null,
37127
37060
  tailwindVersion: null,
@@ -37131,7 +37064,7 @@ const EMPTY_DEPENDENCY_INFO = {
37131
37064
  const pickConcreteVersion = (packageJson, packageName, sections) => {
37132
37065
  for (const section of sections) {
37133
37066
  const version = packageJson[section]?.[packageName];
37134
- if (typeof version !== "string") continue;
37067
+ if (version === void 0) continue;
37135
37068
  if (isCatalogReference(version)) return null;
37136
37069
  if (isConcreteDependencyVersion(version)) return version;
37137
37070
  }
@@ -37163,16 +37096,13 @@ const extractDependencyInfo = (packageJson) => {
37163
37096
  };
37164
37097
  };
37165
37098
  const getDependencySpec = (packageJson, packageName) => {
37166
- for (const section of DEPENDENCY_SPEC_SECTIONS) {
37167
- const spec = packageJson[section]?.[packageName];
37168
- if (typeof spec === "string") return spec;
37169
- }
37170
- return null;
37099
+ const spec = packageJson.dependencies?.[packageName] ?? packageJson.devDependencies?.[packageName] ?? packageJson.peerDependencies?.[packageName] ?? packageJson.optionalDependencies?.[packageName];
37100
+ return typeof spec === "string" ? spec : null;
37171
37101
  };
37172
37102
  const getDependencyDeclaration = ({ packageJson, packageName, sections }) => {
37173
37103
  for (const section of sections) {
37174
37104
  const version = packageJson[section]?.[packageName];
37175
- if (typeof version !== "string") continue;
37105
+ if (version === void 0) continue;
37176
37106
  return {
37177
37107
  catalogReference: extractCatalogName(version) ?? null,
37178
37108
  hasDeclaration: true,
@@ -37206,15 +37136,11 @@ const getPreactVersion = (packageJson) => {
37206
37136
  ...packageJson.devDependencies
37207
37137
  }.preact ?? null;
37208
37138
  };
37209
- const resolveCatalogBackedDependencyVersion = ({ rootDirectory, rootPackageJson, packageName, sourceDirectory = rootDirectory, sourcePackageJson = rootPackageJson, version }) => {
37139
+ const resolveCatalogBackedDependencyVersion = ({ rootDirectory, rootPackageJson, packageName, version }) => {
37210
37140
  if (version === null || !isCatalogReference(version)) return version;
37211
37141
  const catalogName = extractCatalogName(version);
37212
- const resolvedSourceVersion = resolveCatalogVersion(sourcePackageJson, packageName, sourceDirectory, catalogName);
37213
- if (resolvedSourceVersion) return resolvedSourceVersion;
37214
- if (sourceDirectory !== rootDirectory || sourcePackageJson !== rootPackageJson) {
37215
- const resolvedRootVersion = resolveCatalogVersion(rootPackageJson, packageName, rootDirectory, catalogName);
37216
- if (resolvedRootVersion) return resolvedRootVersion;
37217
- }
37142
+ const resolvedLocalVersion = resolveCatalogVersion(rootPackageJson, packageName, rootDirectory, catalogName);
37143
+ if (resolvedLocalVersion) return resolvedLocalVersion;
37218
37144
  const monorepoRoot = findMonorepoRoot(rootDirectory);
37219
37145
  if (!monorepoRoot) return version;
37220
37146
  const monorepoPackageJsonPath = Path.join(monorepoRoot, "package.json");
@@ -37412,19 +37338,15 @@ const listWorkspacePackages = (rootDirectory) => {
37412
37338
  }
37413
37339
  return packages;
37414
37340
  };
37415
- const PREFERRED_DEPENDENCY_SECTIONS = [
37416
- "dependencies",
37417
- "peerDependencies",
37418
- "devDependencies"
37419
- ];
37420
37341
  const getPreferredDependencyVersion = ({ packageJson, packageNames }) => {
37342
+ const allDependencies = {
37343
+ ...packageJson.devDependencies,
37344
+ ...packageJson.peerDependencies,
37345
+ ...packageJson.dependencies
37346
+ };
37421
37347
  for (const packageName of packageNames) {
37422
- const declaration = getDependencyDeclaration({
37423
- packageJson,
37424
- packageName,
37425
- sections: PREFERRED_DEPENDENCY_SECTIONS
37426
- });
37427
- if (declaration.version !== null) return declaration.version;
37348
+ const version = allDependencies[packageName];
37349
+ if (version !== void 0) return version;
37428
37350
  }
37429
37351
  return null;
37430
37352
  };
@@ -37470,26 +37392,6 @@ const MOBX_REACT_PACKAGE_NAME = "mobx-react";
37470
37392
  const MOBX_REACT_LITE_PACKAGE_NAME = "mobx-react-lite";
37471
37393
  const MOBX_STATE_TREE_PACKAGE_NAME = "mobx-state-tree";
37472
37394
  const MOBX_REACT_OBSERVER_PACKAGE_NAME = "mobx-react-observer";
37473
- const REACT_THREE_FIBER_DEPENDENCY_NAMES = ["@react-three/fiber", "react-three-fiber"];
37474
- const REACT_THREE_FIBER_SECTIONS = [
37475
- "dependencies",
37476
- "peerDependencies",
37477
- "optionalDependencies",
37478
- "devDependencies"
37479
- ];
37480
- const THREE_DEPENDENCY_SECTIONS = [
37481
- "dependencies",
37482
- "peerDependencies",
37483
- "optionalDependencies",
37484
- "devDependencies"
37485
- ];
37486
- const REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_DEPENDENCY_NAMES, "@react-three/drei"];
37487
- const THREE_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES, "three"];
37488
- const REACT_ROUTER_DEPENDENCY_NAMES = [
37489
- "@react-router/dev",
37490
- "react-router-dom",
37491
- "react-router"
37492
- ];
37493
37395
  const SHOPIFY_FLASH_LIST_PACKAGE_NAME = "@shopify/flash-list";
37494
37396
  const resolveWorkspaceDependencyVersion = ({ concreteVersion, packageName, rootDirectory, rootPackageJson, sections, workspaceDirectory, workspacePackageJson }) => {
37495
37397
  const dependencyDeclaration = getDependencyDeclaration({
@@ -37500,7 +37402,7 @@ const resolveWorkspaceDependencyVersion = ({ concreteVersion, packageName, rootD
37500
37402
  if (!dependencyDeclaration.hasDeclaration) return null;
37501
37403
  return concreteVersion ?? resolveCatalogVersion(workspacePackageJson, packageName, workspaceDirectory, dependencyDeclaration.catalogReference) ?? resolveCatalogVersion(rootPackageJson, packageName, rootDirectory, dependencyDeclaration.catalogReference);
37502
37404
  };
37503
- const shouldReplaceWithLowerMajor = (currentVersion, nextVersion) => {
37405
+ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
37504
37406
  if (!currentVersion) return true;
37505
37407
  const currentMajor = parseReactMajor(currentVersion);
37506
37408
  const nextMajor = parseReactMajor(nextVersion);
@@ -37563,15 +37465,6 @@ const collectBindingVersion = (facts, packageJson, directory, packageName) => {
37563
37465
  facts.mobxReactLiteVersion = facts.hasMobxReactLite ? selectOldestDependencyVersion(facts.mobxReactLiteVersion, resolvedVersion) : resolvedVersion;
37564
37466
  facts.hasMobxReactLite = true;
37565
37467
  };
37566
- const shouldReplaceReactRouterVersion = (currentVersion, nextVersion) => {
37567
- if (currentVersion === null) return true;
37568
- const current = parseReactMajorMinor(currentVersion);
37569
- const next = parseReactMajorMinor(nextVersion);
37570
- if (current === null) return next !== null;
37571
- if (next === null) return false;
37572
- if (next.major !== current.major) return next.major < current.major;
37573
- return next.minor < current.minor;
37574
- };
37575
37468
  const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
37576
37469
  if (facts.expo.version === null) {
37577
37470
  const spec = getDependencySpec(packageJson, "expo");
@@ -37587,23 +37480,6 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
37587
37480
  sourceDirectory: directory
37588
37481
  };
37589
37482
  }
37590
- for (const packageName of REACT_ROUTER_DEPENDENCY_NAMES) {
37591
- const resolvedSpec = resolveCatalogBackedDependencyVersion({
37592
- rootDirectory,
37593
- rootPackageJson,
37594
- sourceDirectory: directory,
37595
- sourcePackageJson: packageJson,
37596
- packageName,
37597
- version: getDependencySpec(packageJson, packageName)
37598
- });
37599
- if (resolvedSpec === null || !shouldReplaceReactRouterVersion(facts.reactRouter.version, resolvedSpec)) continue;
37600
- facts.reactRouter = {
37601
- version: resolvedSpec,
37602
- sourceDirectory: directory,
37603
- packageName
37604
- };
37605
- }
37606
- facts.hasReactRouterFramework = facts.hasReactRouterFramework || getDependencySpec(packageJson, "@react-router/dev") !== null;
37607
37483
  if (facts.shopifyFlashList.version === null) {
37608
37484
  const spec = getDependencySpec(packageJson, SHOPIFY_FLASH_LIST_PACKAGE_NAME);
37609
37485
  if (spec !== null) facts.shopifyFlashList = {
@@ -37658,43 +37534,6 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
37658
37534
  });
37659
37535
  if (styledComponentsVersion && shouldReplaceStyledComponentsVersion(facts.styledComponentsVersion, styledComponentsVersion)) facts.styledComponentsVersion = styledComponentsVersion;
37660
37536
  facts.hasI18nLibrary = facts.hasI18nLibrary || hasI18nDependency(packageJson);
37661
- for (const packageName of REACT_THREE_FIBER_DEPENDENCY_NAMES) {
37662
- const version = resolveCatalogBackedDependencyVersion({
37663
- rootDirectory,
37664
- rootPackageJson,
37665
- sourceDirectory: directory,
37666
- sourcePackageJson: packageJson,
37667
- packageName,
37668
- version: getDependencyDeclaration({
37669
- packageName,
37670
- packageJson,
37671
- sections: REACT_THREE_FIBER_SECTIONS
37672
- }).version
37673
- });
37674
- if (version === null) continue;
37675
- if (shouldReplaceWithLowerMajor(facts.reactThreeFiber.version, version)) facts.reactThreeFiber = {
37676
- packageName,
37677
- version,
37678
- sourceDirectory: directory
37679
- };
37680
- }
37681
- const threeVersion = resolveCatalogBackedDependencyVersion({
37682
- rootDirectory,
37683
- rootPackageJson,
37684
- sourceDirectory: directory,
37685
- sourcePackageJson: packageJson,
37686
- packageName: "three",
37687
- version: getDependencyDeclaration({
37688
- packageName: "three",
37689
- packageJson,
37690
- sections: THREE_DEPENDENCY_SECTIONS
37691
- }).version
37692
- });
37693
- if (threeVersion !== null) {
37694
- const currentRelease = parseThreeRelease(facts.threeVersion);
37695
- const nextRelease = parseThreeRelease(threeVersion);
37696
- if (facts.threeVersion === null || nextRelease !== null && (currentRelease === null || nextRelease < currentRelease)) facts.threeVersion = threeVersion;
37697
- }
37698
37537
  facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
37699
37538
  facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
37700
37539
  facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
@@ -37716,8 +37555,6 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
37716
37555
  if (currentRemotionMajorVersion === null || remotionMajorVersion < currentRemotionMajorVersion) facts.remotionVersion = resolvedRemotionVersion;
37717
37556
  }
37718
37557
  }
37719
- facts.hasThree = facts.hasThree || THREE_DEPENDENCY_NAMES.some((dependencyName) => getDependencySpec(packageJson, dependencyName) !== null);
37720
- facts.hasReactThreeFiber = facts.hasReactThreeFiber || REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES.some((dependencyName) => getDependencySpec(packageJson, dependencyName) !== null);
37721
37558
  };
37722
37559
  const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGroup }) => {
37723
37560
  const facts = {
@@ -37733,11 +37570,6 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
37733
37570
  version: null,
37734
37571
  sourceDirectory: null
37735
37572
  },
37736
- reactRouter: {
37737
- version: null,
37738
- sourceDirectory: null,
37739
- packageName: null
37740
- },
37741
37573
  shopifyFlashList: {
37742
37574
  version: null,
37743
37575
  sourceDirectory: null
@@ -37766,22 +37598,13 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
37766
37598
  hasRemotionDependency: false,
37767
37599
  hasUnknownRemotionVersion: false,
37768
37600
  remotionVersion: null,
37769
- hasThree: false,
37770
- threeVersion: null,
37771
- hasReactThreeFiber: false,
37772
- reactThreeFiber: {
37773
- packageName: null,
37774
- version: null,
37775
- sourceDirectory: null
37776
- },
37777
- hasReactRouterFramework: false,
37778
37601
  reanimatedVersion: null
37779
37602
  };
37780
37603
  evaluateManifestFacts(facts, rootPackageJson, rootDirectory, rootDirectory, rootPackageJson);
37781
37604
  let isReactGroupSettled = !collectReactGroup;
37782
37605
  const visitedDirectories = /* @__PURE__ */ new Set();
37783
37606
  for (const pattern of getWorkspacePatterns(rootDirectory, rootPackageJson)) {
37784
- const directories = resolveWorkspaceDirectories(rootDirectory, pattern).toSorted();
37607
+ const directories = [...resolveWorkspaceDirectories(rootDirectory, pattern)].sort();
37785
37608
  for (const workspaceDirectory of directories) {
37786
37609
  if (visitedDirectories.has(workspaceDirectory)) continue;
37787
37610
  visitedDirectories.add(workspaceDirectory);
@@ -37817,7 +37640,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
37817
37640
  workspaceDirectory,
37818
37641
  workspacePackageJson
37819
37642
  });
37820
- if (reactVersion && shouldReplaceWithLowerMajor(facts.reactVersion, reactVersion)) facts.reactVersion = reactVersion;
37643
+ if (reactVersion && shouldReplaceReactVersion(facts.reactVersion, reactVersion)) facts.reactVersion = reactVersion;
37821
37644
  if (tailwindVersion && !facts.tailwindVersion) facts.tailwindVersion = tailwindVersion;
37822
37645
  if (zodVersion && !facts.zodVersion) facts.zodVersion = zodVersion;
37823
37646
  const settledReactMajor = parseReactMajor(facts.reactVersion);
@@ -38030,20 +37853,12 @@ const discoverProjectWithoutPackageJson = (directory) => {
38030
37853
  hasI18nLibrary: false,
38031
37854
  tanstackQueryVersion: null,
38032
37855
  styledComponentsVersion: null,
38033
- hasThree: false,
38034
- threeVersion: null,
38035
- threeRelease: null,
38036
- hasReactThreeFiber: false,
38037
- reactThreeFiberVersion: null,
38038
- reactThreeFiberMajorVersion: null,
38039
37856
  hasSsrDependency: false,
38040
37857
  preactVersion: null,
38041
37858
  preactMajorVersion: null,
38042
37859
  hasReactNativeWorkspace: false,
38043
37860
  nextjsVersion: null,
38044
37861
  nextjsMajorVersion: null,
38045
- reactRouterVersion: null,
38046
- hasReactRouterFramework: false,
38047
37862
  expoVersion: null,
38048
37863
  shopifyFlashListVersion: null,
38049
37864
  shopifyFlashListMajorVersion: null,
@@ -38162,27 +37977,9 @@ const discoverProject = (directory) => {
38162
37977
  packageName: "mobx",
38163
37978
  version: workspaceFacts.mobx.version
38164
37979
  });
38165
- const reactRouterVersion = workspaceFacts.reactRouter.packageName === null ? null : resolveCatalogBackedDependencyVersion({
38166
- rootDirectory: directory,
38167
- rootPackageJson: packageJson,
38168
- packageName: workspaceFacts.reactRouter.packageName,
38169
- version: workspaceFacts.reactRouter.version
38170
- });
38171
37980
  const preactVersion = getPreactVersion(packageJson);
38172
37981
  const remotionVersion = workspaceFacts.remotionVersion;
38173
37982
  const tanstackQueryVersion = getTanStackQueryVersion(packageJson) ?? workspaceFacts.tanstackQueryVersion;
38174
- const reactThreeFiberVersion = workspaceFacts.reactThreeFiber.packageName ? resolveCatalogBackedDependencyVersion({
38175
- rootDirectory: directory,
38176
- rootPackageJson: packageJson,
38177
- packageName: workspaceFacts.reactThreeFiber.packageName,
38178
- version: workspaceFacts.reactThreeFiber.version
38179
- }) : null;
38180
- const threeVersion = resolveCatalogBackedDependencyVersion({
38181
- rootDirectory: directory,
38182
- rootPackageJson: packageJson,
38183
- packageName: "three",
38184
- version: workspaceFacts.threeVersion
38185
- });
38186
37983
  const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
38187
37984
  const projectInfo = {
38188
37985
  rootDirectory: directory,
@@ -38215,20 +38012,12 @@ const discoverProject = (directory) => {
38215
38012
  hasRemotion: workspaceFacts.hasRemotionDependency,
38216
38013
  remotionVersion,
38217
38014
  remotionMajorVersion: remotionVersion === null ? null : getLowestDependencyMajor(remotionVersion),
38218
- hasThree: workspaceFacts.hasThree,
38219
- threeVersion,
38220
- threeRelease: parseThreeRelease(threeVersion),
38221
- hasReactThreeFiber: workspaceFacts.hasReactThreeFiber,
38222
- reactThreeFiberVersion,
38223
- reactThreeFiberMajorVersion: reactThreeFiberVersion === null ? null : getLowestDependencyMajor(reactThreeFiberVersion),
38224
38015
  hasSsrDependency: workspaceFacts.hasSsrDependency,
38225
38016
  preactVersion,
38226
38017
  preactMajorVersion: parseReactMajor(preactVersion),
38227
38018
  hasReactNativeWorkspace,
38228
38019
  nextjsVersion,
38229
38020
  nextjsMajorVersion: nextjsVersion === null ? null : getLowestDependencyMajor(nextjsVersion),
38230
- reactRouterVersion,
38231
- hasReactRouterFramework: workspaceFacts.hasReactRouterFramework,
38232
38021
  expoVersion,
38233
38022
  shopifyFlashListVersion,
38234
38023
  shopifyFlashListMajorVersion: shopifyFlashListVersion === null ? null : getLowestDependencyMajor(shopifyFlashListVersion),
@@ -41532,10 +41321,10 @@ const SSR_FRAMEWORKS = new Set([
41532
41321
  "gatsby",
41533
41322
  "tanstack-start"
41534
41323
  ]);
41535
- const addVersionCapabilityLadder = (capabilities, name, detectedVersion, earliest, latest) => {
41536
- if (detectedVersion === null) return;
41537
- const cappedVersion = Math.min(detectedVersion, latest);
41538
- for (let candidate = earliest; candidate <= cappedVersion; candidate += 1) capabilities.add(`${name}:${candidate}`);
41324
+ const addMajorLadder = (capabilities, name, major, earliest, latest) => {
41325
+ if (major === null) return;
41326
+ const cappedMajor = Math.min(major, latest);
41327
+ for (let candidate = earliest; candidate <= cappedMajor; candidate += 1) capabilities.add(`${name}:${candidate}`);
41539
41328
  };
41540
41329
  const buildCapabilities = (project) => {
41541
41330
  const capabilities = /* @__PURE__ */ new Set();
@@ -41549,16 +41338,7 @@ const buildCapabilities = (project) => {
41549
41338
  if (project.isStaticExport) capabilities.add("nextjs:static-export");
41550
41339
  if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
41551
41340
  if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 16) capabilities.add("nextjs:16");
41552
- const reactRouterVersion = project.reactRouterVersion ?? null;
41553
- if (reactRouterVersion !== null) {
41554
- capabilities.add("react-router");
41555
- if (project.hasReactRouterFramework === true) capabilities.add("react-router-framework");
41556
- const detectedVersion = parseReactMajorMinor(reactRouterVersion);
41557
- if (detectedVersion !== null) {
41558
- for (const threshold of REACT_ROUTER_CAPABILITY_THRESHOLDS) if (isMajorMinorAtLeast(detectedVersion, threshold)) capabilities.add(threshold.capability);
41559
- }
41560
- }
41561
- addVersionCapabilityLadder(capabilities, "react", project.reactMajorVersion, 17, 30);
41341
+ addMajorLadder(capabilities, "react", project.reactMajorVersion, 17, 30);
41562
41342
  if (project.reactMajorVersion !== null && project.reactMajorVersion >= 19 && isMajorMinorAtLeast(parseReactMajorMinor(project.reactVersion), {
41563
41343
  major: 19,
41564
41344
  minor: 2
@@ -41596,14 +41376,14 @@ const buildCapabilities = (project) => {
41596
41376
  if (hasMobxReactObserverMemoGuard || hasMobxReactLiteObserverMemoGuard) capabilities.add("mobx-react-binding-observer-memo-guard");
41597
41377
  if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
41598
41378
  if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
41599
- if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addVersionCapabilityLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
41379
+ if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
41600
41380
  const mobxVersion = parseDependencyMajorMinor(project.mobxVersion);
41601
41381
  if (project.mobxMajorVersion === 6 && mobxVersion !== null && isMajorMinorAtLeast(mobxVersion, {
41602
41382
  major: 6,
41603
41383
  minor: 10
41604
41384
  })) capabilities.add("mobx:6.10");
41605
41385
  if (project.zustandVersion !== void 0 && project.zustandVersion !== null) capabilities.add("zustand");
41606
- if (project.zustandMajorVersion !== void 0 && project.zustandMajorVersion !== null && project.zustandMajorVersion >= 1 && project.zustandMajorVersion <= 5) addVersionCapabilityLadder(capabilities, "zustand", project.zustandMajorVersion, 1, 5);
41386
+ if (project.zustandMajorVersion !== void 0 && project.zustandMajorVersion !== null && project.zustandMajorVersion >= 1 && project.zustandMajorVersion <= 5) addMajorLadder(capabilities, "zustand", project.zustandMajorVersion, 1, 5);
41607
41387
  if (project.isPreES2023Target) capabilities.add("pre-es2023");
41608
41388
  if (project.hasReactCompiler) capabilities.add("react-compiler");
41609
41389
  if (Boolean(project.hasTanStackQuery) || Boolean(project.tanstackQueryVersion)) capabilities.add("tanstack-query");
@@ -41614,20 +41394,14 @@ const buildCapabilities = (project) => {
41614
41394
  }
41615
41395
  if (project.hasI18nLibrary) capabilities.add("i18n");
41616
41396
  if (project.valtioVersion !== null) capabilities.add("valtio");
41617
- addVersionCapabilityLadder(capabilities, "valtio", project.valtioMajorVersion, 1, 10);
41397
+ addMajorLadder(capabilities, "valtio", project.valtioMajorVersion, 1, 10);
41618
41398
  if (project.hasRemotion) {
41619
41399
  capabilities.add("remotion");
41620
- addVersionCapabilityLadder(capabilities, "remotion", project.remotionMajorVersion ?? null, 4, 30);
41621
- }
41622
- if (project.hasThree || project.hasReactThreeFiber) capabilities.add("three");
41623
- addVersionCapabilityLadder(capabilities, "three", project.threeRelease ?? null, 145, 250);
41624
- if (project.hasReactThreeFiber) {
41625
- capabilities.add("r3f");
41626
- addVersionCapabilityLadder(capabilities, "r3f", project.reactThreeFiberMajorVersion ?? null, 3, 10);
41400
+ addMajorLadder(capabilities, "remotion", project.remotionMajorVersion ?? null, 4, 30);
41627
41401
  }
41628
41402
  if (project.hasTypeScript) capabilities.add("typescript");
41629
41403
  if (project.preactVersion !== null) capabilities.add("preact");
41630
- addVersionCapabilityLadder(capabilities, "preact", project.preactMajorVersion, 10, 20);
41404
+ addMajorLadder(capabilities, "preact", project.preactMajorVersion, 10, 20);
41631
41405
  if (project.preactVersion !== null && project.reactVersion === null) capabilities.add("pure-preact");
41632
41406
  return capabilities;
41633
41407
  };
@@ -47952,7 +47726,7 @@ const makeNoopConsole = () => ({
47952
47726
  });
47953
47727
  //#endregion
47954
47728
  //#region src/cli/utils/version.ts
47955
- const VERSION = "0.8.1-dev.f5f13b8";
47729
+ const VERSION = "0.8.1-dev.fc1b3a3";
47956
47730
  //#endregion
47957
47731
  //#region src/cli/utils/json-mode.ts
47958
47732
  let context = null;
@@ -48310,13 +48084,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
48310
48084
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
48311
48085
  * standard `SENTRY_RELEASE` override.
48312
48086
  */
48313
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.f5f13b8`;
48087
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.fc1b3a3`;
48314
48088
  /**
48315
48089
  * Deployment environment shown in Sentry's environment filter. Defaults to
48316
48090
  * `production` for tagged releases and `development` for dev/unbuilt versions,
48317
48091
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
48318
48092
  */
48319
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.f5f13b8") ? "development" : "production");
48093
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.fc1b3a3") ? "development" : "production");
48320
48094
  /**
48321
48095
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
48322
48096
  * (set to `0` to disable tracing) and falls back to
@@ -67037,4 +66811,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
67037
66811
  export {};
67038
66812
 
67039
66813
  //# sourceMappingURL=cli.js.map
67040
- //# debugId=87efffda-8fc4-5b52-80e1-7ec503c85206
66814
+ //# debugId=d92b0964-cd34-5965-a1bf-ce1d06faf742
package/dist/index.d.ts CHANGED
@@ -9568,18 +9568,6 @@ interface ProjectInfo {
9568
9568
  hasI18nLibrary?: boolean;
9569
9569
  tanstackQueryVersion?: string | null;
9570
9570
  styledComponentsVersion?: string | null;
9571
- /** Whether the project or one of its workspaces declares Three.js, Fiber, or Drei. */
9572
- hasThree?: boolean;
9573
- /** Lowest declared Three.js version across the project and its workspaces. */
9574
- threeVersion?: string | null;
9575
- /** Three.js release number parsed from threeVersion (`0.146.x` becomes 146). */
9576
- threeRelease?: number | null;
9577
- /** Whether the project or one of its workspaces declares React Three Fiber or Drei. */
9578
- hasReactThreeFiber?: boolean;
9579
- /** Declared version of @react-three/fiber or its legacy package name, when directly present. */
9580
- reactThreeFiberVersion?: string | null;
9581
- /** Parsed major from reactThreeFiberVersion, or null when absent or unparseable. */
9582
- reactThreeFiberMajorVersion?: number | null;
9583
9571
  /**
9584
9572
  * The declared `valtio` version spec, or `null` when no package in the
9585
9573
  * analyzed project declares Valtio. `useSnapshot` has kept the same
@@ -9622,10 +9610,6 @@ interface ProjectInfo {
9622
9610
  hasReactNativeWorkspace: boolean;
9623
9611
  nextjsVersion: string | null;
9624
9612
  nextjsMajorVersion: number | null;
9625
- /** Declared React Router runtime version from `@react-router/dev`, `react-router-dom`, or `react-router`. */
9626
- reactRouterVersion?: string | null;
9627
- /** Whether the project declares `@react-router/dev` and therefore uses Framework mode. */
9628
- hasReactRouterFramework?: boolean;
9629
9613
  /**
9630
9614
  * The declared `expo` package version spec (e.g. `"~51.0.0"`), looked up
9631
9615
  * in the project or any of its workspace packages, or `null` when `expo`