react-doctor 0.7.4-dev.99ac4ff → 0.7.4-dev.a31f5e8
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/README.md +8 -0
- package/dist/cli.js +276 -79
- package/dist/index.d.ts +47 -5
- package/dist/index.js +251 -64
- package/dist/lsp.js +174 -33
- package/package.json +2 -2
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
|
|
@@ -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
|
-
|
|
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
|
|
@@ -10179,7 +10221,7 @@ interface BuildJsonReportInput {
|
|
|
10179
10221
|
totalElapsedMilliseconds: number;
|
|
10180
10222
|
/**
|
|
10181
10223
|
* Present for a baseline run — `scans[].result.diagnostics` are then the
|
|
10182
|
-
* introduced findings only. Emits a `schemaVersion:
|
|
10224
|
+
* introduced findings only. Emits a `schemaVersion: 3` report with the
|
|
10183
10225
|
* delta totals and `mode: "baseline"`.
|
|
10184
10226
|
*/
|
|
10185
10227
|
baseline?: {
|
|
@@ -10192,11 +10234,11 @@ interface BuildJsonReportInput {
|
|
|
10192
10234
|
* computed (no merge base — usually a shallow CI checkout — or a failed
|
|
10193
10235
|
* base/head lint), so `diagnostics` list every finding in the changed files
|
|
10194
10236
|
* rather than only the introduced ones. Ignored when `baseline` is set: a
|
|
10195
|
-
* computed baseline
|
|
10237
|
+
* computed baseline wins, so callers pass at most one.
|
|
10196
10238
|
*/
|
|
10197
10239
|
baselineDegraded?: boolean;
|
|
10198
10240
|
}
|
|
10199
|
-
declare const buildJsonReport: (input: BuildJsonReportInput) =>
|
|
10241
|
+
declare const buildJsonReport: (input: BuildJsonReportInput) => JsonReportV3$1; //#endregion
|
|
10200
10242
|
//#region src/build-skipped-checks.d.ts
|
|
10201
10243
|
//#endregion
|
|
10202
10244
|
//#region src/get-diff-files.d.ts
|