react-doctor 0.7.4-dev.70b5d99 → 0.7.4-dev.7bbb792

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]="3203840f-abe6-5c29-95e2-d00e2e042a00")}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]="09731967-e6b8-5d9e-84b7-cb46a451b11a")}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";
@@ -37147,6 +37147,22 @@ const isPackageJsonReanimatedAware = (packageJson) => {
37147
37147
  };
37148
37148
  return Object.hasOwn(allDependencies, REANIMATED_DEPENDENCY_NAME$1);
37149
37149
  };
37150
+ const SSR_DEPENDENCY_NAMES = new Set([
37151
+ "@react-router/cloudflare",
37152
+ "@react-router/node",
37153
+ "@react-router/serve",
37154
+ "vike",
37155
+ "vite-plugin-ssr"
37156
+ ]);
37157
+ const isPackageJsonSsrAware = (packageJson) => {
37158
+ const allDependencies = {
37159
+ ...packageJson.peerDependencies,
37160
+ ...packageJson.dependencies,
37161
+ ...packageJson.devDependencies,
37162
+ ...packageJson.optionalDependencies
37163
+ };
37164
+ return Object.keys(allDependencies).some((packageName) => SSR_DEPENDENCY_NAMES.has(packageName));
37165
+ };
37150
37166
  const getWorkspacePatterns = (rootDirectory, packageJson) => {
37151
37167
  const pnpmPatterns = parsePnpmWorkspacePatterns(rootDirectory);
37152
37168
  if (pnpmPatterns.length > 0) return pnpmPatterns;
@@ -37287,6 +37303,7 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
37287
37303
  }
37288
37304
  facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
37289
37305
  facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
37306
+ facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
37290
37307
  };
37291
37308
  const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGroup }) => {
37292
37309
  const facts = {
@@ -37308,6 +37325,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
37308
37325
  },
37309
37326
  hasReactNativeAwarePackage: false,
37310
37327
  hasReanimatedAwarePackage: false,
37328
+ hasSsrDependency: false,
37311
37329
  reanimatedVersion: null
37312
37330
  };
37313
37331
  evaluateManifestFacts(facts, rootPackageJson, rootDirectory);
