react-doctor 0.9.12-dev.a2b460d → 0.9.12-dev.bd08406
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 +28 -1
- package/bin/react-doctor.js +1 -9
- package/dist/active-run-trace-dlIZeEvb.js +18 -0
- package/dist/active-scan-abort-registry-DwG6tSPy.js +28 -0
- package/dist/{build-section-divider-Vz879zXD.js → build-section-divider-DjX3mmIx.js} +10 -25
- package/dist/{ci-BVYrYekU.js → ci-D0OU7_5i.js} +13 -12
- package/dist/cli.js +82 -31
- package/dist/{design-D-TYN_tr.js → design-D-9YrV4y.js} +4 -4
- package/dist/{devtools-DPRVRu3S.js → devtools-BiC-AP3B.js} +4 -4
- package/dist/{exit-gracefully-Cjv5kC_l.js → exit-gracefully-DuS_nzeq.js} +15 -9
- package/dist/get-east-asian-width-Cglw13G7.js +444 -0
- package/dist/{report-error-1l7v6_dE.js → handle-error-BzC_gVSx.js} +6 -61
- package/dist/index.d.ts +53 -42
- package/dist/index.js +54808 -54552
- package/dist/{inspect-kkvDHKDE.js → inspect-NIjyNi5S.js} +22 -20
- package/dist/{install-ZeYvD9Rw.js → install-BcGDtIYv.js} +9 -8
- package/dist/{install-doctor-script-D58Hr1dM.js → install-doctor-script-W-u3DPjZ.js} +6 -441
- package/dist/{install-github-workflow-DkMicv8E.js → install-github-workflow-DqodeftR.js} +6 -6
- package/dist/{install-react-doctor-CjgE52al.js → install-react-doctor-C3r0K9JP.js} +47 -45
- package/dist/{run-scan-app-Ciq22jzp.js → jsx-runtime-BXnpEdz3.js} +281 -2759
- package/dist/{print-branded-header-D4QYSu-h.js → print-branded-header-eiCaprox.js} +4 -4
- package/dist/project-analysis-worker.d.ts +1 -0
- package/dist/project-analysis-worker.js +51900 -0
- package/dist/prompt-runtime-scan-url-CAZLxZl0.js +240 -0
- package/dist/{read-object-file-OFRlvCAL.js → read-object-file-D4DobruV.js} +4 -4
- package/dist/{record-metric-CMe2d1Xv.js → record-metric-CECbS8Qh.js} +2726 -5663
- package/dist/report-error-Ckftf8UM.js +64 -0
- package/dist/{report-workflow-result-EagkH_v9.js → report-workflow-result-MtfAsorD.js} +5 -5
- package/dist/{resolve-scope-CMNrOdDf.js → resolve-scope-IDn0nWJF.js} +6 -6
- package/dist/{rules-CzR1qUru.js → rules-6hA6QP9L.js} +6 -6
- package/dist/run-scan-app-DNHg67cm.js +2508 -0
- package/dist/runtime-scan/browser-probe.iife.js +855 -0
- package/dist/runtime-scan-Dqqn1kW3.js +770 -0
- package/dist/sanitize-runtime-url-DhYx4VYy.js +76 -0
- package/dist/{scan-D4m5r4Rs.js → scan-DtjqkKaM.js} +10 -22
- package/dist/semver-DFtnEmN-.js +3219 -0
- package/dist/{should-fail-scan-gate-lMTlhEhE.js → should-fail-scan-gate-CXE70SlM.js} +153 -184
- package/dist/{should-skip-prompts-mXKZBNCz.js → should-skip-prompts-DwpFmYZZ.js} +4 -4
- package/dist/should-use-tui-Cze9CmaN.js +25 -0
- package/dist/skills/improve-threejs/SKILL.md +102 -0
- package/dist/skills/performance/SKILL.md +113 -0
- package/dist/skills/react-doctor/SKILL.md +6 -0
- package/dist/{unref-stdin-Cxhw67r6.js → telemetry-runtime-DVy10F6G.js} +7 -31
- package/dist/unref-stdin-BKT_s38a.js +12 -0
- package/dist/{version-CnvVY2VD.js → version-Cr0PARuU.js} +4 -4
- package/dist/{why-BktDEhhH.js → why-DnrSKh_M.js} +4 -4
- package/dist/with-run-span-BsK0r1ay.js +110 -0
- package/package.json +7 -9
- package/dist/chunk-q7NCDQ7-.js +0 -28
- package/dist/lsp.js +0 -81145
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FrameworkToken } from "oxlint-plugin-react-doctor/core";
|
|
2
1
|
import fs from "node:fs";
|
|
2
|
+
import { FrameworkToken } from "oxlint-plugin-react-doctor/core";
|
|
3
3
|
|
|
4
4
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Types.d.ts
|
|
5
5
|
/**
|
|
@@ -9636,10 +9636,9 @@ interface Diagnostic {
|
|
|
9636
9636
|
column: number;
|
|
9637
9637
|
/**
|
|
9638
9638
|
* UTF-8 byte offset of the diagnostic's primary span start, straight
|
|
9639
|
-
* from oxlint's label span. Optional because environment /
|
|
9640
|
-
* diagnostics carry no source span.
|
|
9641
|
-
* precise range
|
|
9642
|
-
* ignore it.
|
|
9639
|
+
* from oxlint's label span. Optional because environment / maintainability
|
|
9640
|
+
* diagnostics carry no source span. Consumers can use it to recover a
|
|
9641
|
+
* precise range or ignore it.
|
|
9643
9642
|
*/
|
|
9644
9643
|
offset?: number;
|
|
9645
9644
|
/** UTF-8 byte length of the primary span (pairs with `offset`). */
|
|
@@ -9697,8 +9696,8 @@ type BlockingLevel = "error" | "warning" | "none";
|
|
|
9697
9696
|
* CLI `--scope` flag, the GitHub Action `scope` input, and this config field
|
|
9698
9697
|
* all share. Ordered widest to narrowest:
|
|
9699
9698
|
*
|
|
9700
|
-
* - `"full"` — whole project, every issue (the default).
|
|
9701
|
-
*
|
|
9699
|
+
* - `"full"` — whole project, every issue (the default). Environment and
|
|
9700
|
+
* supply-chain checks run only at this scope.
|
|
9702
9701
|
* - `"files"` — only the files changed vs the base, with ALL issues in them
|
|
9703
9702
|
* (no compare-to-main). What `--staged` and an uncommitted `--diff` do today.
|
|
9704
9703
|
* - `"changed"` — only issues the change INTRODUCED vs the base (the baseline
|
|
@@ -9836,8 +9835,7 @@ interface SupplyChainConfig {
|
|
|
9836
9835
|
/**
|
|
9837
9836
|
* Whether to run the Socket supply-chain score check. Default: `true`.
|
|
9838
9837
|
* Set to `false` to opt out — the check performs one network request per
|
|
9839
|
-
* direct dependency. It is always skipped in `--diff` / `--staged` mode
|
|
9840
|
-
* and in editor scans regardless of this setting.
|
|
9838
|
+
* direct dependency. It is always skipped in `--diff` / `--staged` mode.
|
|
9841
9839
|
*/
|
|
9842
9840
|
enabled?: boolean;
|
|
9843
9841
|
/**
|
|
@@ -9871,11 +9869,8 @@ interface ReactDoctorConfig {
|
|
|
9871
9869
|
*/
|
|
9872
9870
|
supplyChain?: SupplyChainConfig;
|
|
9873
9871
|
/**
|
|
9874
|
-
*
|
|
9875
|
-
*
|
|
9876
|
-
* circular imports under the "Maintainability" category. Default: `true`.
|
|
9877
|
-
* Always skipped in `--diff` / `--staged` modes because reachability
|
|
9878
|
-
* is a whole-project property.
|
|
9872
|
+
* Compatibility switch for React maintainability analysis. Default: `true`.
|
|
9873
|
+
* @deprecated React maintainability checks are part of React Doctor.
|
|
9879
9874
|
*/
|
|
9880
9875
|
deadCode?: boolean;
|
|
9881
9876
|
verbose?: boolean;
|
|
@@ -10195,6 +10190,28 @@ interface ProjectInfo {
|
|
|
10195
10190
|
remotionVersion?: string | null;
|
|
10196
10191
|
remotionMajorVersion?: number | null;
|
|
10197
10192
|
hasI18nLibrary?: boolean;
|
|
10193
|
+
/**
|
|
10194
|
+
* `true` when the project (or a workspace package) declares the unified
|
|
10195
|
+
* `radix-ui` package or any `@radix-ui/react-*` primitive (icons excluded).
|
|
10196
|
+
* Drives the `radix-ui` capability, which gates the `radix-*` composition
|
|
10197
|
+
* rules for apps that assemble Radix parts directly.
|
|
10198
|
+
*/
|
|
10199
|
+
hasRadixUi?: boolean;
|
|
10200
|
+
/**
|
|
10201
|
+
* `true` when the project (or a workspace package) declares Base UI
|
|
10202
|
+
* (`@base-ui-components/react` or its 1.0 rename `@base-ui/react`).
|
|
10203
|
+
* Drives the `base-ui` capability, which gates the `base-ui-*`
|
|
10204
|
+
* composition rules.
|
|
10205
|
+
*/
|
|
10206
|
+
hasBaseUi?: boolean;
|
|
10207
|
+
/** `true` when `react-aria-components` is declared. Drives the `react-aria` capability. */
|
|
10208
|
+
hasReactAriaComponents?: boolean;
|
|
10209
|
+
/** `true` when `@tanstack/react-table` is declared. Drives the `tanstack-table` capability. */
|
|
10210
|
+
hasTanstackTable?: boolean;
|
|
10211
|
+
/** `true` when `@tanstack/react-virtual` is declared. Drives the `tanstack-virtual` capability. */
|
|
10212
|
+
hasTanstackVirtual?: boolean;
|
|
10213
|
+
/** `true` when `@tanstack/react-form` is declared. Drives the `tanstack-form` capability. */
|
|
10214
|
+
hasTanstackForm?: boolean;
|
|
10198
10215
|
tanstackQueryVersion?: string | null;
|
|
10199
10216
|
styledComponentsVersion?: string | null;
|
|
10200
10217
|
/** Whether the project or one of its workspaces declares Three.js, Fiber, or Drei. */
|
|
@@ -10294,6 +10311,16 @@ interface ProjectInfo {
|
|
|
10294
10311
|
* recommend them to projects pinned below that.
|
|
10295
10312
|
*/
|
|
10296
10313
|
reanimatedVersion: string | null;
|
|
10314
|
+
/**
|
|
10315
|
+
* `true` when the project (or an ancestor up to the repository boundary)
|
|
10316
|
+
* carries a shadcn `components.json` config. Drives the `shadcn`
|
|
10317
|
+
* capability, which gates the `shadcn-*` component-composition rules —
|
|
10318
|
+
* their part names (`DialogTitle`, `InputGroupInput`, `TabsList`, …) only
|
|
10319
|
+
* carry shadcn's contract in a project that actually generated those
|
|
10320
|
+
* files. Optional so existing `ProjectInfo` consumers remain
|
|
10321
|
+
* source-compatible.
|
|
10322
|
+
*/
|
|
10323
|
+
hasShadcnUi?: boolean;
|
|
10297
10324
|
/**
|
|
10298
10325
|
* `true` when the project's `tsconfig.json` `compilerOptions.target` or
|
|
10299
10326
|
* `compilerOptions.lib` indicates the output environment predates ES2023
|
|
@@ -10332,7 +10359,7 @@ interface ScoreResult {
|
|
|
10332
10359
|
//#region src/types/diagnose.d.ts
|
|
10333
10360
|
interface DiagnoseOptions {
|
|
10334
10361
|
lint?: boolean;
|
|
10335
|
-
/**
|
|
10362
|
+
/** @deprecated Compatibility alias for React maintainability analysis. */
|
|
10336
10363
|
deadCode?: boolean;
|
|
10337
10364
|
verbose?: boolean;
|
|
10338
10365
|
/** Restrict linting to supported JS/TS files and inline scripts in HTML files. */
|
|
@@ -10352,11 +10379,7 @@ interface DiagnoseOptions {
|
|
|
10352
10379
|
interface DiagnoseResult {
|
|
10353
10380
|
diagnostics: Diagnostic[];
|
|
10354
10381
|
score: ScoreResult | null;
|
|
10355
|
-
/**
|
|
10356
|
-
* Checks that did not run to completion (e.g. `"dead-code"` when the
|
|
10357
|
-
* `deslop-js` native binding crashed). Empty when everything ran.
|
|
10358
|
-
* Mirrors `InspectResult.skippedChecks`.
|
|
10359
|
-
*/
|
|
10382
|
+
/** Checks that did not run to completion. Mirrors `InspectResult.skippedChecks`. */
|
|
10360
10383
|
skippedChecks: string[];
|
|
10361
10384
|
/** See `InspectResult.skippedCheckReasons`. */
|
|
10362
10385
|
skippedCheckReasons?: Record<string, string>;
|
|
@@ -10380,7 +10403,7 @@ interface DiagnoseResult {
|
|
|
10380
10403
|
}
|
|
10381
10404
|
/**
|
|
10382
10405
|
* A single project to scan as part of a `diagnose({ projects })` batch.
|
|
10383
|
-
* Scan options (`
|
|
10406
|
+
* Scan options (`lint`, etc.) are flat on the entry and
|
|
10384
10407
|
* layer on top of the global defaults — omitted fields fall through.
|
|
10385
10408
|
*/
|
|
10386
10409
|
interface ProjectDefinition extends DiagnoseOptions {
|
|
@@ -10497,23 +10520,11 @@ interface InspectResult {
|
|
|
10497
10520
|
*/
|
|
10498
10521
|
lintSidecarReplayedFileCount?: number | null;
|
|
10499
10522
|
lintSidecarTotalFileCount?: number | null;
|
|
10500
|
-
/**
|
|
10501
|
-
* Dead-code result cache outcome: `true` when the pass replayed a cached
|
|
10502
|
-
* result (the analysis never ran), `false` on a fresh analysis. Absent when
|
|
10503
|
-
* the pass never consulted the cache — dead-code skipped, the cache
|
|
10504
|
-
* disabled, or a whole-repo cache replay where no analysis ran. The CLI
|
|
10505
|
-
* projects it onto the Sentry wide event as `deadCode.cacheHit`.
|
|
10506
|
-
*/
|
|
10523
|
+
/** @deprecated Retained for report compatibility. */
|
|
10507
10524
|
deadCodeCacheHit?: boolean | null;
|
|
10508
|
-
/**
|
|
10509
|
-
* deslop's incremental summary-cache outcome for the dead-code analysis:
|
|
10510
|
-
* collected files served from cached parse summaries vs freshly parsed.
|
|
10511
|
-
* Both absent whenever no analysis consulted the incremental store — a
|
|
10512
|
-
* whole-result cache hit, the cache disabled, or dead-code skipped. The CLI
|
|
10513
|
-
* projects them onto the Sentry wide event as `deadCode.summaryCacheHits` /
|
|
10514
|
-
* `deadCode.summaryCacheMisses`.
|
|
10515
|
-
*/
|
|
10525
|
+
/** @deprecated Retained for report compatibility. */
|
|
10516
10526
|
deadCodeSummaryCacheHits?: number | null;
|
|
10527
|
+
/** @deprecated Retained for report compatibility. */
|
|
10517
10528
|
deadCodeSummaryCacheMisses?: number | null;
|
|
10518
10529
|
/**
|
|
10519
10530
|
* Present only for a baseline run (`InspectOptions.baseline` set). The
|
|
@@ -10531,7 +10542,7 @@ interface InspectResult {
|
|
|
10531
10542
|
* Options accepted by `inspect()`. Mixes two concern groups; ordered
|
|
10532
10543
|
* here in the source to make the split visible to future readers:
|
|
10533
10544
|
*
|
|
10534
|
-
* - **Engine inputs** (`lint`, `
|
|
10545
|
+
* - **Engine inputs** (`lint`, `includePaths`,
|
|
10535
10546
|
* `configOverride`, `respectInlineDisables`) — flow into
|
|
10536
10547
|
* `runInspect`'s `InspectInput` and shape what the engine
|
|
10537
10548
|
* actually does.
|
|
@@ -10738,8 +10749,8 @@ type JsonReport = JsonReportV1$1 | JsonReportV2$1 | JsonReportV3$1; //#endregion
|
|
|
10738
10749
|
* Distinguishes the two situations that both surface as "no project here", so
|
|
10739
10750
|
* the rendered message matches reality:
|
|
10740
10751
|
*
|
|
10741
|
-
* - `no-project` (default): the path exists but has no
|
|
10742
|
-
* `package.json` at the root and no discoverable nested React subproject.
|
|
10752
|
+
* - `no-project` (default): the path exists but has no supported project — no
|
|
10753
|
+
* `package.json` at the root and no discoverable nested React or Three.js subproject.
|
|
10743
10754
|
* - `missing-path`: the resolved scan target does not exist on disk at all
|
|
10744
10755
|
* (a typo, a stale temp path, a monorepo subdir that isn't present). The
|
|
10745
10756
|
* generic "expected a package.json" guidance is misleading here, so point
|
|
@@ -10844,10 +10855,10 @@ declare const ProjectDiscoveryFailed_base: Class<ProjectDiscoveryFailed, TaggedS
|
|
|
10844
10855
|
declare class ProjectDiscoveryFailed extends ProjectDiscoveryFailed_base {
|
|
10845
10856
|
get message(): string;
|
|
10846
10857
|
}
|
|
10847
|
-
declare const
|
|
10858
|
+
declare const MaintainabilityAnalysisFailed_base: Class<MaintainabilityAnalysisFailed, TaggedStruct<"MaintainabilityAnalysisFailed", {
|
|
10848
10859
|
readonly cause: Unknown;
|
|
10849
10860
|
}>, YieldableError>;
|
|
10850
|
-
declare class
|
|
10861
|
+
declare class MaintainabilityAnalysisFailed extends MaintainabilityAnalysisFailed_base {
|
|
10851
10862
|
get message(): string;
|
|
10852
10863
|
}
|
|
10853
10864
|
declare const GitInvocationFailed_base: Class<GitInvocationFailed, TaggedStruct<"GitInvocationFailed", {
|
|
@@ -10871,7 +10882,7 @@ declare class GitBaseBranchInvalid extends GitBaseBranchInvalid_base {
|
|
|
10871
10882
|
get message(): string;
|
|
10872
10883
|
}
|
|
10873
10884
|
declare const ReactDoctorError_base: Class<ReactDoctorError, TaggedStruct<"ReactDoctorError", {
|
|
10874
|
-
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
|
|
10885
|
+
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 MaintainabilityAnalysisFailed, typeof GitInvocationFailed, typeof GitBaseBranchMissing, typeof GitBaseBranchInvalid]>;
|
|
10875
10886
|
}>, YieldableError>;
|
|
10876
10887
|
declare class ReactDoctorError extends ReactDoctorError_base {
|
|
10877
10888
|
get message(): string;
|