react-doctor 0.6.3 → 0.7.0-dev.6b21b70
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 +1049 -289
- package/dist/index.d.ts +66 -1
- package/dist/index.js +672 -82
- package/dist/lsp.js +671 -86
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -9644,6 +9644,17 @@ interface DiagnoseResult {
|
|
|
9644
9644
|
/** See `InspectResult.skippedCheckReasons`. */
|
|
9645
9645
|
skippedCheckReasons?: Record<string, string>;
|
|
9646
9646
|
project: ProjectInfo;
|
|
9647
|
+
/**
|
|
9648
|
+
* Whether the scanned project resolved a React-compatible runtime (React
|
|
9649
|
+
* or Preact). `false` means every React-runtime rule family was gated
|
|
9650
|
+
* off, so an empty `diagnostics` array is vacuous — NOT the same as a
|
|
9651
|
+
* clean React scan. Consumers gating on the result should treat
|
|
9652
|
+
* `reactDetected === false` as "wrong scan target", not "all clear".
|
|
9653
|
+
* Mirrors `JsonReport.reactDetected`; same predicate as
|
|
9654
|
+
* `hasReactRuntime(result.project)`. Always set by `diagnose()`;
|
|
9655
|
+
* optional so hand-constructed results keep compiling.
|
|
9656
|
+
*/
|
|
9657
|
+
reactDetected?: boolean;
|
|
9647
9658
|
elapsedMilliseconds: number;
|
|
9648
9659
|
}
|
|
9649
9660
|
/**
|
|
@@ -9693,6 +9704,13 @@ interface DiagnoseProjectsResult {
|
|
|
9693
9704
|
projects: ProjectResult[];
|
|
9694
9705
|
diagnostics: Diagnostic[];
|
|
9695
9706
|
score: ScoreResult | null;
|
|
9707
|
+
/**
|
|
9708
|
+
* Whether any successfully scanned project resolved a React-compatible
|
|
9709
|
+
* runtime (React or Preact). Absent when no project scanned successfully.
|
|
9710
|
+
* See `DiagnoseResult.reactDetected` for gating guidance; per-project
|
|
9711
|
+
* detail is on each `ProjectResultOk.reactDetected`.
|
|
9712
|
+
*/
|
|
9713
|
+
reactDetected?: boolean;
|
|
9696
9714
|
elapsedMilliseconds: number;
|
|
9697
9715
|
} //#endregion
|
|
9698
9716
|
//#region src/types/handle-error.d.ts
|
|
@@ -9743,6 +9761,32 @@ interface InspectResult {
|
|
|
9743
9761
|
*/
|
|
9744
9762
|
lintCacheHitFileCount?: number | null;
|
|
9745
9763
|
lintCacheTotalFileCount?: number | null;
|
|
9764
|
+
/**
|
|
9765
|
+
* Sidecar lint cache outcome: cache-hit files whose cross-file diagnostics
|
|
9766
|
+
* replayed from the sidecar store, and the hits considered. Both absent
|
|
9767
|
+
* when the sidecar cache was off or bypassed. The CLI projects these onto
|
|
9768
|
+
* the Sentry wide event as `lint.sidecarReplayRatio`.
|
|
9769
|
+
*/
|
|
9770
|
+
lintSidecarReplayedFileCount?: number | null;
|
|
9771
|
+
lintSidecarTotalFileCount?: number | null;
|
|
9772
|
+
/**
|
|
9773
|
+
* Dead-code result cache outcome: `true` when the pass replayed a cached
|
|
9774
|
+
* result (the analysis never ran), `false` on a fresh analysis. Absent when
|
|
9775
|
+
* the pass never consulted the cache — dead-code skipped, the cache
|
|
9776
|
+
* disabled, or a whole-repo cache replay where no analysis ran. The CLI
|
|
9777
|
+
* projects it onto the Sentry wide event as `deadCode.cacheHit`.
|
|
9778
|
+
*/
|
|
9779
|
+
deadCodeCacheHit?: boolean | null;
|
|
9780
|
+
/**
|
|
9781
|
+
* deslop's incremental summary-cache outcome for the dead-code analysis:
|
|
9782
|
+
* collected files served from cached parse summaries vs freshly parsed.
|
|
9783
|
+
* Both absent whenever no analysis consulted the incremental store — a
|
|
9784
|
+
* whole-result cache hit, the cache disabled, or dead-code skipped. The CLI
|
|
9785
|
+
* projects them onto the Sentry wide event as `deadCode.summaryCacheHits` /
|
|
9786
|
+
* `deadCode.summaryCacheMisses`.
|
|
9787
|
+
*/
|
|
9788
|
+
deadCodeSummaryCacheHits?: number | null;
|
|
9789
|
+
deadCodeSummaryCacheMisses?: number | null;
|
|
9746
9790
|
/**
|
|
9747
9791
|
* Present only for a baseline run (`InspectOptions.baseline` set). The
|
|
9748
9792
|
* `diagnostics` above are then the *introduced* findings only; this
|
|
@@ -9862,6 +9906,17 @@ interface JsonReportV1$1 {
|
|
|
9862
9906
|
ok: boolean;
|
|
9863
9907
|
directory: string;
|
|
9864
9908
|
mode: JsonReportMode;
|
|
9909
|
+
/**
|
|
9910
|
+
* Whether any scanned project resolved a React-compatible runtime (React
|
|
9911
|
+
* or Preact). `false` means every React-runtime rule family was gated off,
|
|
9912
|
+
* so an empty `diagnostics` array is vacuous — NOT the same as a clean
|
|
9913
|
+
* React scan. Consumers gating on the report (CI, verifiers, hooks) should
|
|
9914
|
+
* treat `reactDetected === false` as "wrong scan target", not "all clear"
|
|
9915
|
+
* (per project, `projects[].project.reactVersion` / `preactVersion` say
|
|
9916
|
+
* which roots were non-React). Absent when nothing was scanned (`projects`
|
|
9917
|
+
* is empty), on error reports, and on reports from older CLI versions.
|
|
9918
|
+
*/
|
|
9919
|
+
reactDetected?: boolean;
|
|
9865
9920
|
diff: JsonReportDiffInfo | null;
|
|
9866
9921
|
projects: JsonReportProjectEntry[];
|
|
9867
9922
|
/**
|
|
@@ -10146,6 +10201,16 @@ declare const summarizeDiagnostics: (diagnostics: Diagnostic[], worstScore?: num
|
|
|
10146
10201
|
declare const defineConfig: (config: ReactDoctorConfig) => ReactDoctorConfig; //#endregion
|
|
10147
10202
|
//#region src/utils/detect-ai-training-environment.d.ts
|
|
10148
10203
|
//#endregion
|
|
10204
|
+
//#region src/utils/has-react-runtime.d.ts
|
|
10205
|
+
/**
|
|
10206
|
+
* Whether project discovery resolved a React-compatible runtime (React or
|
|
10207
|
+
* Preact, which ships the same hooks + JSX model). This is the same
|
|
10208
|
+
* predicate that grants the `react` capability, so `false` means every
|
|
10209
|
+
* React-runtime rule family was gated off for the project.
|
|
10210
|
+
*/
|
|
10211
|
+
declare const hasReactRuntime: (project: ProjectInfo) => boolean; //#endregion
|
|
10212
|
+
//#region src/utils/is-errno-exception.d.ts
|
|
10213
|
+
//#endregion
|
|
10149
10214
|
//#region ../api/dist/index.d.ts
|
|
10150
10215
|
//#region src/diagnose.d.ts
|
|
10151
10216
|
interface Diagnose {
|
|
@@ -10172,5 +10237,5 @@ interface ToJsonReportOptions {
|
|
|
10172
10237
|
}
|
|
10173
10238
|
declare const toJsonReport: (result: DiagnoseResult, options: ToJsonReportOptions) => JsonReport;
|
|
10174
10239
|
//#endregion
|
|
10175
|
-
export { AmbiguousProjectError, type DiagnoseOptions, type DiagnoseProjectsInput, type DiagnoseProjectsResult, type DiagnoseResult, type Diagnostic, type DiffInfo, type JsonReport, type JsonReportDiffInfo, type JsonReportError, type JsonReportMode, type JsonReportProjectEntry, type JsonReportSummary, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, type ProjectDefinition, type ProjectInfo, ProjectNotFoundError, type ProjectResult, type ProjectResultError, type ProjectResultOk, type ReactDoctorConfig, ReactDoctorError, type ScoreResult, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
10240
|
+
export { AmbiguousProjectError, type DiagnoseOptions, type DiagnoseProjectsInput, type DiagnoseProjectsResult, type DiagnoseResult, type Diagnostic, type DiffInfo, type JsonReport, type JsonReportDiffInfo, type JsonReportError, type JsonReportMode, type JsonReportProjectEntry, type JsonReportSummary, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, type ProjectDefinition, type ProjectInfo, ProjectNotFoundError, type ProjectResult, type ProjectResultError, type ProjectResultOk, type ReactDoctorConfig, ReactDoctorError, type ScoreResult, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
10176
10241
|
//# sourceMappingURL=index.d.ts.map
|