react-doctor 0.7.4-dev.d4f2209 → 0.7.4
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 +0 -8
- package/dist/cli.js +81 -290
- package/dist/index.d.ts +6 -55
- package/dist/index.js +66 -265
- package/dist/lsp.js +35 -188
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -9541,11 +9541,6 @@ 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;
|
|
9549
9544
|
/**
|
|
9550
9545
|
* The declared `preact` version spec, or `null` when Preact isn't a
|
|
9551
9546
|
* dependency. Parallels `reactVersion` so a React-compatible runtime is
|
|
@@ -9678,10 +9673,6 @@ interface DiagnoseResult {
|
|
|
9678
9673
|
skippedChecks: string[];
|
|
9679
9674
|
/** See `InspectResult.skippedCheckReasons`. */
|
|
9680
9675
|
skippedCheckReasons?: Record<string, string>;
|
|
9681
|
-
/** See `InspectResult.analyzedFiles`. */
|
|
9682
|
-
analyzedFiles?: ReadonlyArray<string>;
|
|
9683
|
-
/** See `InspectResult.scannedFileCount`. */
|
|
9684
|
-
scannedFileCount?: number;
|
|
9685
9676
|
project: ProjectInfo;
|
|
9686
9677
|
/**
|
|
9687
9678
|
* Whether the scanned project resolved a React-compatible runtime (React
|
|
@@ -9785,12 +9776,6 @@ interface InspectResult {
|
|
|
9785
9776
|
* workspace package's tree is nested inside another's.
|
|
9786
9777
|
*/
|
|
9787
9778
|
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>;
|
|
9794
9779
|
/**
|
|
9795
9780
|
* Wall-clock duration of the scan phase, in milliseconds. Distinct
|
|
9796
9781
|
* from `elapsedMilliseconds` (which spans the full `inspect()` call
|
|
@@ -9925,26 +9910,6 @@ interface JsonReportProjectEntry {
|
|
|
9925
9910
|
scannedFileCount?: number;
|
|
9926
9911
|
elapsedMilliseconds: number;
|
|
9927
9912
|
}
|
|
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
|
-
}
|
|
9948
9913
|
interface JsonReportSummary {
|
|
9949
9914
|
errorCount: number;
|
|
9950
9915
|
warningCount: number;
|
|
@@ -9971,7 +9936,6 @@ interface JsonReportV1$1 {
|
|
|
9971
9936
|
ok: boolean;
|
|
9972
9937
|
directory: string;
|
|
9973
9938
|
mode: JsonReportMode;
|
|
9974
|
-
baselineDegraded?: boolean;
|
|
9975
9939
|
/**
|
|
9976
9940
|
* Whether any scanned project resolved a React-compatible runtime (React
|
|
9977
9941
|
* or Preact). `false` means every React-runtime rule family was gated off,
|
|
@@ -10002,17 +9966,11 @@ interface JsonReportV1$1 {
|
|
|
10002
9966
|
* are the *introduced* findings only; `summary.score` is still the head
|
|
10003
9967
|
* scan's project-health score. New consumers branch on `schemaVersion === 2`.
|
|
10004
9968
|
*/
|
|
10005
|
-
interface JsonReportV2
|
|
9969
|
+
interface JsonReportV2 extends Omit<JsonReportV1$1, "schemaVersion"> {
|
|
10006
9970
|
schemaVersion: 2;
|
|
10007
9971
|
baseline: JsonReportBaselineInfo;
|
|
10008
9972
|
}
|
|
10009
|
-
|
|
10010
|
-
schemaVersion: 3;
|
|
10011
|
-
baseline?: JsonReportBaselineInfo;
|
|
10012
|
-
projects: JsonReportProjectEntryV3[];
|
|
10013
|
-
diagnostics: JsonReportDiagnosticV3[];
|
|
10014
|
-
}
|
|
10015
|
-
type JsonReport = JsonReportV1$1 | JsonReportV2$1 | JsonReportV3$1; //#endregion
|
|
9973
|
+
type JsonReport = JsonReportV1$1 | JsonReportV2; //#endregion
|
|
10016
9974
|
//#region src/types/prompts.d.ts
|
|
10017
9975
|
//#endregion
|
|
10018
9976
|
//#region src/project-info/errors.d.ts
|
|
@@ -10140,13 +10098,6 @@ declare const AmbiguousProject_base: Class<AmbiguousProject, TaggedStruct<"Ambig
|
|
|
10140
10098
|
declare class AmbiguousProject extends AmbiguousProject_base {
|
|
10141
10099
|
get message(): string;
|
|
10142
10100
|
}
|
|
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
|
-
}
|
|
10150
10101
|
declare const DeadCodeAnalysisFailed_base: Class<DeadCodeAnalysisFailed, TaggedStruct<"DeadCodeAnalysisFailed", {
|
|
10151
10102
|
readonly cause: Unknown;
|
|
10152
10103
|
}>, YieldableError>;
|
|
@@ -10174,7 +10125,7 @@ declare class GitBaseBranchInvalid extends GitBaseBranchInvalid_base {
|
|
|
10174
10125
|
get message(): string;
|
|
10175
10126
|
}
|
|
10176
10127
|
declare const ReactDoctorError_base: Class<ReactDoctorError, TaggedStruct<"ReactDoctorError", {
|
|
10177
|
-
readonly reason: Union<readonly [typeof OxlintUnavailable, typeof OxlintBatchExceeded, typeof ScanDeadlineExceeded, typeof OxlintSpawnFailed, typeof OxlintOutputUnparseable, typeof ConfigParseFailed, typeof ProjectNotFound, typeof NoReactDependency, typeof AmbiguousProject, typeof
|
|
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]>;
|
|
10178
10129
|
}>, YieldableError>;
|
|
10179
10130
|
declare class ReactDoctorError extends ReactDoctorError_base {
|
|
10180
10131
|
get message(): string;
|
|
@@ -10221,7 +10172,7 @@ interface BuildJsonReportInput {
|
|
|
10221
10172
|
totalElapsedMilliseconds: number;
|
|
10222
10173
|
/**
|
|
10223
10174
|
* Present for a baseline run — `scans[].result.diagnostics` are then the
|
|
10224
|
-
* introduced findings only. Emits a `schemaVersion:
|
|
10175
|
+
* introduced findings only. Emits a `schemaVersion: 2` report with the
|
|
10225
10176
|
* delta totals and `mode: "baseline"`.
|
|
10226
10177
|
*/
|
|
10227
10178
|
baseline?: {
|
|
@@ -10234,11 +10185,11 @@ interface BuildJsonReportInput {
|
|
|
10234
10185
|
* computed (no merge base — usually a shallow CI checkout — or a failed
|
|
10235
10186
|
* base/head lint), so `diagnostics` list every finding in the changed files
|
|
10236
10187
|
* rather than only the introduced ones. Ignored when `baseline` is set: a
|
|
10237
|
-
* computed baseline wins, so callers pass at most one.
|
|
10188
|
+
* computed baseline (v2) wins, so callers pass at most one.
|
|
10238
10189
|
*/
|
|
10239
10190
|
baselineDegraded?: boolean;
|
|
10240
10191
|
}
|
|
10241
|
-
declare const buildJsonReport: (input: BuildJsonReportInput) =>
|
|
10192
|
+
declare const buildJsonReport: (input: BuildJsonReportInput) => JsonReport; //#endregion
|
|
10242
10193
|
//#region src/build-skipped-checks.d.ts
|
|
10243
10194
|
//#endregion
|
|
10244
10195
|
//#region src/get-diff-files.d.ts
|