react-doctor 0.9.17-dev.a293fac → 0.9.17-dev.a410280
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 +19 -23
- package/dist/{build-section-divider-CT0y6IMB.js → build-section-divider-Yonj0pMy.js} +5 -5
- package/dist/{ci-CHx3f8-O.js → ci-YsEJ2u06.js} +18 -14
- package/dist/cli.js +40 -31
- package/dist/{constants-DHn5rUeg.js → constants-Bwylqy0B.js} +7 -5
- package/dist/constants-DNh19qg9.js +2 -2
- package/dist/{design-DSBqJibr.js → design-jFhu9N7l.js} +4 -4
- package/dist/{exit-gracefully-COH0fzQy.js → exit-gracefully-CL5xjYB_.js} +6 -6
- package/dist/{handle-error-CK-Rn2qI.js → handle-error-BtSNsyKl.js} +6 -6
- package/dist/index.js +8 -7
- package/dist/{inspect-CYJ-Ain7.js → inspect-DnSznnwi.js} +22 -19
- package/dist/{install-BAdoBSE4.js → install-BHIwsBgn.js} +10 -10
- package/dist/{install-doctor-script-UoalPsqX.js → install-doctor-script-BahxZ4d0.js} +10 -6
- package/dist/{install-github-workflow-B9A7f6F8.js → install-github-workflow-DymwQFYy.js} +22 -8
- package/dist/{install-react-doctor-rvf9RcUm.js → install-react-doctor-wSI6YWFC.js} +9 -9
- package/dist/{is-cache-globally-disabled-DDlh_f1u.js → is-cache-globally-disabled-BvdYcw6Q.js} +4 -4
- package/dist/{jsx-runtime-B3_8Sx_e.js → jsx-runtime-MuOtqwz-.js} +6 -6
- package/dist/{print-branded-header-DKPRLk2B.js → print-branded-header-DRA8-tG8.js} +4 -4
- package/dist/{prompt-runtime-scan-url-RlPTAQbs.js → prompt-runtime-scan-url-P40GbyHo.js} +5 -5
- package/dist/{read-object-file-DwSid8Za.js → read-object-file-DLOyJUDb.js} +4 -4
- package/dist/{record-metric-OXmjVOk-.js → record-metric-B4x7kfOe.js} +10 -9
- package/dist/{report-error-Ce54vpER.js → report-error-BUPFgW65.js} +6 -6
- package/dist/{report-workflow-result-0X2DSKUK.js → report-workflow-result-CoIMQC5t.js} +8 -7
- package/dist/{should-fail-scan-gate-C3R0sBP_.js → resolve-scan-exit-code-DvE7qZW5.js} +24 -20
- package/dist/{resolve-scope-uvvoZ2rJ.js → resolve-scope-DQ4pWaAD.js} +6 -6
- package/dist/{rules-DAIUzAV7.js → rules-BcjKxLgf.js} +7 -7
- package/dist/{run-scan-app-BKsGvK1h.js → run-scan-app-C2h1mJAT.js} +27 -19
- package/dist/{runtime-scan-Ddq5fqwW.js → runtime-scan-DcJc1QUd.js} +10 -10
- package/dist/{sanitize-runtime-url-CXZ-bsKR.js → sanitize-runtime-url-CE89ZW7y.js} +4 -4
- package/dist/{scan-Fq81Jsqg.js → scan-N-yR6Ak0.js} +14 -13
- package/dist/{should-skip-prompts-D2DD_QcJ.js → should-skip-prompts-CvM02oEy.js} +4 -4
- package/dist/{should-use-tui-DqOxRlz5.js → should-use-tui-DcMwASIM.js} +4 -4
- package/dist/skills/react-doctor/SKILL.md +4 -0
- package/dist/{start-scan-preamble-BPz3nzCQ.js → start-scan-preamble-2uz0joCl.js} +5 -5
- package/dist/start-scan-preamble.js +3 -3
- package/dist/{telemetry-runtime-C9aFhvUV.js → telemetry-runtime-DDIZ6i7o.js} +7 -7
- package/dist/{version-DFetHGw1.js → version-kEREqDuy.js} +5 -5
- package/dist/{why-BafR7LIc.js → why-BAI2mjt0.js} +4 -4
- package/dist/{with-run-span-B_44LOii.js → with-run-span-1_lbchOe.js} +6 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -51,7 +51,25 @@ React Doctor reviews every pull request and reports only the issues your change
|
|
|
51
51
|
npx react-doctor@latest ci install
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
This adds
|
|
54
|
+
This adds a workflow that scans each pull request and posts a summary comment.
|
|
55
|
+
|
|
56
|
+
Set `comment-on-clean: false` in the Action inputs to create comments only when the scan finds issues. Existing comments still update after a clean scan.
|
|
57
|
+
|
|
58
|
+
With the default `version: latest`, the Action uses an installed `react-doctor` dependency when available. Set another `version` value to override the installed version. Install your project dependencies before the Action to use this path.
|
|
59
|
+
|
|
60
|
+
For a GitLab warning status without blocking a merge, use a separate warning exit code:
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
react-doctor:
|
|
64
|
+
script:
|
|
65
|
+
- npx react-doctor@latest . --warning-exit-code 123
|
|
66
|
+
allow_failure:
|
|
67
|
+
exit_codes: 123
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
With the default `--blocking error`, errors and hard lint failures exit with `1`. Warnings exit with `123`. Clean scans exit with `0`. The warning code must be an integer from `2` to `255`. Without this option, warnings still exit with `0`.
|
|
71
|
+
|
|
72
|
+
`--blocking warning` takes priority and exits with `1` for warnings. `--blocking none` disables the warning exit code. Score-only mode and degraded baseline comparisons also skip the warning exit code. The existing warning filters and `ciFailure` surface settings still apply.
|
|
55
73
|
|
|
56
74
|
[CI docs →](https://react.doctor/ci)
|
|
57
75
|
|
|
@@ -91,28 +109,6 @@ pages. It closes blank startup tabs before tracing and closes its scan tab after
|
|
|
91
109
|
browser stays open. The trace is stored locally and is never uploaded, but it can contain page
|
|
92
110
|
URLs, source paths, and React profiling details. Treat it as sensitive application data.
|
|
93
111
|
|
|
94
|
-
## Scan scope
|
|
95
|
-
|
|
96
|
-
`--scope changed --base <ref>` reports only new findings in files touched by the diff. It scans those files at the base and in the current tree. Uncommitted changes use `HEAD` when the base is the current branch.
|
|
97
|
-
|
|
98
|
-
Findings are grouped by file path (following Git renames) and rule ID. Only the increase in each group's finding count is new: two findings at base and three now produce one new finding; two at base and two now produce none. Formatting, variable renames, edits inside flagged code, and line shifts do not create new findings when the count stays the same. Groups with no count increase need no location matching. When the count increases, exact fingerprint and message matches are paired first. Message similarity and line distance adjusted for Git diff shifts then select the most likely added findings. This is a count gate: fixing one issue and adding another under the same rule in the same file produces no increase. Current rule, severity, tag, and ignore settings apply before matching.
|
|
99
|
-
|
|
100
|
-
New files have no base findings. Add `--include-untracked` to scan untracked files too. Deleted files and removed findings are not reported. `--blocking`, the exit code, and summary counts use only the unmatched current findings. The score still describes the current scan.
|
|
101
|
-
|
|
102
|
-
Use `--scope lines` to report findings on changed lines, or `--scope files` to report all findings in changed files. The default `--scope full` scans the full project.
|
|
103
|
-
|
|
104
|
-
Save a full scan once, then reuse it as the comparison base:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
react-doctor --json --blocking none > base-report.json
|
|
108
|
-
react-doctor --baseline base-report.json --blocking warning
|
|
109
|
-
react-doctor --scope changed --baseline base-report.json --blocking warning
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
`--baseline` uses the same matching rules and skips the base scan. Use the same React Doctor version, rules, and scan options for both scans. The saved report must be a complete scan with fingerprints, not a previous comparison result. Saved reports record each project's source-dependent filter settings (`textComponents`, `rawTextWrapperComponents`, and `respectInlineDisables`). A mismatch requires a new base report with the current settings, or a Git comparison. Reports cannot recover findings that the original scan suppressed. Regenerate older reports that lack fingerprints or filter settings. Without Git, a saved report still works; rename matching requires Git history for the report's `sourceRevision`. With `--scope changed`, Git limits the scan to changed files when available; otherwise the full current tree is compared.
|
|
113
|
-
|
|
114
|
-
JSON reports keep schema version 3 and add optional diagnostic `fingerprint`, report `sourceRevision`, and per-project `sourceFilterConfigHash` fields. The `baseline` block records `source` (`"base"` or `"baseline"`), `baseRef`, `baselineFile` for saved reports, and `matchedCount`. `newCount` equals the summary finding count.
|
|
115
|
-
|
|
116
112
|
## Telemetry
|
|
117
113
|
|
|
118
114
|
The CLI reports crashes, basic run traces, and anonymous usage counters to [Sentry](https://sentry.io/) to help us fix bugs and prioritize work.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { bt as DOCS_URL, lt as CANONICAL_GITHUB_URL } from "./constants-
|
|
4
|
-
import {
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="23f40047-de56-5a31-9347-8ab20da00938")}catch(e){}}();
|
|
3
|
+
import { bt as DOCS_URL, lt as CANONICAL_GITHUB_URL } from "./constants-Bwylqy0B.js";
|
|
4
|
+
import { jt as highlighter } from "./record-metric-B4x7kfOe.js";
|
|
5
5
|
//#region src/cli/utils/resolve-measure-width.ts
|
|
6
6
|
const resolveClampedWidth = (input) => {
|
|
7
7
|
const terminalColumns = process.stdout.columns;
|
|
@@ -77,5 +77,5 @@ const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repe
|
|
|
77
77
|
//#endregion
|
|
78
78
|
export { buildFooterLinkLines as n, buildSectionDivider as t };
|
|
79
79
|
|
|
80
|
-
//# sourceMappingURL=build-section-divider-
|
|
81
|
-
//# debugId=
|
|
80
|
+
//# sourceMappingURL=build-section-divider-Yonj0pMy.js.map
|
|
81
|
+
//# debugId=23f40047-de56-5a31-9347-8ab20da00938
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3c610721-c260-5f96-9336-fef9d3bf1c25")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { kt as GITHUB_ACTIONS_SETUP_URL, u as METRIC, ut as CI_URL } from "./constants-
|
|
5
|
-
import {
|
|
6
|
-
import { o as isExpectedUserError } from "./telemetry-runtime-
|
|
7
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
8
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
9
|
-
import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
10
|
-
import { a as readReactDoctorWorkflow, d as detectDefaultBranch, f as runCommand, l as prompts, n as getReactDoctorWorkflowPath, s as upgradeWorkflowActionToV2, t as buildWorkflowContent } from "./install-github-workflow-
|
|
11
|
-
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-
|
|
12
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
13
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
4
|
+
import { kt as GITHUB_ACTIONS_SETUP_URL, u as METRIC, ut as CI_URL } from "./constants-Bwylqy0B.js";
|
|
5
|
+
import { gt as findGitRepositoryRoot, jt as highlighter, t as recordCount, wn as runSync } from "./record-metric-B4x7kfOe.js";
|
|
6
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-DDIZ6i7o.js";
|
|
7
|
+
import { n as handleUserError, t as handleError } from "./handle-error-BtSNsyKl.js";
|
|
8
|
+
import { t as reportErrorToSentry } from "./report-error-BUPFgW65.js";
|
|
9
|
+
import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-BahxZ4d0.js";
|
|
10
|
+
import { a as readReactDoctorWorkflow, d as detectDefaultBranch, f as runCommand, l as prompts, n as getReactDoctorWorkflowPath, s as upgradeWorkflowActionToV2, t as buildWorkflowContent } from "./install-github-workflow-DymwQFYy.js";
|
|
11
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-DQ4pWaAD.js";
|
|
12
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-CvM02oEy.js";
|
|
13
|
+
import { t as printBrandedHeader } from "./print-branded-header-DRA8-tG8.js";
|
|
14
14
|
import * as fs$1 from "node:fs";
|
|
15
15
|
import * as path$1 from "node:path";
|
|
16
16
|
//#region src/cli/utils/ci/ci-provider.ts
|
|
@@ -6887,7 +6887,7 @@ const containsReactDoctor$1 = (content) => {
|
|
|
6887
6887
|
}
|
|
6888
6888
|
};
|
|
6889
6889
|
const findActionWorkflowFile = (projectRoot) => {
|
|
6890
|
-
const workflowsDir = path$1.
|
|
6890
|
+
const workflowsDir = path$1.dirname(getReactDoctorWorkflowPath(projectRoot));
|
|
6891
6891
|
let entries;
|
|
6892
6892
|
try {
|
|
6893
6893
|
entries = fs$1.readdirSync(workflowsDir).sort();
|
|
@@ -6915,6 +6915,10 @@ const readWorkflow$1 = (projectRoot) => {
|
|
|
6915
6915
|
return findActionWorkflowFile(projectRoot);
|
|
6916
6916
|
};
|
|
6917
6917
|
const scaffold$1 = (projectRoot, defaultBranch, gate) => {
|
|
6918
|
+
if (findGitRepositoryRoot(projectRoot) === null) return {
|
|
6919
|
+
status: "failed",
|
|
6920
|
+
path: getReactDoctorWorkflowPath(projectRoot)
|
|
6921
|
+
};
|
|
6918
6922
|
const existing = readWorkflow$1(projectRoot);
|
|
6919
6923
|
if (existing) return {
|
|
6920
6924
|
status: "exists",
|
|
@@ -7499,5 +7503,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
|
|
|
7499
7503
|
//#endregion
|
|
7500
7504
|
export { ciConfigAction, ciInstallAction, ciUpgradeAction };
|
|
7501
7505
|
|
|
7502
|
-
//# sourceMappingURL=ci-
|
|
7503
|
-
//# debugId=
|
|
7506
|
+
//# sourceMappingURL=ci-YsEJ2u06.js.map
|
|
7507
|
+
//# debugId=3c610721-c260-5f96-9336-fef9d3bf1c25
|
package/dist/cli.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c898e592-cb2c-5d0e-9def-15ece0a49e91")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { lt as CANONICAL_GITHUB_URL, ut as CI_URL } from "./constants-
|
|
5
|
-
import "./start-scan-preamble-
|
|
6
|
-
import {
|
|
7
|
-
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-
|
|
8
|
-
import { t as exitGracefully } from "./exit-gracefully-
|
|
9
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
4
|
+
import { lt as CANONICAL_GITHUB_URL, ut as CI_URL } from "./constants-Bwylqy0B.js";
|
|
5
|
+
import "./start-scan-preamble-2uz0joCl.js";
|
|
6
|
+
import { $t as setColorEnabled, Mt as isPathInsideDirectory, S as isDebugFlagEnabled, Un as isFile, Vn as isDirectory, _ as VERSION, d as isJsonModeActive, h as writeJsonErrorReport, ht as filterSourceFiles, i as isTelemetryEnabled, jt as highlighter, y as CliInputError } from "./record-metric-B4x7kfOe.js";
|
|
7
|
+
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-DDIZ6i7o.js";
|
|
8
|
+
import { t as exitGracefully } from "./exit-gracefully-CL5xjYB_.js";
|
|
9
|
+
import { n as handleUserError, t as handleError } from "./handle-error-BtSNsyKl.js";
|
|
10
10
|
import { n as getLastRunTraceId } from "./active-run-trace-Dewycxda.js";
|
|
11
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
11
|
+
import { t as reportErrorToSentry } from "./report-error-BUPFgW65.js";
|
|
12
12
|
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
13
13
|
import { t as unrefStdin } from "./unref-stdin-D-NZBFpg.js";
|
|
14
14
|
import * as path$1 from "node:path";
|
|
@@ -3124,6 +3124,13 @@ const normalizeHelpInvocation = (argv, knownCommands) => {
|
|
|
3124
3124
|
return [...nodeArguments, "--help"];
|
|
3125
3125
|
};
|
|
3126
3126
|
//#endregion
|
|
3127
|
+
//#region src/cli/utils/parse-warning-exit-code.ts
|
|
3128
|
+
const parseWarningExitCode = (value) => {
|
|
3129
|
+
const exitCode = Number(value);
|
|
3130
|
+
if (!/^\d+$/.test(value) || !Number.isInteger(exitCode) || exitCode <= 1 || exitCode > 255) throw new InvalidArgumentError(`Expected an integer from 2 to 255.`);
|
|
3131
|
+
return exitCode;
|
|
3132
|
+
};
|
|
3133
|
+
//#endregion
|
|
3127
3134
|
//#region src/cli/utils/print-debug-trace.ts
|
|
3128
3135
|
/**
|
|
3129
3136
|
* The `--debug` end-of-run line, pure so it's testable without a live exporter.
|
|
@@ -3241,7 +3248,8 @@ const ROOT_FLAG_SPEC = {
|
|
|
3241
3248
|
"--output-dir",
|
|
3242
3249
|
"--fail-on",
|
|
3243
3250
|
"--project",
|
|
3244
|
-
"--scope"
|
|
3251
|
+
"--scope",
|
|
3252
|
+
"--warning-exit-code"
|
|
3245
3253
|
]),
|
|
3246
3254
|
longOptionsWithOptionalValues: new Set(["--diff"]),
|
|
3247
3255
|
shortOptionsWithoutValues: new Set([
|
|
@@ -3367,7 +3375,8 @@ const COMMAND_FLAG_SPECS = new Map([
|
|
|
3367
3375
|
longOptionsWithRequiredValues: new Set([
|
|
3368
3376
|
"--blocking",
|
|
3369
3377
|
"--max-duration",
|
|
3370
|
-
"--project"
|
|
3378
|
+
"--project",
|
|
3379
|
+
"--warning-exit-code"
|
|
3371
3380
|
]),
|
|
3372
3381
|
longOptionsWithOptionalValues: /* @__PURE__ */ new Set(),
|
|
3373
3382
|
shortOptionsWithoutValues: new Set(["-h", "-y"]),
|
|
@@ -3558,9 +3567,9 @@ ${highlighter.dim("Learn more:")}
|
|
|
3558
3567
|
${highlighter.info(CI_URL)}
|
|
3559
3568
|
`;
|
|
3560
3569
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
3561
|
-
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[paths...]", "one project directory or source file paths to scan").option("--lint", "enable linting").option("--no-lint", "skip linting").addOption(new Option("--dead-code").hideHelp()).addOption(new Option("--no-dead-code").hideHelp()).option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("--no-cache", "disable all scan caches for this run").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much supported JS/TS and inline HTML script source to scan/report: full (default), files, changed (only new issues vs base), or lines (issues whose source spans touch changed lines)").option("--baseline <report.json>", "report only new issues compared with a saved JSON report").option("--base <ref>", "base git ref for files/changed/lines scope (auto-detected when omitted)").option("--include-untracked", "with --scope files/changed/lines, also scan ordinary untracked files (respects .gitignore)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks (honors --project and config `projects`; exits 0 when nothing is staged)").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
|
|
3570
|
+
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[paths...]", "one project directory or source file paths to scan").option("--lint", "enable linting").option("--no-lint", "skip linting").addOption(new Option("--dead-code").hideHelp()).addOption(new Option("--no-dead-code").hideHelp()).option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("--no-cache", "disable all scan caches for this run").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much supported JS/TS and inline HTML script source to scan/report: full (default), files, changed (only new issues vs base), or lines (issues whose source spans touch changed lines)").option("--baseline <report.json>", "report only new issues compared with a saved JSON report").option("--base <ref>", "base git ref for files/changed/lines scope (auto-detected when omitted)").option("--include-untracked", "with --scope files/changed/lines, also scan ordinary untracked files (respects .gitignore)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks (honors --project and config `projects`; exits 0 when nothing is staged)").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--warning-exit-code <code>", "exit code for non-blocking warnings (2-255). Ignored with --blocking none or --score", parseWarningExitCode).addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
|
|
3562
3571
|
program.action(async (positionalPaths = [], flags) => {
|
|
3563
|
-
const { runScanCommand } = await import("./scan-
|
|
3572
|
+
const { runScanCommand } = await import("./scan-N-yR6Ak0.js");
|
|
3564
3573
|
return runScanCommand({
|
|
3565
3574
|
...resolvePositionalScanInput(positionalPaths),
|
|
3566
3575
|
flags,
|
|
@@ -3568,75 +3577,75 @@ program.action(async (positionalPaths = [], flags) => {
|
|
|
3568
3577
|
});
|
|
3569
3578
|
});
|
|
3570
3579
|
program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
|
|
3571
|
-
const { designAction } = await import("./design-
|
|
3580
|
+
const { designAction } = await import("./design-jFhu9N7l.js");
|
|
3572
3581
|
return designAction(directory ?? ".", command.optsWithGlobals());
|
|
3573
3582
|
});
|
|
3574
3583
|
program.command("scan").description("Scan a React interaction in Chrome until you press Enter").argument("[url]", "HTTP(S) URL of the running React app; detects local apps when omitted").option("-f, --format <format>", "report format: text, json, or jsonl", "text").option("--cdp <url>", "reuse Chrome at this remote-debugging endpoint").option("--trace-out <path>", "save the compressed .json.gz DevTools trace at this path").addHelpText("after", renderRuntimeScanHelpEpilog).action(async (url, options) => {
|
|
3575
|
-
const { runtimeScanAction } = await import("./runtime-scan-
|
|
3584
|
+
const { runtimeScanAction } = await import("./runtime-scan-DcJc1QUd.js");
|
|
3576
3585
|
return runtimeScanAction(url, options);
|
|
3577
3586
|
});
|
|
3578
3587
|
program.command("why <location>").description("Explain why a rule fired (or why a suppression didn't apply) at a file:line").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple)").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (location, options) => {
|
|
3579
|
-
const { whyAction } = await import("./why-
|
|
3588
|
+
const { whyAction } = await import("./why-BAI2mjt0.js");
|
|
3580
3589
|
return whyAction(location, options);
|
|
3581
3590
|
});
|
|
3582
3591
|
program.command("install").alias("setup").description("Install the react-doctor skill into your coding agents and optional git hook").option("-y, --yes", "skip prompts, install for all detected agents").option("--dry-run", "show what would be installed without writing files").option("--agent-hooks", "install end-of-turn agent hooks for Claude Code and Cursor").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderInstallHelpEpilog).action(async (options, command) => {
|
|
3583
|
-
const { installAction } = await import("./install-
|
|
3592
|
+
const { installAction } = await import("./install-BHIwsBgn.js");
|
|
3584
3593
|
return installAction(options, command);
|
|
3585
3594
|
});
|
|
3586
3595
|
const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
|
|
3587
3596
|
const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
|
|
3588
3597
|
const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
|
|
3589
3598
|
ci.command("install").description("Add a CI workflow that scans every pull request").option(...providerOption).option(...prOption).option("--blocking <level>", "gate level: none (advisory, default), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed (default), files, lines, full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; use the defaults").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderCiHelpEpilog).action(async (_options, command) => {
|
|
3590
|
-
const { ciInstallAction } = await import("./ci-
|
|
3599
|
+
const { ciInstallAction } = await import("./ci-YsEJ2u06.js");
|
|
3591
3600
|
return ciInstallAction(command.optsWithGlobals());
|
|
3592
3601
|
});
|
|
3593
3602
|
ci.command("config").description("Change the gate, scan scope, and pull-request reporting").option(...providerOption).option("--blocking <level>", "gate level: none (advisory), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed, files, lines, or full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; print the current settings").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
|
|
3594
|
-
const { ciConfigAction } = await import("./ci-
|
|
3603
|
+
const { ciConfigAction } = await import("./ci-YsEJ2u06.js");
|
|
3595
3604
|
return ciConfigAction(command.optsWithGlobals());
|
|
3596
3605
|
});
|
|
3597
3606
|
ci.command("upgrade").description("Upgrade the CI workflow to the action's current major").option(...providerOption).option(...prOption).option("-y, --yes", "skip prompts").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
|
|
3598
|
-
const { ciUpgradeAction } = await import("./ci-
|
|
3607
|
+
const { ciUpgradeAction } = await import("./ci-YsEJ2u06.js");
|
|
3599
3608
|
return ciUpgradeAction(command.optsWithGlobals());
|
|
3600
3609
|
});
|
|
3601
3610
|
program.command("version").description("show the version with Node and platform info").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async () => {
|
|
3602
|
-
const { versionAction } = await import("./version-
|
|
3611
|
+
const { versionAction } = await import("./version-kEREqDuy.js");
|
|
3603
3612
|
return versionAction();
|
|
3604
3613
|
});
|
|
3605
3614
|
const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
|
|
3606
3615
|
rules.command("list").description("List rules and the severity they run at under your config").option("--category <name>", "only show rules in a category (e.g. Performance)").option("--tag <name>", "only show rules with a tag (e.g. design, test-noise)").option("--framework <name>", "only show rules for a framework (e.g. global, nextjs)").option("--configured", "only show rules your config has changed from the default").option("--json", "output a structured JSON array").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (_options, command) => {
|
|
3607
|
-
const { rulesListAction } = await import("./rules-
|
|
3616
|
+
const { rulesListAction } = await import("./rules-BcjKxLgf.js");
|
|
3608
3617
|
return rulesListAction(command.optsWithGlobals());
|
|
3609
3618
|
});
|
|
3610
3619
|
rules.command("explain <rule>").description("Explain why a rule matters, its current severity, and how to configure it").option("--json", "output a structured JSON object").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3611
|
-
const { rulesExplainAction } = await import("./rules-
|
|
3620
|
+
const { rulesExplainAction } = await import("./rules-BcjKxLgf.js");
|
|
3612
3621
|
return rulesExplainAction(rule, command.optsWithGlobals());
|
|
3613
3622
|
});
|
|
3614
3623
|
rules.command("set <rule> <severity>").description("Set a rule's severity: off, warn, or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, severity, _options, command) => {
|
|
3615
|
-
const { rulesSetAction } = await import("./rules-
|
|
3624
|
+
const { rulesSetAction } = await import("./rules-BcjKxLgf.js");
|
|
3616
3625
|
return rulesSetAction(rule, severity, command.optsWithGlobals());
|
|
3617
3626
|
});
|
|
3618
3627
|
rules.command("enable <rule>").description("Enable a rule at its recommended severity (or pass --severity)").option("--severity <level>", "severity to enable at: warn or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3619
|
-
const { rulesEnableAction } = await import("./rules-
|
|
3628
|
+
const { rulesEnableAction } = await import("./rules-BcjKxLgf.js");
|
|
3620
3629
|
return rulesEnableAction(rule, command.optsWithGlobals());
|
|
3621
3630
|
});
|
|
3622
3631
|
rules.command("disable <rule>").description("Disable a rule so it never runs").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3623
|
-
const { rulesDisableAction } = await import("./rules-
|
|
3632
|
+
const { rulesDisableAction } = await import("./rules-BcjKxLgf.js");
|
|
3624
3633
|
return rulesDisableAction(rule, command.optsWithGlobals());
|
|
3625
3634
|
});
|
|
3626
3635
|
rules.command("category <category> <severity>").description("Set the severity for a whole category (off, warn, error)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (category, severity, _options, command) => {
|
|
3627
|
-
const { rulesCategoryAction } = await import("./rules-
|
|
3636
|
+
const { rulesCategoryAction } = await import("./rules-BcjKxLgf.js");
|
|
3628
3637
|
return rulesCategoryAction(category, severity, command.optsWithGlobals());
|
|
3629
3638
|
});
|
|
3630
3639
|
rules.command("ignore-tag <tag>").description("Skip a whole rule family by tag before linting (e.g. design)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
|
|
3631
|
-
const { rulesIgnoreTagAction } = await import("./rules-
|
|
3640
|
+
const { rulesIgnoreTagAction } = await import("./rules-BcjKxLgf.js");
|
|
3632
3641
|
return rulesIgnoreTagAction(tag, command.optsWithGlobals());
|
|
3633
3642
|
});
|
|
3634
3643
|
rules.command("unignore-tag <tag>").description("Stop ignoring a tag previously skipped via ignore-tag").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
|
|
3635
|
-
const { rulesUnignoreTagAction } = await import("./rules-
|
|
3644
|
+
const { rulesUnignoreTagAction } = await import("./rules-BcjKxLgf.js");
|
|
3636
3645
|
return rulesUnignoreTagAction(tag, command.optsWithGlobals());
|
|
3637
3646
|
});
|
|
3638
|
-
program.command("experimental-tui [directory]", { hidden: true }).description("[experimental] interactive, scrollable scan report").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addOption(new Option("--no-dead-code").hideHelp()).option("--no-supply-chain", "skip the dependency supply-chain scan").option("--score", "only print the numeric score (for scripts and CI)").option("--no-score", "skip the score API, the share URL, and crash reporting").option("--no-cache", "disable all scan caches for this run").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("-p, --project <names>", "scan specific workspace projects (comma-separated, or *)").option("-y, --yes", "skip the project prompt and scan every discovered project").action(async (directory = ".", _localOptions, command) => {
|
|
3639
|
-
const { runScanCommand } = await import("./scan-
|
|
3647
|
+
program.command("experimental-tui [directory]", { hidden: true }).description("[experimental] interactive, scrollable scan report").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--warning-exit-code <code>", "exit code for non-blocking warnings (2-255). Ignored with --blocking none or --score", parseWarningExitCode).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addOption(new Option("--no-dead-code").hideHelp()).option("--no-supply-chain", "skip the dependency supply-chain scan").option("--score", "only print the numeric score (for scripts and CI)").option("--no-score", "skip the score API, the share URL, and crash reporting").option("--no-cache", "disable all scan caches for this run").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("-p, --project <names>", "scan specific workspace projects (comma-separated, or *)").option("-y, --yes", "skip the project prompt and scan every discovered project").action(async (directory = ".", _localOptions, command) => {
|
|
3648
|
+
const { runScanCommand } = await import("./scan-N-yR6Ak0.js");
|
|
3640
3649
|
return runScanCommand({
|
|
3641
3650
|
directory,
|
|
3642
3651
|
flags: command.optsWithGlobals(),
|
|
@@ -3676,4 +3685,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
3676
3685
|
export {};
|
|
3677
3686
|
|
|
3678
3687
|
//# sourceMappingURL=cli.js.map
|
|
3679
|
-
//# debugId=
|
|
3688
|
+
//# debugId=c898e592-cb2c-5d0e-9def-15ece0a49e91
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="87693c33-5223-58a9-87d5-f3417457178f")}catch(e){}}();
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
5
5
|
import fs from "node:fs";
|
|
@@ -11,7 +11,7 @@ import os from "node:os";
|
|
|
11
11
|
import crypto from "node:crypto";
|
|
12
12
|
import { Worker } from "node:worker_threads";
|
|
13
13
|
import * as net from "node:net";
|
|
14
|
-
//#region ../core/dist/constants-
|
|
14
|
+
//#region ../core/dist/constants-D5VP3tO3.js
|
|
15
15
|
const HTML_FILE_PATTERN = /\.html$/i;
|
|
16
16
|
const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
|
|
17
17
|
const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
|
|
@@ -32,6 +32,7 @@ const IGNORED_DIRECTORIES = new Set([
|
|
|
32
32
|
".angular",
|
|
33
33
|
".astro",
|
|
34
34
|
".cache",
|
|
35
|
+
".cloudflare",
|
|
35
36
|
".contentlayer",
|
|
36
37
|
".direnv",
|
|
37
38
|
".docusaurus",
|
|
@@ -425,7 +426,7 @@ const MAINTAINABILITY_CATEGORY = "Maintainability";
|
|
|
425
426
|
//#region ../core/dist/react-compiler-detection-worker-protocol-Dp5LlrE8.js
|
|
426
427
|
const isReactCompilerDetectionReply = (value) => typeof value === "object" && value !== null && "id" in value && typeof value.id === "number" && "hasReactCompiler" in value && (typeof value.hasReactCompiler === "boolean" || value.hasReactCompiler === null);
|
|
427
428
|
//#endregion
|
|
428
|
-
//#region ../core/dist/react-compiler-detection-client-
|
|
429
|
+
//#region ../core/dist/react-compiler-detection-client-_E6Lyqbg.js
|
|
429
430
|
const pendingOutputsByRequestKey = /* @__PURE__ */ new Map();
|
|
430
431
|
const toRequestKey = (request) => [
|
|
431
432
|
request.directory,
|
|
@@ -982,6 +983,7 @@ const METRIC = {
|
|
|
982
983
|
projectPathSelected: "project.path_selected",
|
|
983
984
|
projectConfigSelected: "project.config_selected",
|
|
984
985
|
scanCompleted: "scan.completed",
|
|
986
|
+
scanWarningExitCodeConfigured: "scan.warning_exit_code.configured",
|
|
985
987
|
scanDuration: "scan.duration",
|
|
986
988
|
scanFeedbackDelay: "scan.feedback_delay",
|
|
987
989
|
scanPhaseDuration: "scan.phase_duration",
|
|
@@ -1031,5 +1033,5 @@ const METRIC = {
|
|
|
1031
1033
|
//#endregion
|
|
1032
1034
|
export { warmReactCompilerDetection as $, OXLINT_WORKER_JOB_END_MARKER as $t, buildGitSourceListingRequest as A, TARGET_BLANK_BROWSER_SUPPORT as An, GITHUB_VIEWER_PERMISSION_TIMEOUT_MS as At, resolveGitCommand as B, MAINTAINABILITY_DUPLICATE_JSX_RULE as Bt, SENTRY_RELEASE_PREFIX as C, SUPPLY_CHAIN_CACHE_TTL_MS as Cn, ES_TARGET_YEAR_BY_NAME as Ct, TUI_REPORT_COMPACT_MAX_ROWS as D, SUPPLY_CHAIN_PLUGIN as Dn, GENERATED_BUNDLE_FILE_PATTERN as Dt, TRACKED_FILE_FLAGS_GIT_ARGUMENTS as E, SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS as En, FILE_LINT_CACHE_MAX_FILE_COUNT as Et, lowerChildProcessPriority as F, VERCEL_NEXTJS_SECURITY_RELEASE_URL as Fn, HTML_FILE_PATTERN as Ft, resolvePluginPath as G, MINIFIED_SNIFF_BYTES as Gt, resolveOxlintThreadCount as H, MAINTAINABILITY_SOURCE_FILE_PATTERN as Ht, prefetchGitCommand as I, getCategoryImpact as In, IGNORED_DIRECTORIES as It, resolveTsConfigRelativePath as J, OXLINT_NODE_REQUIREMENT as Jt, resolveReactDoctorCacheDir as K, OCCURRENCE_MATCHED_CATEGORIES as Kt, prespawnOxlintWorkers as L, JSX_DUPLICATION_SOURCE_FILE_PATTERN as Lt, buildOxlintWorkerSpawnSpec as M, TELEMETRY_SHUTDOWN_TIMEOUT_MS as Mn, GIT_LS_FILES_MAX_BUFFER_BYTES as Mt, discardPrefetchedGitCommands as N, TSCONFIG_FILENAMES as Nn, GIT_SHOW_MAX_BUFFER_BYTES as Nt, TUI_REPORT_DETAIL_WIDTH_FRACTION as O, SUPPLY_CHAIN_RULE as On, GENERATED_SOURCE_DIRECTORY_PATTERN as Ot, killUnadoptedOxlintWorkers as P, TYPESCRIPT_DECLARATION_FILE_PATTERN as Pn, GIT_SOURCE_LISTING_ARGUMENTS as Pt, takeReactCompilerDetection as Q, OXLINT_SPLIT_TOTAL_BUDGET_MS as Qt, readSystemConcurrencyFacts as R, JSX_FILE_PATTERN as Rt, SENTRY_FLUSH_TIMEOUT_MS as S, SUPPLY_CHAIN_CACHE_SUBDIR as Sn, ENTERPRISE_CONTACT_URL as St, STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES as T, SUPPLY_CHAIN_IGNORED_PACKAGES as Tn, FILE_LINT_CACHE_FILENAME as Tt, resolveOxlintToolchainVersions as U, MAX_GLOB_PATTERN_LENGTH_CHARS as Ut, resolveOxlintBinary as V, MAINTAINABILITY_PLUGIN as Vt, resolveOxlintWorkerRuntime as W, MILLISECONDS_PER_SECOND as Wt, spawnOxlintWorkerProcess as X, OXLINT_OUTPUT_MAX_BYTES as Xt, setChildProcessRef as Y, OXLINT_OOM_RESCUE_BUDGET_MS as Yt, takePrespawnedOxlintWorker as Z, OXLINT_SPAWN_TIMEOUT_MS as Zt, SCAN_PREAMBLE_SKIP_FLAGS as _, SOURCE_FILE_PATTERN as _n, DIAGNOSTIC_CATEGORY_BUCKETS as _t, CACHE_DISABLED_VALUES as a, REACT_ROUTER_CAPABILITY_THRESHOLDS as an, AXIOM_METRICS_DATASET_HEADER as at, SCAN_RESULT_CACHE_MAX_HASHED_FILE_SIZE_BYTES as b, SPAWN_ARGS_MAX_LENGTH_CHARS_POSIX as bn, DOCS_URL as bt, HEAD_SHA_GIT_ARGUMENTS as c, ROOT_CAUSE_GROUPABLE_RULE_KEYS as cn, CANONICAL_DISCORD_URL as ct, METRIC_DISTRIBUTION_BOUNDARIES as d, SHARE_BASE_URL as dn, COMPILER_CLEANUP_BUCKET as dt, PROJECT_ANALYSIS_WORKER_MAX_OLD_SPACE_MB as en, ABORT_EXIT_CODES as et, MINIMUM_VTE_VERSION_FOR_HYPERLINKS as f, SIDECAR_LINT_CACHE_FILENAME as fn, COMPILER_CLEANUP_RULE_KEYS as ft, RUN_GIT_MAX_BUFFER_BYTES as g, SOCKET_PACKAGE_PAGE_BASE as gn, DEFAULT_BRANCH_CANDIDATES as gt, REPOSITORY_ROOT_GIT_ARGUMENTS as h, SOCKET_FREE_USER_AGENT as hn, CONFIG_SCHEMA_URL as ht, BASELINE_FILES_TEMP_DIR_PREFIX as i, REACT_BLOG_RSC_ADVISORY_URL as in, AXIOM_DEFAULT_DOMAIN as it, buildOxlintChildEnv as j, TELEMETRY_EXPORT_INTERVAL_MS as jn, GIT_CHECK_ATTR_MAX_BUFFER_BYTES as jt, WORKTREE_STATUS_GIT_ARGUMENTS as k, TAILWIND_POSTCSS7_COMPAT_ALIAS as kn, GITHUB_ACTIONS_SETUP_URL as kt, INTERNAL_ERROR_JSON_FALLBACK as l, SCANNED_DOT_DIRECTORIES as ln, CANONICAL_GITHUB_URL as lt, REACT_DOCTOR_CONFIG_PROJECT_NAME as m, SOCKET_FREE_PURL_API_BASE as mn, CONFIG_FINGERPRINT_FILENAMES as mt, AXIOM_METRICS_DATASET as n, PROJECT_ANALYSIS_WORKER_TIMEOUT_CEILING_MS as nn, APP_ONLY_RULE_KEYS as nt, CI_TRUST_COMPANIES as o, REACT_SERVER_DOM_PACKAGES as on, AXIOM_METRICS_PATH as ot, NANOSECONDS_PER_MILLISECOND as p, SKILL_NAME as pn, CONFIG_CACHE_TTL_MS as pt, resolveScanConcurrency as q, OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES as qt, AXIOM_TRACES_DATASET as r, PROJECT_ANALYSIS_WORKER_TIMEOUT_MS as rn, AXIOM_DATASET_HEADER as rt, GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS as s, RECOMMENDED_PNPM_MINIMUM_RELEASE_AGE_MINUTES as sn, AXIOM_TRACES_PATH as st, AXIOM_INGEST_TOKEN as t, PROJECT_ANALYSIS_WORKER_MEMORY_BUDGET_BYTES as tn, ADOPTABLE_LINT_CONFIG_FILENAMES as tt, METRIC as u, SCORE_API_URL as un, CI_URL as ut, SCAN_RESULT_CACHE_FILENAME as v, SPAWN_ARGS_MAX_LENGTH_CHARS as vn, DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS as vt, STAGED_FILES_TEMP_DIR_PREFIX as w, SUPPLY_CHAIN_CATEGORY as wn, FETCH_TIMEOUT_MS as wt, SENTRY_DSN as x, STAGED_FILES_PROJECT_CONFIG_FILENAMES as xn, DUPLICATE_JSX_WORKER_IDLE_TIMEOUT_MS as xt, SCAN_RESULT_CACHE_GIT_ARGUMENTS as y, SPAWN_ARGS_MAX_LENGTH_CHARS_DARWIN as yn, DOCS_RULES_BASE_URL as yt, resolveConfiguredScanConcurrency as z, MAINTAINABILITY_CATEGORY as zt };
|
|
1033
1035
|
|
|
1034
|
-
//# sourceMappingURL=constants-
|
|
1035
|
-
//# debugId=
|
|
1036
|
+
//# sourceMappingURL=constants-Bwylqy0B.js.map
|
|
1037
|
+
//# debugId=87693c33-5223-58a9-87d5-f3417457178f
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3b4846d0-71fc-51c9-9cd3-3fafe55e7a28")}catch(e){}}();
|
|
3
3
|
const GIT_CHECK_ATTR_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
|
|
4
4
|
const OXLINT_WORKER_JOB_END_MARKER = "__REACT_DOCTOR_OXLINT_JOB_END__";
|
|
5
5
|
const REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY = Symbol.for("react-doctor.reset-filesystem-caches");
|
|
@@ -20,4 +20,4 @@ const JSX_DUPLICATION_SOURCE_FILE_PATTERN = /\.[cm]?(?:jsx?|tsx)$/;
|
|
|
20
20
|
export { MAX_GLOB_PATTERN_LENGTH_CHARS as a, GIT_CHECK_ATTR_MAX_BUFFER_BYTES as c, JSX_DUPLICATION_SOURCE_FILE_PATTERN as i, JSX_DUPLICATION_DEFAULT_MAX_SOURCE_FILES as n, OXLINT_WORKER_JOB_END_MARKER as o, JSX_DUPLICATION_DEFAULT_MAX_SOURCE_LENGTH_CHARS as r, REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY as s, JSX_DUPLICATION_DEFAULT_MAX_JSX_NODES as t };
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=constants-DNh19qg9.js.map
|
|
23
|
-
//# debugId=
|
|
23
|
+
//# debugId=3b4846d0-71fc-51c9-9cd3-3fafe55e7a28
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { t as inspectAction } from "./inspect-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8552434b-27cc-56d5-bb97-5175b4127080")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-DnSznnwi.js";
|
|
4
4
|
//#region src/cli/commands/design.ts
|
|
5
5
|
const designAction = async (directory, flags) => inspectAction(directory, {
|
|
6
6
|
...flags,
|
|
@@ -10,5 +10,5 @@ const designAction = async (directory, flags) => inspectAction(directory, {
|
|
|
10
10
|
//#endregion
|
|
11
11
|
export { designAction };
|
|
12
12
|
|
|
13
|
-
//# sourceMappingURL=design-
|
|
14
|
-
//# debugId=
|
|
13
|
+
//# sourceMappingURL=design-jFhu9N7l.js.map
|
|
14
|
+
//# debugId=8552434b-27cc-56d5-bb97-5175b4127080
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-
|
|
4
|
-
import { n as shutdownTelemetry, r as flushSentry } from "./telemetry-runtime-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="56b75477-b28a-5b70-b867-856eb91f6191")}catch(e){}}();
|
|
3
|
+
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-B4x7kfOe.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as flushSentry } from "./telemetry-runtime-DDIZ6i7o.js";
|
|
5
5
|
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-CCTgal0O.js";
|
|
6
|
-
import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-
|
|
6
|
+
import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-Yonj0pMy.js";
|
|
7
7
|
//#region src/cli/utils/active-tui-renderer.ts
|
|
8
8
|
let activeTuiRenderer = null;
|
|
9
9
|
const registerActiveTuiRenderer = (renderer) => {
|
|
@@ -50,5 +50,5 @@ const exitGracefully = () => {
|
|
|
50
50
|
//#endregion
|
|
51
51
|
export { registerActiveTuiRenderer as n, exitGracefully as t };
|
|
52
52
|
|
|
53
|
-
//# sourceMappingURL=exit-gracefully-
|
|
54
|
-
//# debugId=
|
|
53
|
+
//# sourceMappingURL=exit-gracefully-CL5xjYB_.js.map
|
|
54
|
+
//# debugId=56b75477-b28a-5b70-b867-856eb91f6191
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { ct as CANONICAL_DISCORD_URL, lt as CANONICAL_GITHUB_URL, u as METRIC } from "./constants-
|
|
4
|
-
import {
|
|
5
|
-
import { c as isNpmCacheCorruptionError, l as formatEnvironmentError, s as formatNpmCacheCorruptionError, u as isEnvironmentError } from "./telemetry-runtime-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dd3e73d5-0a0b-5eee-b187-ebc5c6fce184")}catch(e){}}();
|
|
3
|
+
import { ct as CANONICAL_DISCORD_URL, lt as CANONICAL_GITHUB_URL, u as METRIC } from "./constants-Bwylqy0B.js";
|
|
4
|
+
import { Hn as isErrnoException, Pt as isReactDoctorError, _ as VERSION, bt as formatReactDoctorError, hn as gen, jt as highlighter, sn as error, t as recordCount, wn as runSync, yt as formatErrorChain } from "./record-metric-B4x7kfOe.js";
|
|
5
|
+
import { c as isNpmCacheCorruptionError, l as formatEnvironmentError, s as formatNpmCacheCorruptionError, u as isEnvironmentError } from "./telemetry-runtime-DDIZ6i7o.js";
|
|
6
6
|
//#region src/cli/utils/handle-error.ts
|
|
7
7
|
const OTLP_ENDPOINT_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_ENDPOINT";
|
|
8
8
|
const OTLP_AUTH_HEADER_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_AUTH_HEADER";
|
|
@@ -111,5 +111,5 @@ const handleUserError = (error$1, options = {}) => {
|
|
|
111
111
|
//#endregion
|
|
112
112
|
export { handleUserError as n, handleError as t };
|
|
113
113
|
|
|
114
|
-
//# sourceMappingURL=handle-error-
|
|
115
|
-
//# debugId=
|
|
114
|
+
//# sourceMappingURL=handle-error-BtSNsyKl.js.map
|
|
115
|
+
//# debugId=dd3e73d5-0a0b-5eee-b187-ebc5c6fce184
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9370a797-f2f1-5080-b905-34abae37c822")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as fs$1$2 from "node:fs";
|
|
@@ -26,7 +26,7 @@ import { PassThrough } from "node:stream";
|
|
|
26
26
|
import { convertToTSX } from "@astrojs/compiler/sync";
|
|
27
27
|
import { STATUS_CODES } from "node:http";
|
|
28
28
|
import { gzipSync } from "node:zlib";
|
|
29
|
-
//#region ../core/dist/constants-
|
|
29
|
+
//#region ../core/dist/constants-D5VP3tO3.js
|
|
30
30
|
const HTML_FILE_PATTERN = /\.html$/i;
|
|
31
31
|
const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
|
|
32
32
|
const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
|
|
@@ -46,6 +46,7 @@ const IGNORED_DIRECTORIES = new Set([
|
|
|
46
46
|
".angular",
|
|
47
47
|
".astro",
|
|
48
48
|
".cache",
|
|
49
|
+
".cloudflare",
|
|
49
50
|
".contentlayer",
|
|
50
51
|
".direnv",
|
|
51
52
|
".docusaurus",
|
|
@@ -438,7 +439,7 @@ const isPlainObject = (value) => {
|
|
|
438
439
|
//#region ../core/dist/react-compiler-detection-worker-protocol-Dp5LlrE8.js
|
|
439
440
|
const isReactCompilerDetectionReply = (value) => typeof value === "object" && value !== null && "id" in value && typeof value.id === "number" && "hasReactCompiler" in value && (typeof value.hasReactCompiler === "boolean" || value.hasReactCompiler === null);
|
|
440
441
|
//#endregion
|
|
441
|
-
//#region ../core/dist/react-compiler-detection-client-
|
|
442
|
+
//#region ../core/dist/react-compiler-detection-client-_E6Lyqbg.js
|
|
442
443
|
const pendingOutputsByRequestKey = /* @__PURE__ */ new Map();
|
|
443
444
|
const toRequestKey = (request) => [
|
|
444
445
|
request.directory,
|
|
@@ -2708,7 +2709,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2708
2709
|
module.exports = picomatch;
|
|
2709
2710
|
}));
|
|
2710
2711
|
//#endregion
|
|
2711
|
-
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-
|
|
2712
|
+
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-CSHedw9o.js
|
|
2712
2713
|
var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2713
2714
|
const pico = require_picomatch$1();
|
|
2714
2715
|
const utils = require_utils();
|
|
@@ -3158,7 +3159,7 @@ const collectUnpluginAutoImportGlobalScopes = ({ rootDirectory, candidateFiles }
|
|
|
3158
3159
|
return scopes.some((scope) => scope.names.length > 0) ? scopes : [];
|
|
3159
3160
|
};
|
|
3160
3161
|
//#endregion
|
|
3161
|
-
//#region ../core/dist/detect-duplicate-jsx-subtrees-
|
|
3162
|
+
//#region ../core/dist/detect-duplicate-jsx-subtrees-Df5xaEva.js
|
|
3162
3163
|
const yieldToEventLoop = () => new Promise((resolve) => {
|
|
3163
3164
|
setImmediate(resolve);
|
|
3164
3165
|
});
|
|
@@ -3715,7 +3716,7 @@ const detectDuplicateJsxSubtreesCooperative = async (sourceReader, options = {})
|
|
|
3715
3716
|
});
|
|
3716
3717
|
};
|
|
3717
3718
|
//#endregion
|
|
3718
|
-
//#region ../core/dist/detect-react-compiler-
|
|
3719
|
+
//#region ../core/dist/detect-react-compiler-CP4BcCz0.js
|
|
3719
3720
|
const NEXT_CONFIG_FILENAMES = [
|
|
3720
3721
|
"next.config.js",
|
|
3721
3722
|
"next.config.mjs",
|
|
@@ -79314,4 +79315,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
79314
79315
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
79315
79316
|
|
|
79316
79317
|
//# sourceMappingURL=index.js.map
|
|
79317
|
-
//# debugId=
|
|
79318
|
+
//# debugId=9370a797-f2f1-5080-b905-34abae37c822
|