react-doctor 0.7.4 → 0.7.5-dev.037bd56

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/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
@@ -9673,6 +9678,10 @@ interface DiagnoseResult {
9673
9678
  skippedChecks: string[];
9674
9679
  /** See `InspectResult.skippedCheckReasons`. */
9675
9680
  skippedCheckReasons?: Record<string, string>;
9681
+ /** See `InspectResult.analyzedFiles`. */
9682
+ analyzedFiles?: ReadonlyArray<string>;
9683
+ /** See `InspectResult.scannedFileCount`. */
9684
+ scannedFileCount?: number;
9676
9685
  project: ProjectInfo;
9677
9686
  /**
9678
9687
  * Whether the scanned project resolved a React-compatible runtime (React
@@ -9776,6 +9785,12 @@ interface InspectResult {
9776
9785
  * workspace package's tree is nested inside another's.
9777
9786
  */
9778
9787
  scannedFilePaths?: ReadonlyArray<string>;
9788
+ /**
9789
+ * Sorted, deduplicated project-relative POSIX paths whose lint analysis
9790
+ * completed successfully. Empty when lint did not run or failed before any
9791
+ * file completed.
9792
+ */
9793
+ analyzedFiles?: ReadonlyArray<string>;
9779
9794
  /**
9780
9795
  * Wall-clock duration of the scan phase, in milliseconds. Distinct
9781
9796
  * from `elapsedMilliseconds` (which spans the full `inspect()` call
@@ -9785,9 +9800,9 @@ interface InspectResult {
9785
9800
  scanElapsedMilliseconds?: number;
9786
9801
  /**
9787
9802
  * Per-file lint cache outcome: files served from cache, and total files
9788
- * considered. Both absent when the cache was off or bypassed (audit mode,
9789
- * adopted `extends`, user plugins). The CLI projects these onto the Sentry
9790
- * wide event as `lint.cacheHitRatio`.
9803
+ * considered. Both absent when the cache was off or bypassed (adopted
9804
+ * `extends`, user plugins, React Compiler). The CLI projects these onto the
9805
+ * Sentry wide event as `lint.cacheHitRatio`.
9791
9806
  */
9792
9807
  lintCacheHitFileCount?: number | null;
9793
9808
  lintCacheTotalFileCount?: number | null;
@@ -9910,6 +9925,26 @@ interface JsonReportProjectEntry {
9910
9925
  scannedFileCount?: number;
9911
9926
  elapsedMilliseconds: number;
9912
9927
  }
9928
+ interface JsonReportDiagnosticV3 extends Diagnostic {
9929
+ id: string;
9930
+ normalizedFilePath: string;
9931
+ tags: string[];
9932
+ }
9933
+ interface JsonReportProjectEntryV3 {
9934
+ directory: string;
9935
+ packageRoot: string;
9936
+ framework: ProjectInfo["framework"];
9937
+ project: ProjectInfo;
9938
+ diagnostics: JsonReportDiagnosticV3[];
9939
+ score: ScoreResult | null;
9940
+ skippedChecks: string[];
9941
+ skippedCheckReasons?: Record<string, string>;
9942
+ analyzedFiles: string[];
9943
+ analyzedFileCount: number;
9944
+ complete: boolean;
9945
+ scannedFileCount?: number;
9946
+ elapsedMilliseconds: number;
9947
+ }
9913
9948
  interface JsonReportSummary {
9914
9949
  errorCount: number;
9915
9950
  warningCount: number;
@@ -9936,6 +9971,7 @@ interface JsonReportV1$1 {
9936
9971
  ok: boolean;
9937
9972
  directory: string;
9938
9973
  mode: JsonReportMode;
9974
+ baselineDegraded?: boolean;
9939
9975
  /**
9940
9976
  * Whether any scanned project resolved a React-compatible runtime (React
9941
9977
  * or Preact). `false` means every React-runtime rule family was gated off,
@@ -9966,11 +10002,17 @@ interface JsonReportV1$1 {
9966
10002
  * are the *introduced* findings only; `summary.score` is still the head
9967
10003
  * scan's project-health score. New consumers branch on `schemaVersion === 2`.
9968
10004
  */
9969
- interface JsonReportV2 extends Omit<JsonReportV1$1, "schemaVersion"> {
10005
+ interface JsonReportV2$1 extends Omit<JsonReportV1$1, "schemaVersion" | "baselineDegraded"> {
9970
10006
  schemaVersion: 2;
9971
10007
  baseline: JsonReportBaselineInfo;
9972
10008
  }
9973
- type JsonReport = JsonReportV1$1 | JsonReportV2; //#endregion
10009
+ interface JsonReportV3$1 extends Omit<JsonReportV1$1, "schemaVersion" | "projects" | "diagnostics"> {
10010
+ schemaVersion: 3;
10011
+ baseline?: JsonReportBaselineInfo;
10012
+ projects: JsonReportProjectEntryV3[];
10013
+ diagnostics: JsonReportDiagnosticV3[];
10014
+ }
10015
+ type JsonReport = JsonReportV1$1 | JsonReportV2$1 | JsonReportV3$1; //#endregion
9974
10016
  //#region src/types/prompts.d.ts
9975
10017
  //#endregion
9976
10018
  //#region src/project-info/errors.d.ts
@@ -10098,6 +10140,13 @@ declare const AmbiguousProject_base: Class<AmbiguousProject, TaggedStruct<"Ambig
10098
10140
  declare class AmbiguousProject extends AmbiguousProject_base {
10099
10141
  get message(): string;
10100
10142
  }
10143
+ declare const ProjectDiscoveryFailed_base: Class<ProjectDiscoveryFailed, TaggedStruct<"ProjectDiscoveryFailed", {
10144
+ readonly directory: String;
10145
+ readonly cause: Unknown;
10146
+ }>, YieldableError>;
10147
+ declare class ProjectDiscoveryFailed extends ProjectDiscoveryFailed_base {
10148
+ get message(): string;
10149
+ }
10101
10150
  declare const DeadCodeAnalysisFailed_base: Class<DeadCodeAnalysisFailed, TaggedStruct<"DeadCodeAnalysisFailed", {
10102
10151
  readonly cause: Unknown;
10103
10152
  }>, YieldableError>;
@@ -10125,7 +10174,7 @@ declare class GitBaseBranchInvalid extends GitBaseBranchInvalid_base {
10125
10174
  get message(): string;
10126
10175
  }
10127
10176
  declare const ReactDoctorError_base: Class<ReactDoctorError, TaggedStruct<"ReactDoctorError", {
10128
- readonly reason: Union<readonly [typeof OxlintUnavailable, typeof OxlintBatchExceeded, typeof ScanDeadlineExceeded, typeof OxlintSpawnFailed, typeof OxlintOutputUnparseable, typeof ConfigParseFailed, typeof ProjectNotFound, typeof NoReactDependency, typeof AmbiguousProject, typeof DeadCodeAnalysisFailed, typeof GitInvocationFailed, typeof GitBaseBranchMissing, typeof GitBaseBranchInvalid]>;
10177
+ readonly reason: Union<readonly [typeof OxlintUnavailable, typeof OxlintBatchExceeded, typeof ScanDeadlineExceeded, typeof OxlintSpawnFailed, typeof OxlintOutputUnparseable, typeof ConfigParseFailed, typeof ProjectNotFound, typeof NoReactDependency, typeof AmbiguousProject, typeof ProjectDiscoveryFailed, typeof DeadCodeAnalysisFailed, typeof GitInvocationFailed, typeof GitBaseBranchMissing, typeof GitBaseBranchInvalid]>;
10129
10178
  }>, YieldableError>;
10130
10179
  declare class ReactDoctorError extends ReactDoctorError_base {
10131
10180
  get message(): string;
@@ -10172,7 +10221,7 @@ interface BuildJsonReportInput {
10172
10221
  totalElapsedMilliseconds: number;
10173
10222
  /**
10174
10223
  * Present for a baseline run — `scans[].result.diagnostics` are then the
10175
- * introduced findings only. Emits a `schemaVersion: 2` report with the
10224
+ * introduced findings only. Emits a `schemaVersion: 3` report with the
10176
10225
  * delta totals and `mode: "baseline"`.
10177
10226
  */
10178
10227
  baseline?: {
@@ -10185,11 +10234,11 @@ interface BuildJsonReportInput {
10185
10234
  * computed (no merge base — usually a shallow CI checkout — or a failed
10186
10235
  * base/head lint), so `diagnostics` list every finding in the changed files
10187
10236
  * rather than only the introduced ones. Ignored when `baseline` is set: a
10188
- * computed baseline (v2) wins, so callers pass at most one.
10237
+ * computed baseline wins, so callers pass at most one.
10189
10238
  */
10190
10239
  baselineDegraded?: boolean;
10191
10240
  }
10192
- declare const buildJsonReport: (input: BuildJsonReportInput) => JsonReport; //#endregion
10241
+ declare const buildJsonReport: (input: BuildJsonReportInput) => JsonReportV3$1; //#endregion
10193
10242
  //#region src/build-skipped-checks.d.ts
10194
10243
  //#endregion
10195
10244
  //#region src/get-diff-files.d.ts