@@ -37544,6 +37562,7 @@ const discoverProjectWithoutPackageJson = (directory) => {
37544
37562
  hasTypeScript: hasOwnTsConfig,
37545
37563
  hasReactCompiler: false,
37546
37564
  hasTanStackQuery: false,
37565
+ hasSsrDependency: false,
37547
37566
  preactVersion: null,
37548
37567
  preactMajorVersion: null,
37549
37568
  hasReactNativeWorkspace: false,
@@ -37663,6 +37682,7 @@ const discoverProject = (directory) => {
37663
37682
  hasTypeScript,
37664
37683
  hasReactCompiler: detectReactCompiler(directory, packageJson),
37665
37684
  hasTanStackQuery: hasTanStackQuery(packageJson),
37685
+ hasSsrDependency: workspaceFacts.hasSsrDependency,
37666
37686
  preactVersion,
37667
37687
  preactMajorVersion: parseReactMajor(preactVersion),
37668
37688
  hasReactNativeWorkspace,
@@ -40516,6 +40536,12 @@ const CLIENT_ONLY_FRAMEWORKS = new Set([
40516
40536
  "react-native",
40517
40537
  "expo"
40518
40538
  ]);
40539
+ const SSR_FRAMEWORKS = new Set([
40540
+ "nextjs",
40541
+ "remix",
40542
+ "gatsby",
40543
+ "tanstack-start"
40544
+ ]);
40519
40545
  const addMajorLadder = (capabilities, name, major, earliest, latest) => {
40520
40546
  if (major === null) return;
40521
40547
  const cappedMajor = Math.min(major, latest);
@@ -40528,6 +40554,7 @@ const buildCapabilities = (project) => {
40528
40554
  if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
40529
40555
  if (project.expoVersion !== null) capabilities.add("expo");
40530
40556
  if ((project.framework === "nextjs" || project.framework === "tanstack-start" || project.framework === "remix") && !project.isStaticExport) capabilities.add("server-actions");
40557
+ if (SSR_FRAMEWORKS.has(project.framework) || project.hasSsrDependency) capabilities.add("ssr");
40531
40558
  if (CLIENT_ONLY_FRAMEWORKS.has(project.framework)) capabilities.add("client-only");
40532
40559
  if (project.isStaticExport) capabilities.add("nextjs:static-export");
40533
40560
  if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
@@ -46602,7 +46629,7 @@ const makeNoopConsole = () => ({
46602
46629
  });
46603
46630
  //#endregion
46604
46631
  //#region src/cli/utils/version.ts
46605
- const VERSION = "0.7.4-dev.70b5d99";
46632
+ const VERSION = "0.7.4-dev.7bbb792";
46606
46633
  //#endregion
46607
46634
  //#region src/cli/utils/json-mode.ts
46608
46635
  let context = null;
@@ -46971,13 +46998,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
46971
46998
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
46972
46999
  * standard `SENTRY_RELEASE` override.
46973
47000
  */
46974
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.4-dev.70b5d99`;
47001
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.4-dev.7bbb792`;
46975
47002
  /**
46976
47003
  * Deployment environment shown in Sentry's environment filter. Defaults to
46977
47004
  * `production` for tagged releases and `development` for dev/unbuilt versions,
46978
47005
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
46979
47006
  */
46980
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.4-dev.70b5d99") ? "development" : "production");
47007
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.4-dev.7bbb792") ? "development" : "production");
46981
47008
  /**
46982
47009
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
46983
47010
  * (set to `0` to disable tracing) and falls back to
@@ -65166,4 +65193,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
65166
65193
  export {};
65167
65194
 
65168
65195
  //# sourceMappingURL=cli.js.map
65169
- //# debugId=3203840f-abe6-5c29-95e2-d00e2e042a00
65196
+ //# debugId=09731967-e6b8-5d9e-84b7-cb46a451b11a
package/dist/index.d.ts CHANGED
@@ -9541,6 +9541,11 @@ interface ProjectInfo {
9541
9541
  hasTypeScript: boolean;
9542
9542
  hasReactCompiler: boolean;
9543
9543
  hasTanStackQuery: boolean;
9544
+ /**
9545
+ * `true` when the project or a workspace declares a Vite-based SSR runtime
9546
+ * such as React Router's Node adapter, Vike, or vite-plugin-ssr.
9547
+ */
9548
+ hasSsrDependency: boolean;
9544
9549
  /**
9545
9550
  * The declared `preact` version spec, or `null` when Preact isn't a
9546
9551
  * dependency. Parallels `reactVersion` so a React-compatible runtime is
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]="fc8f34ed-4372-511a-95e8-0b1638d728fa")}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]="95e70e55-12b7-5577-81f3-f5331db7ca53")}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";
@@ -33952,6 +33952,22 @@ const isPackageJsonReanimatedAware = (packageJson) => {
33952
33952
  };
33953
33953
  return Object.hasOwn(allDependencies, REANIMATED_DEPENDENCY_NAME$1);
33954
33954
  };
33955
+ const SSR_DEPENDENCY_NAMES = new Set([
33956
+ "@react-router/cloudflare",
33957
+ "@react-router/node",
33958
+ "@react-router/serve",
33959
+ "vike",
33960
+ "vite-plugin-ssr"
33961
+ ]);
33962
+ const isPackageJsonSsrAware = (packageJson) => {
33963
+ const allDependencies = {
33964
+ ...packageJson.peerDependencies,
33965
+ ...packageJson.dependencies,
33966
+ ...packageJson.devDependencies,
33967
+ ...packageJson.optionalDependencies
33968
+ };
33969
+ return Object.keys(allDependencies).some((packageName) => SSR_DEPENDENCY_NAMES.has(packageName));
33970
+ };
33955
33971
  const getWorkspacePatterns = (rootDirectory, packageJson) => {
33956
33972
  const pnpmPatterns = parsePnpmWorkspacePatterns(rootDirectory);
33957
33973
  if (pnpmPatterns.length > 0) return pnpmPatterns;
@@ -34092,6 +34108,7 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
34092
34108
  }
34093
34109
  facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
34094
34110
  facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
34111
+ facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
34095
34112
  };
34096
34113
  const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGroup }) => {
34097
34114
  const facts = {
@@ -34113,6 +34130,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
34113
34130
  },
34114
34131
  hasReactNativeAwarePackage: false,
34115
34132
  hasReanimatedAwarePackage: false,
34133
+ hasSsrDependency: false,
34116
34134
  reanimatedVersion: null
34117
34135
  };
34118
34136
  evaluateManifestFacts(facts, rootPackageJson, rootDirectory);
@@ -34352,6 +34370,7 @@ const discoverProjectWithoutPackageJson = (directory) => {
34352
34370
  hasTypeScript: hasOwnTsConfig,
34353
34371
  hasReactCompiler: false,
34354
34372
  hasTanStackQuery: false,
34373
+ hasSsrDependency: false,
34355
34374
  preactVersion: null,
34356
34375
  preactMajorVersion: null,
34357
34376
  hasReactNativeWorkspace: false,
@@ -34471,6 +34490,7 @@ const discoverProject = (directory) => {
34471
34490
  hasTypeScript,
34472
34491
  hasReactCompiler: detectReactCompiler(directory, packageJson),
34473
34492
  hasTanStackQuery: hasTanStackQuery(packageJson),
34493
+ hasSsrDependency: workspaceFacts.hasSsrDependency,
34474
34494
  preactVersion,
34475
34495
  preactMajorVersion: parseReactMajor(preactVersion),
34476
34496
  hasReactNativeWorkspace,
@@ -37289,6 +37309,12 @@ const CLIENT_ONLY_FRAMEWORKS = new Set([
37289
37309
  "react-native",
37290
37310
  "expo"
37291
37311
  ]);
37312
+ const SSR_FRAMEWORKS = new Set([
37313
+ "nextjs",
37314
+ "remix",
37315
+ "gatsby",
37316
+ "tanstack-start"
37317
+ ]);
37292
37318
  const addMajorLadder = (capabilities, name, major, earliest, latest) => {
37293
37319
  if (major === null) return;
37294
37320
  const cappedMajor = Math.min(major, latest);
@@ -37301,6 +37327,7 @@ const buildCapabilities = (project) => {
37301
37327
  if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
37302
37328
  if (project.expoVersion !== null) capabilities.add("expo");
37303
37329
  if ((project.framework === "nextjs" || project.framework === "tanstack-start" || project.framework === "remix") && !project.isStaticExport) capabilities.add("server-actions");
37330
+ if (SSR_FRAMEWORKS.has(project.framework) || project.hasSsrDependency) capabilities.add("ssr");
37304
37331
  if (CLIENT_ONLY_FRAMEWORKS.has(project.framework)) capabilities.add("client-only");
37305
37332
  if (project.isStaticExport) capabilities.add("nextjs:static-export");
37306
37333
  if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
@@ -43145,4 +43172,4 @@ const toJsonReport = (result, options) => buildJsonReport({
43145
43172
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
43146
43173
 
43147
43174
  //# sourceMappingURL=index.js.map
43148
- //# debugId=fc8f34ed-4372-511a-95e8-0b1638d728fa
43175
+ //# debugId=95e70e55-12b7-5577-81f3-f5331db7ca53
package/dist/lsp.js CHANGED
@@ -34004,6 +34004,22 @@ const isPackageJsonReanimatedAware = (packageJson) => {
34004
34004
  };
34005
34005
  return Object.hasOwn(allDependencies, REANIMATED_DEPENDENCY_NAME$1);
34006
34006
  };
34007
+ const SSR_DEPENDENCY_NAMES = new Set([
34008
+ "@react-router/cloudflare",
34009
+ "@react-router/node",
34010
+ "@react-router/serve",
34011
+ "vike",
34012
+ "vite-plugin-ssr"
34013
+ ]);
34014
+ const isPackageJsonSsrAware = (packageJson) => {
34015
+ const allDependencies = {
34016
+ ...packageJson.peerDependencies,
34017
+ ...packageJson.dependencies,
34018
+ ...packageJson.devDependencies,
34019
+ ...packageJson.optionalDependencies
34020
+ };
34021
+ return Object.keys(allDependencies).some((packageName) => SSR_DEPENDENCY_NAMES.has(packageName));
34022
+ };
34007
34023
  const getWorkspacePatterns = (rootDirectory, packageJson) => {
34008
34024
  const pnpmPatterns = parsePnpmWorkspacePatterns(rootDirectory);
34009
34025
  if (pnpmPatterns.length > 0) return pnpmPatterns;
@@ -34144,6 +34160,7 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
34144
34160
  }
34145
34161
  facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
34146
34162
  facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
34163
+ facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
34147
34164
  };
34148
34165
  const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGroup }) => {
34149
34166
  const facts = {
@@ -34165,6 +34182,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
34165
34182
  },
34166
34183
  hasReactNativeAwarePackage: false,
34167
34184
  hasReanimatedAwarePackage: false,
34185
+ hasSsrDependency: false,
34168
34186
  reanimatedVersion: null
34169
34187
  };
34170
34188
  evaluateManifestFacts(facts, rootPackageJson, rootDirectory);
@@ -34404,6 +34422,7 @@ const discoverProjectWithoutPackageJson = (directory) => {
34404
34422
  hasTypeScript: hasOwnTsConfig,
34405
34423
  hasReactCompiler: false,
34406
34424
  hasTanStackQuery: false,
34425
+ hasSsrDependency: false,
34407
34426
  preactVersion: null,
34408
34427
  preactMajorVersion: null,
34409
34428
  hasReactNativeWorkspace: false,
@@ -34523,6 +34542,7 @@ const discoverProject = (directory) => {
34523
34542
  hasTypeScript,
34524
34543
  hasReactCompiler: detectReactCompiler(directory, packageJson),
34525
34544
  hasTanStackQuery: hasTanStackQuery(packageJson),
34545
+ hasSsrDependency: workspaceFacts.hasSsrDependency,
34526
34546
  preactVersion,
34527
34547
  preactMajorVersion: parseReactMajor(preactVersion),
34528
34548
  hasReactNativeWorkspace,
@@ -37267,6 +37287,12 @@ const CLIENT_ONLY_FRAMEWORKS = new Set([
37267
37287
  "react-native",
37268
37288
  "expo"
37269
37289
  ]);
37290
+ const SSR_FRAMEWORKS = new Set([
37291
+ "nextjs",
37292
+ "remix",
37293
+ "gatsby",
37294
+ "tanstack-start"
37295
+ ]);
37270
37296
  const addMajorLadder = (capabilities, name, major, earliest, latest) => {
37271
37297
  if (major === null) return;
37272
37298
  const cappedMajor = Math.min(major, latest);
@@ -37279,6 +37305,7 @@ const buildCapabilities = (project) => {
37279
37305
  if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
37280
37306
  if (project.expoVersion !== null) capabilities.add("expo");
37281
37307
  if ((project.framework === "nextjs" || project.framework === "tanstack-start" || project.framework === "remix") && !project.isStaticExport) capabilities.add("server-actions");
37308
+ if (SSR_FRAMEWORKS.has(project.framework) || project.hasSsrDependency) capabilities.add("ssr");
37282
37309
  if (CLIENT_ONLY_FRAMEWORKS.has(project.framework)) capabilities.add("client-only");
37283
37310
  if (project.isStaticExport) capabilities.add("nextjs:static-export");
37284
37311
  if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
@@ -44789,5 +44816,5 @@ const startLanguageServer = () => {
44789
44816
  };
44790
44817
  //#endregion
44791
44818
  export { startLanguageServer };
44792
- !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]="40aee606-c43b-5c71-8073-3be1f280e472")}catch(e){}}();
44793
- //# debugId=40aee606-c43b-5c71-8073-3be1f280e472
44819
+ !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]="c686dc30-13d8-539e-acb4-e8b997f967e6")}catch(e){}}();
44820
+ //# debugId=c686dc30-13d8-539e-acb4-e8b997f967e6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.7.4-dev.70b5d99",
3
+ "version": "0.7.4-dev.7bbb792",
4
4
  "description": "Your agent writes bad React. This catches it",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -66,7 +66,7 @@
66
66
  "vscode-uri": "^3.1.0",
67
67
  "yaml": "^2.9.0",
68
68
  "deslop-js": "0.7.4",
69
- "oxlint-plugin-react-doctor": "0.7.4-dev.70b5d99"
69
+ "oxlint-plugin-react-doctor": "0.7.4-dev.7bbb792"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",
@@ -74,8 +74,8 @@
74
74
  "@xterm/headless": "^6.0.0",
75
75
  "commander": "^14.0.3",
76
76
  "ora": "^9.4.0",
77
- "@react-doctor/core": "0.7.4",
78
77
  "@react-doctor/api": "0.7.4",
78
+ "@react-doctor/core": "0.7.4",
79
79
  "@react-doctor/language-server": "0.7.4"
80
80
  },
81
81
  "engines": {