react-doctor 0.9.12-dev.557145 → 0.9.12-dev.6adf55e
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/{build-section-divider-03Wz07A3.js → build-section-divider-vpun8x_J.js} +7 -7
- package/dist/{ci-BJISp0Lg.js → ci-B1PqBCzE.js} +12 -12
- package/dist/cli.js +24 -24
- package/dist/{design-C85Z6wgY.js → design-BXB-ZPFf.js} +4 -4
- package/dist/{exit-gracefully-BtYRR9PK.js → exit-gracefully-FqWBnSfm.js} +6 -6
- package/dist/{handle-error-CHEoVuek.js → handle-error-Yaoez-RH.js} +5 -5
- package/dist/index.js +75 -74
- package/dist/{inspect-vOtCicMw.js → inspect-09aTvLGt.js} +16 -16
- package/dist/{install-doctor-script-BcPdnCoo.js → install-doctor-script-M8suVmTf.js} +4 -4
- package/dist/{install-github-workflow-B8pUhQ3R.js → install-github-workflow-CNBnhu3z.js} +9 -5
- package/dist/{install-react-doctor-Dtcyy__y.js → install-react-doctor-BnWcj7RF.js} +8 -8
- package/dist/{install-DGW5St2C.js → install-vGLT3klU.js} +9 -9
- package/dist/{jsx-runtime-BdJ4Qkgp.js → jsx-runtime-C7x7WZOU.js} +5 -5
- package/dist/{print-branded-header-DcnApzbb.js → print-branded-header-CLGkstCH.js} +4 -4
- package/dist/{prompt-runtime-scan-url-DO5LWX8q.js → prompt-runtime-scan-url-H6u4w_hv.js} +5 -5
- package/dist/{read-object-file-nByxIxZd.js → read-object-file-bC4NjM3m.js} +4 -4
- package/dist/{record-metric-Bkub8U7Q.js → record-metric-BmOG6HVR.js} +77 -76
- package/dist/{report-error-DuEpff_7.js → report-error-DuiY23eQ.js} +5 -5
- package/dist/{report-workflow-result--V0KVZGX.js → report-workflow-result-CmOfCx0C.js} +5 -5
- package/dist/{resolve-scope-ajqqgMdS.js → resolve-scope-_nyipRUA.js} +6 -6
- package/dist/{rules-B3Jk5BS6.js → rules-DNARNX5I.js} +6 -6
- package/dist/{run-scan-app-D7yKEvMi.js → run-scan-app-CMVyyECX.js} +10 -10
- package/dist/{runtime-scan-CN_fvs6q.js → runtime-scan-iXdCmsiz.js} +9 -9
- package/dist/{sanitize-runtime-url-CkCpxd4T.js → sanitize-runtime-url-BGkPBxx3.js} +4 -4
- package/dist/{scan-B2ijGQAP.js → scan-CAKu_nEz.js} +9 -9
- package/dist/{should-fail-scan-gate-3inPx0Rt.js → should-fail-scan-gate-Cj5xP9sP.js} +11 -11
- package/dist/{should-skip-prompts-BmKdNS3r.js → should-skip-prompts-DoakhC6R.js} +4 -4
- package/dist/{should-use-tui-LbXua39D.js → should-use-tui-CLydGlyR.js} +4 -4
- package/dist/{telemetry-runtime-pRbw2p6F.js → telemetry-runtime-BjUcF9hs.js} +4 -4
- package/dist/{version-BWpE-HbU.js → version-DGDf-d6A.js} +4 -4
- package/dist/{why-CyItx1Pg.js → why-C7Zo-CEY.js} +4 -4
- package/dist/{with-run-span-mTMAyfjb.js → with-run-span-BvRZ9PDW.js} +5 -5
- package/package.json +4 -4
|
@@ -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 { Kt as highlighter, N as SENTRY_FLUSH_TIMEOUT_MS, a as isEnvFlagEnabled, er as CANONICAL_GITHUB_URL, ft as anonymizeInPlace, hn as scrubSensitivePaths, i as isTelemetryEnabled, o as buildSentryScope, or as DOCS_URL, pt as anonymizeText } from "./record-metric-
|
|
4
|
-
import { r as isExpectedUserError } 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]="7d232a10-5aec-51c5-b27f-edb3bb27576d")}catch(e){}}();
|
|
3
|
+
import { Kt as highlighter, N as SENTRY_FLUSH_TIMEOUT_MS, a as isEnvFlagEnabled, er as CANONICAL_GITHUB_URL, ft as anonymizeInPlace, hn as scrubSensitivePaths, i as isTelemetryEnabled, o as buildSentryScope, or as DOCS_URL, pt as anonymizeText } from "./record-metric-BmOG6HVR.js";
|
|
4
|
+
import { r as isExpectedUserError } from "./telemetry-runtime-BjUcF9hs.js";
|
|
5
5
|
import * as Sentry from "@sentry/node";
|
|
6
6
|
//#region src/cli/utils/scrub-sentry-event.ts
|
|
7
7
|
/**
|
|
@@ -70,13 +70,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
70
70
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
71
71
|
* standard `SENTRY_RELEASE` override.
|
|
72
72
|
*/
|
|
73
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.12-dev.
|
|
73
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.12-dev.6adf55e`;
|
|
74
74
|
/**
|
|
75
75
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
76
76
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
77
77
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
78
78
|
*/
|
|
79
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.12-dev.
|
|
79
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.12-dev.6adf55e") ? "development" : "production");
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/instrument.ts
|
|
82
82
|
let isInitialized = false;
|
|
@@ -212,5 +212,5 @@ const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repe
|
|
|
212
212
|
//#endregion
|
|
213
213
|
export { initializeSentry as i, buildFooterLinkLines as n, flushSentry as r, buildSectionDivider as t };
|
|
214
214
|
|
|
215
|
-
//# sourceMappingURL=build-section-divider-
|
|
216
|
-
//# debugId=
|
|
215
|
+
//# sourceMappingURL=build-section-divider-vpun8x_J.js.map
|
|
216
|
+
//# debugId=7d232a10-5aec-51c5-b27f-edb3bb27576d
|
|
@@ -1,15 +1,15 @@
|
|
|
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]="c6f82abd-43fa-57da-876d-469feaed34a9")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { Kt as highlighter, T as METRIC, cr as GITHUB_ACTIONS_SETUP_URL, t as recordCount, tr as CI_URL, zn as runSync } from "./record-metric-
|
|
5
|
-
import { r as isExpectedUserError } from "./telemetry-runtime-
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
8
|
-
import { M as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
9
|
-
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-
|
|
10
|
-
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-
|
|
11
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
12
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
4
|
+
import { Kt as highlighter, T as METRIC, cr as GITHUB_ACTIONS_SETUP_URL, t as recordCount, tr as CI_URL, zn as runSync } from "./record-metric-BmOG6HVR.js";
|
|
5
|
+
import { r as isExpectedUserError } from "./telemetry-runtime-BjUcF9hs.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Yaoez-RH.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-DuiY23eQ.js";
|
|
8
|
+
import { M as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-M8suVmTf.js";
|
|
9
|
+
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-CNBnhu3z.js";
|
|
10
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-_nyipRUA.js";
|
|
11
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-DoakhC6R.js";
|
|
12
|
+
import { t as printBrandedHeader } from "./print-branded-header-CLGkstCH.js";
|
|
13
13
|
import * as path$1 from "node:path";
|
|
14
14
|
import * as fs$1 from "node:fs";
|
|
15
15
|
//#region src/cli/utils/ci/ci-provider.ts
|
|
@@ -7498,5 +7498,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
|
|
|
7498
7498
|
//#endregion
|
|
7499
7499
|
export { ciConfigAction, ciInstallAction, ciUpgradeAction };
|
|
7500
7500
|
|
|
7501
|
-
//# sourceMappingURL=ci-
|
|
7502
|
-
//# debugId=
|
|
7501
|
+
//# sourceMappingURL=ci-B1PqBCzE.js.map
|
|
7502
|
+
//# debugId=c6f82abd-43fa-57da-876d-469feaed34a9
|
package/dist/cli.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
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]="f42b1a1f-3941-5a61-bf1b-ea87400b9ec6")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { H as isDebugFlagEnabled, Kt as highlighter, _ as VERSION, d as isJsonModeActive, er as CANONICAL_GITHUB_URL, gn as setColorEnabled, h as writeJsonErrorReport, i as isTelemetryEnabled, tr as CI_URL, z as CliInputError } from "./record-metric-
|
|
5
|
-
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-
|
|
6
|
-
import { i as initializeSentry, r as flushSentry } from "./build-section-divider-
|
|
7
|
-
import { t as exitGracefully } from "./exit-gracefully-
|
|
8
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
4
|
+
import { H as isDebugFlagEnabled, Kt as highlighter, _ as VERSION, d as isJsonModeActive, er as CANONICAL_GITHUB_URL, gn as setColorEnabled, h as writeJsonErrorReport, i as isTelemetryEnabled, tr as CI_URL, z as CliInputError } from "./record-metric-BmOG6HVR.js";
|
|
5
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-BjUcF9hs.js";
|
|
6
|
+
import { i as initializeSentry, r as flushSentry } from "./build-section-divider-vpun8x_J.js";
|
|
7
|
+
import { t as exitGracefully } from "./exit-gracefully-FqWBnSfm.js";
|
|
8
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Yaoez-RH.js";
|
|
9
9
|
import { n as getLastRunTraceId } from "./active-run-trace-dlIZeEvb.js";
|
|
10
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
10
|
+
import { t as reportErrorToSentry } from "./report-error-DuiY23eQ.js";
|
|
11
11
|
import { t as unrefStdin } from "./unref-stdin-BKT_s38a.js";
|
|
12
12
|
import { execFileSync } from "node:child_process";
|
|
13
13
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
|
|
@@ -3529,7 +3529,7 @@ ${highlighter.dim("Learn more:")}
|
|
|
3529
3529
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
3530
3530
|
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[directory]", "project directory 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("--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);
|
|
3531
3531
|
program.action(async (directory = ".", flags) => {
|
|
3532
|
-
const { runScanCommand } = await import("./scan-
|
|
3532
|
+
const { runScanCommand } = await import("./scan-CAKu_nEz.js");
|
|
3533
3533
|
return runScanCommand({
|
|
3534
3534
|
directory,
|
|
3535
3535
|
flags,
|
|
@@ -3537,75 +3537,75 @@ program.action(async (directory = ".", flags) => {
|
|
|
3537
3537
|
});
|
|
3538
3538
|
});
|
|
3539
3539
|
program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
|
|
3540
|
-
const { designAction } = await import("./design-
|
|
3540
|
+
const { designAction } = await import("./design-BXB-ZPFf.js");
|
|
3541
3541
|
return designAction(directory ?? ".", command.optsWithGlobals());
|
|
3542
3542
|
});
|
|
3543
3543
|
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) => {
|
|
3544
|
-
const { runtimeScanAction } = await import("./runtime-scan-
|
|
3544
|
+
const { runtimeScanAction } = await import("./runtime-scan-iXdCmsiz.js");
|
|
3545
3545
|
return runtimeScanAction(url, options);
|
|
3546
3546
|
});
|
|
3547
3547
|
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) => {
|
|
3548
|
-
const { whyAction } = await import("./why-
|
|
3548
|
+
const { whyAction } = await import("./why-C7Zo-CEY.js");
|
|
3549
3549
|
return whyAction(location, options);
|
|
3550
3550
|
});
|
|
3551
3551
|
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) => {
|
|
3552
|
-
const { installAction } = await import("./install-
|
|
3552
|
+
const { installAction } = await import("./install-vGLT3klU.js");
|
|
3553
3553
|
return installAction(options, command);
|
|
3554
3554
|
});
|
|
3555
3555
|
const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
|
|
3556
3556
|
const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
|
|
3557
3557
|
const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
|
|
3558
3558
|
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) => {
|
|
3559
|
-
const { ciInstallAction } = await import("./ci-
|
|
3559
|
+
const { ciInstallAction } = await import("./ci-B1PqBCzE.js");
|
|
3560
3560
|
return ciInstallAction(command.optsWithGlobals());
|
|
3561
3561
|
});
|
|
3562
3562
|
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) => {
|
|
3563
|
-
const { ciConfigAction } = await import("./ci-
|
|
3563
|
+
const { ciConfigAction } = await import("./ci-B1PqBCzE.js");
|
|
3564
3564
|
return ciConfigAction(command.optsWithGlobals());
|
|
3565
3565
|
});
|
|
3566
3566
|
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) => {
|
|
3567
|
-
const { ciUpgradeAction } = await import("./ci-
|
|
3567
|
+
const { ciUpgradeAction } = await import("./ci-B1PqBCzE.js");
|
|
3568
3568
|
return ciUpgradeAction(command.optsWithGlobals());
|
|
3569
3569
|
});
|
|
3570
3570
|
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 () => {
|
|
3571
|
-
const { versionAction } = await import("./version-
|
|
3571
|
+
const { versionAction } = await import("./version-DGDf-d6A.js");
|
|
3572
3572
|
return versionAction();
|
|
3573
3573
|
});
|
|
3574
3574
|
const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
|
|
3575
3575
|
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) => {
|
|
3576
|
-
const { rulesListAction } = await import("./rules-
|
|
3576
|
+
const { rulesListAction } = await import("./rules-DNARNX5I.js");
|
|
3577
3577
|
return rulesListAction(command.optsWithGlobals());
|
|
3578
3578
|
});
|
|
3579
3579
|
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) => {
|
|
3580
|
-
const { rulesExplainAction } = await import("./rules-
|
|
3580
|
+
const { rulesExplainAction } = await import("./rules-DNARNX5I.js");
|
|
3581
3581
|
return rulesExplainAction(rule, command.optsWithGlobals());
|
|
3582
3582
|
});
|
|
3583
3583
|
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) => {
|
|
3584
|
-
const { rulesSetAction } = await import("./rules-
|
|
3584
|
+
const { rulesSetAction } = await import("./rules-DNARNX5I.js");
|
|
3585
3585
|
return rulesSetAction(rule, severity, command.optsWithGlobals());
|
|
3586
3586
|
});
|
|
3587
3587
|
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) => {
|
|
3588
|
-
const { rulesEnableAction } = await import("./rules-
|
|
3588
|
+
const { rulesEnableAction } = await import("./rules-DNARNX5I.js");
|
|
3589
3589
|
return rulesEnableAction(rule, command.optsWithGlobals());
|
|
3590
3590
|
});
|
|
3591
3591
|
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) => {
|
|
3592
|
-
const { rulesDisableAction } = await import("./rules-
|
|
3592
|
+
const { rulesDisableAction } = await import("./rules-DNARNX5I.js");
|
|
3593
3593
|
return rulesDisableAction(rule, command.optsWithGlobals());
|
|
3594
3594
|
});
|
|
3595
3595
|
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) => {
|
|
3596
|
-
const { rulesCategoryAction } = await import("./rules-
|
|
3596
|
+
const { rulesCategoryAction } = await import("./rules-DNARNX5I.js");
|
|
3597
3597
|
return rulesCategoryAction(category, severity, command.optsWithGlobals());
|
|
3598
3598
|
});
|
|
3599
3599
|
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) => {
|
|
3600
|
-
const { rulesIgnoreTagAction } = await import("./rules-
|
|
3600
|
+
const { rulesIgnoreTagAction } = await import("./rules-DNARNX5I.js");
|
|
3601
3601
|
return rulesIgnoreTagAction(tag, command.optsWithGlobals());
|
|
3602
3602
|
});
|
|
3603
3603
|
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) => {
|
|
3604
|
-
const { rulesUnignoreTagAction } = await import("./rules-
|
|
3604
|
+
const { rulesUnignoreTagAction } = await import("./rules-DNARNX5I.js");
|
|
3605
3605
|
return rulesUnignoreTagAction(tag, command.optsWithGlobals());
|
|
3606
3606
|
});
|
|
3607
3607
|
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) => {
|
|
3608
|
-
const { runScanCommand } = await import("./scan-
|
|
3608
|
+
const { runScanCommand } = await import("./scan-CAKu_nEz.js");
|
|
3609
3609
|
return runScanCommand({
|
|
3610
3610
|
directory,
|
|
3611
3611
|
flags: command.optsWithGlobals(),
|
|
@@ -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]="8ad08567-936e-5c37-9dd5-5066a3b73d9e")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-09aTvLGt.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-BXB-ZPFf.js.map
|
|
14
|
+
//# debugId=8ad08567-936e-5c37-9dd5-5066a3b73d9e
|
|
@@ -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 { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-
|
|
4
|
-
import { n as shutdownTelemetry } from "./telemetry-runtime-
|
|
5
|
-
import { n as buildFooterLinkLines, r as flushSentry, t as buildSectionDivider } from "./build-section-divider-
|
|
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]="71253418-229a-5da4-8a9e-38d69fbf3078")}catch(e){}}();
|
|
3
|
+
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-BmOG6HVR.js";
|
|
4
|
+
import { n as shutdownTelemetry } from "./telemetry-runtime-BjUcF9hs.js";
|
|
5
|
+
import { n as buildFooterLinkLines, r as flushSentry, t as buildSectionDivider } from "./build-section-divider-vpun8x_J.js";
|
|
6
6
|
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-DwG6tSPy.js";
|
|
7
7
|
//#region src/cli/utils/active-tui-renderer.ts
|
|
8
8
|
let activeTuiRenderer = null;
|
|
@@ -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-FqWBnSfm.js.map
|
|
54
|
+
//# debugId=71253418-229a-5da4-8a9e-38d69fbf3078
|
|
@@ -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 { $n as CANONICAL_DISCORD_URL, An as gen, Cn as error, Ft as formatErrorChain, It as formatReactDoctorError, Kt as highlighter, T as METRIC, Xt as isReactDoctorError, _ as VERSION, br as isErrnoException, er as CANONICAL_GITHUB_URL, t as recordCount, zn as runSync } from "./record-metric-
|
|
4
|
-
import { a as isNpmCacheCorruptionError, i as formatNpmCacheCorruptionError, o as formatEnvironmentError, s 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]="49b3e885-8adc-5210-a78e-aa18981c9e21")}catch(e){}}();
|
|
3
|
+
import { $n as CANONICAL_DISCORD_URL, An as gen, Cn as error, Ft as formatErrorChain, It as formatReactDoctorError, Kt as highlighter, T as METRIC, Xt as isReactDoctorError, _ as VERSION, br as isErrnoException, er as CANONICAL_GITHUB_URL, t as recordCount, zn as runSync } from "./record-metric-BmOG6HVR.js";
|
|
4
|
+
import { a as isNpmCacheCorruptionError, i as formatNpmCacheCorruptionError, o as formatEnvironmentError, s as isEnvironmentError } from "./telemetry-runtime-BjUcF9hs.js";
|
|
5
5
|
//#region src/cli/utils/handle-error.ts
|
|
6
6
|
const OTLP_ENDPOINT_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_ENDPOINT";
|
|
7
7
|
const OTLP_AUTH_HEADER_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_AUTH_HEADER";
|
|
@@ -110,5 +110,5 @@ const handleUserError = (error$1, options = {}) => {
|
|
|
110
110
|
//#endregion
|
|
111
111
|
export { handleUserError as n, handleError as t };
|
|
112
112
|
|
|
113
|
-
//# sourceMappingURL=handle-error-
|
|
114
|
-
//# debugId=
|
|
113
|
+
//# sourceMappingURL=handle-error-Yaoez-RH.js.map
|
|
114
|
+
//# debugId=49b3e885-8adc-5210-a78e-aa18981c9e21
|
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]="99fcede8-f7dd-50eb-a707-599a7e94811f")}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 path$1$1 from "node:path";
|
|
@@ -19,7 +19,7 @@ import { fileURLToPath } from "node:url";
|
|
|
19
19
|
import * as OS from "node:os";
|
|
20
20
|
import os from "node:os";
|
|
21
21
|
import { createJiti } from "jiti";
|
|
22
|
-
import { parseJSON5 } from "confbox";
|
|
22
|
+
import { parseJSON5, parseJSONC } from "confbox";
|
|
23
23
|
import * as fs$1 from "node:fs/promises";
|
|
24
24
|
import { PassThrough } from "node:stream";
|
|
25
25
|
import { convertToTSX } from "@astrojs/compiler/sync";
|
|
@@ -69644,6 +69644,28 @@ const checkExpoEnvLocalFiles = (context) => {
|
|
|
69644
69644
|
help: `Add \`.env*.local\` to your .gitignore. If already committed, untrack with \`git rm --cached ${committedEnvFiles.join(" ")}\``
|
|
69645
69645
|
})];
|
|
69646
69646
|
};
|
|
69647
|
+
const JAVASCRIPT_MODULE_FILE_PATTERN = /\.[cm]?[jt]sx?$/;
|
|
69648
|
+
const hasStaticModuleSubpath = (rootDirectory, packageName) => {
|
|
69649
|
+
const packageSubpathPrefix = `${packageName}/`;
|
|
69650
|
+
for (const { absolutePath, name } of walkSourceTreeFiles(rootDirectory)) {
|
|
69651
|
+
if (!JAVASCRIPT_MODULE_FILE_PATTERN.test(name)) continue;
|
|
69652
|
+
let sourceText;
|
|
69653
|
+
try {
|
|
69654
|
+
sourceText = fs$1$3.readFileSync(absolutePath, "utf-8");
|
|
69655
|
+
} catch {
|
|
69656
|
+
continue;
|
|
69657
|
+
}
|
|
69658
|
+
if (!sourceText.includes(packageSubpathPrefix)) continue;
|
|
69659
|
+
let moduleSpecifiers;
|
|
69660
|
+
try {
|
|
69661
|
+
moduleSpecifiers = collectStaticModuleSpecifiers(sourceText, { filePath: absolutePath });
|
|
69662
|
+
} catch {
|
|
69663
|
+
continue;
|
|
69664
|
+
}
|
|
69665
|
+
for (const moduleSpecifier of moduleSpecifiers) if (moduleSpecifier.startsWith(packageSubpathPrefix)) return true;
|
|
69666
|
+
}
|
|
69667
|
+
return false;
|
|
69668
|
+
};
|
|
69647
69669
|
const isExpoSdkAtLeast = (expoSdkMajor, minMajor) => expoSdkMajor !== null && expoSdkMajor >= minMajor;
|
|
69648
69670
|
const UNIMODULES_HELP = "Remove every `@unimodules/*` and `react-native-unimodules` package — their functionality now lives in `expo-modules-core`. See https://expo.fyi/r/sdk-44-remove-unimodules";
|
|
69649
69671
|
const FIREBASE_HELP = "Use the Firebase JS SDK or React Native Firebase directly. See https://expo.fyi/firebase-migration-guide";
|
|
@@ -69697,7 +69719,8 @@ const FLAGGED_DEPENDENCIES = [
|
|
|
69697
69719
|
packageName: "@expo/metro-config",
|
|
69698
69720
|
rule: "expo-no-redundant-dependency",
|
|
69699
69721
|
message: "\"@expo/metro-config\" should not be a direct dependency. Expo pins the compatible Metro config, and a direct entry can drift to a version that breaks bundling",
|
|
69700
|
-
help: "Remove `@expo/metro-config` and import `expo/metro-config` in your metro.config.js"
|
|
69722
|
+
help: "Remove `@expo/metro-config` and import `expo/metro-config` in your metro.config.js",
|
|
69723
|
+
skipWhenSubpathImported: true
|
|
69701
69724
|
},
|
|
69702
69725
|
{
|
|
69703
69726
|
packageName: "@types/react-native",
|
|
@@ -69758,8 +69781,9 @@ const FLAGGED_DEPENDENCIES = [
|
|
|
69758
69781
|
];
|
|
69759
69782
|
const checkExpoFlaggedDependencies = (context) => FLAGGED_DEPENDENCIES.filter((flaggedDependency) => {
|
|
69760
69783
|
if (!context.directDependencyNames.has(flaggedDependency.packageName)) return false;
|
|
69761
|
-
if (flaggedDependency.minSdkMajor
|
|
69762
|
-
|
|
69784
|
+
if (flaggedDependency.minSdkMajor !== void 0 && !isExpoSdkAtLeast(context.expoSdkMajor, flaggedDependency.minSdkMajor)) return false;
|
|
69785
|
+
if (flaggedDependency.skipWhenSubpathImported && hasStaticModuleSubpath(context.rootDirectory, flaggedDependency.packageName)) return false;
|
|
69786
|
+
return true;
|
|
69763
69787
|
}).map((flaggedDependency) => buildExpoDiagnostic({
|
|
69764
69788
|
rule: flaggedDependency.rule,
|
|
69765
69789
|
message: flaggedDependency.message,
|
|
@@ -73134,59 +73158,11 @@ const isLocalPathExtend = (entry) => {
|
|
|
73134
73158
|
for (const prefix of EXTENDS_LOCAL_PATH_PREFIXES) if (entry.startsWith(prefix)) return true;
|
|
73135
73159
|
return false;
|
|
73136
73160
|
};
|
|
73137
|
-
const stripJsoncComments = (raw) => {
|
|
73138
|
-
let result = "";
|
|
73139
|
-
let cursor = 0;
|
|
73140
|
-
let inString = false;
|
|
73141
|
-
let stringQuote = "";
|
|
73142
|
-
while (cursor < raw.length) {
|
|
73143
|
-
const character = raw[cursor];
|
|
73144
|
-
const nextCharacter = raw[cursor + 1];
|
|
73145
|
-
if (inString) {
|
|
73146
|
-
result += character;
|
|
73147
|
-
if (character === "\\" && cursor + 1 < raw.length) {
|
|
73148
|
-
result += nextCharacter;
|
|
73149
|
-
cursor += 2;
|
|
73150
|
-
continue;
|
|
73151
|
-
}
|
|
73152
|
-
if (character === stringQuote) inString = false;
|
|
73153
|
-
cursor += 1;
|
|
73154
|
-
continue;
|
|
73155
|
-
}
|
|
73156
|
-
if (character === "\"" || character === "'") {
|
|
73157
|
-
inString = true;
|
|
73158
|
-
stringQuote = character;
|
|
73159
|
-
result += character;
|
|
73160
|
-
cursor += 1;
|
|
73161
|
-
continue;
|
|
73162
|
-
}
|
|
73163
|
-
if (character === "/" && nextCharacter === "/") {
|
|
73164
|
-
const lineEndIndex = raw.indexOf("\n", cursor);
|
|
73165
|
-
cursor = lineEndIndex === -1 ? raw.length : lineEndIndex;
|
|
73166
|
-
continue;
|
|
73167
|
-
}
|
|
73168
|
-
if (character === "/" && nextCharacter === "*") {
|
|
73169
|
-
const blockEndIndex = raw.indexOf("*/", cursor + 2);
|
|
73170
|
-
cursor = blockEndIndex === -1 ? raw.length : blockEndIndex + 2;
|
|
73171
|
-
continue;
|
|
73172
|
-
}
|
|
73173
|
-
result += character;
|
|
73174
|
-
cursor += 1;
|
|
73175
|
-
}
|
|
73176
|
-
return result;
|
|
73177
|
-
};
|
|
73178
|
-
const parseJsonOrJsonc = (raw) => {
|
|
73179
|
-
try {
|
|
73180
|
-
return JSON.parse(raw);
|
|
73181
|
-
} catch {
|
|
73182
|
-
return JSON.parse(stripJsoncComments(raw));
|
|
73183
|
-
}
|
|
73184
|
-
};
|
|
73185
73161
|
const canOxlintExtendConfig = (configPath) => {
|
|
73186
73162
|
if (!configPath.endsWith(".eslintrc.json")) return true;
|
|
73187
73163
|
let parsed;
|
|
73188
73164
|
try {
|
|
73189
|
-
parsed =
|
|
73165
|
+
parsed = parseJSONC(fs$1$3.readFileSync(configPath, "utf-8"), { allowTrailingComma: true });
|
|
73190
73166
|
} catch {
|
|
73191
73167
|
return true;
|
|
73192
73168
|
}
|
|
@@ -73298,6 +73274,25 @@ const detectUserLintConfigPaths = (rootDirectory) => {
|
|
|
73298
73274
|
}
|
|
73299
73275
|
return [];
|
|
73300
73276
|
};
|
|
73277
|
+
const readAdoptedLintConfigSettings = (configPaths) => {
|
|
73278
|
+
const mergedSettings = /* @__PURE__ */ new Map();
|
|
73279
|
+
for (const configPath of configPaths) {
|
|
73280
|
+
let parsed;
|
|
73281
|
+
try {
|
|
73282
|
+
parsed = parseJSONC(fs$1$3.readFileSync(configPath, "utf-8"), { allowTrailingComma: true });
|
|
73283
|
+
} catch {
|
|
73284
|
+
continue;
|
|
73285
|
+
}
|
|
73286
|
+
if (!isPlainObject(parsed)) continue;
|
|
73287
|
+
const settings = parsed.settings;
|
|
73288
|
+
if (!isPlainObject(settings)) continue;
|
|
73289
|
+
for (const [pluginName, pluginSettings] of Object.entries(settings)) {
|
|
73290
|
+
if (pluginName === "react-doctor") continue;
|
|
73291
|
+
mergedSettings.set(pluginName, pluginSettings);
|
|
73292
|
+
}
|
|
73293
|
+
}
|
|
73294
|
+
return Object.fromEntries(mergedSettings);
|
|
73295
|
+
};
|
|
73301
73296
|
const DISABLE_DIRECTIVE_PATTERN = /(eslint|oxlint)-disable/;
|
|
73302
73297
|
const getBackupRootDirectory = (rootDirectory) => path$1$1.join(rootDirectory, ...DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS);
|
|
73303
73298
|
const getBackupPath = (rootDirectory, absolutePath) => {
|
|
@@ -73694,7 +73689,7 @@ const buildUserPluginRules = (userPlugin, severityControls) => {
|
|
|
73694
73689
|
}
|
|
73695
73690
|
return enabled;
|
|
73696
73691
|
};
|
|
73697
|
-
const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, extendsPaths = [], ignoredTags = /* @__PURE__ */ new Set(), includedTags = /* @__PURE__ */ new Set(), includeTagDefaults = false, runtimeGlobals, unpluginAutoImportGlobalScopes, serverAuthFunctionNames, projectIndexModuleSources, severityControls, userPlugins = [], disableReactHooksJsPlugin = false, ruleSelection, sidecarRuleIdFilter }) => {
|
|
73692
|
+
const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, extendsPaths = [], ignoredTags = /* @__PURE__ */ new Set(), includedTags = /* @__PURE__ */ new Set(), includeTagDefaults = false, runtimeGlobals, unpluginAutoImportGlobalScopes, serverAuthFunctionNames, projectIndexModuleSources, severityControls, adoptedSettings = {}, userPlugins = [], disableReactHooksJsPlugin = false, ruleSelection, sidecarRuleIdFilter }) => {
|
|
73698
73693
|
const hasIncludedTags = includedTags.size > 0;
|
|
73699
73694
|
const reactHooksJsPlugin = disableReactHooksJsPlugin || ruleSelection === "sidecar" || hasIncludedTags ? null : resolveReactHooksJsPlugin(project.hasReactCompiler || project.hasReactCompilerLintPlugin === true, customRulesOnly);
|
|
73700
73695
|
const reactCompilerRules = reactHooksJsPlugin ? applyRuleSeverityControls(filterRulesToAvailable(REACT_COMPILER_RULES, "react-hooks-js", reactHooksJsPlugin.availableRuleNames), severityControls) : {};
|
|
@@ -73749,23 +73744,26 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
|
|
|
73749
73744
|
},
|
|
73750
73745
|
plugins: [],
|
|
73751
73746
|
jsPlugins: [...jsPlugins, pluginPath],
|
|
73752
|
-
settings: {
|
|
73753
|
-
|
|
73754
|
-
|
|
73755
|
-
|
|
73756
|
-
|
|
73757
|
-
|
|
73758
|
-
|
|
73759
|
-
|
|
73760
|
-
unpluginAutoImportGlobalScopes
|
|
73761
|
-
|
|
73762
|
-
|
|
73763
|
-
|
|
73764
|
-
|
|
73765
|
-
|
|
73766
|
-
|
|
73767
|
-
|
|
73768
|
-
|
|
73747
|
+
settings: {
|
|
73748
|
+
...adoptedSettings,
|
|
73749
|
+
"react-doctor": {
|
|
73750
|
+
portedRuleMode: "curated",
|
|
73751
|
+
framework: project.framework,
|
|
73752
|
+
rootDirectory: settingsRootDirectory,
|
|
73753
|
+
capabilities: [...capabilities].sort(),
|
|
73754
|
+
...runtimeGlobals && runtimeGlobals.length > 0 ? { runtimeGlobals: [...runtimeGlobals] } : {},
|
|
73755
|
+
...unpluginAutoImportGlobalScopes && unpluginAutoImportGlobalScopes.length > 0 ? {
|
|
73756
|
+
unpluginAutoImportRootDirectories: [...new Set([settingsRootDirectory, project.rootDirectory])],
|
|
73757
|
+
unpluginAutoImportGlobalScopes: unpluginAutoImportGlobalScopes.map((scope) => ({
|
|
73758
|
+
directory: scope.directory,
|
|
73759
|
+
names: [...scope.names]
|
|
73760
|
+
}))
|
|
73761
|
+
} : {},
|
|
73762
|
+
...project.shopifyFlashListMajorVersion !== null ? { shopifyFlashListMajorVersion: project.shopifyFlashListMajorVersion } : {},
|
|
73763
|
+
...serverAuthFunctionNames && serverAuthFunctionNames.length > 0 ? { serverAuthFunctionNames: [...serverAuthFunctionNames] } : {},
|
|
73764
|
+
...projectIndexModuleSources !== void 0 ? { projectIndexModuleSources: [...projectIndexModuleSources] } : {}
|
|
73765
|
+
}
|
|
73766
|
+
},
|
|
73769
73767
|
rules: {
|
|
73770
73768
|
...reactCompilerRules,
|
|
73771
73769
|
...enabledReactDoctorRules,
|
|
@@ -75874,7 +75872,9 @@ const runOxlint = async (options) => {
|
|
|
75874
75872
|
return [];
|
|
75875
75873
|
}
|
|
75876
75874
|
const pluginPath = resolvePluginPath();
|
|
75877
|
-
const
|
|
75875
|
+
const detectedConfigPaths = adoptExistingLintConfig && !customRulesOnly ? detectUserLintConfigPaths(rootDirectory) : [];
|
|
75876
|
+
const extendsPaths = detectedConfigPaths.filter(canOxlintExtendConfig);
|
|
75877
|
+
const adoptedSettings = detectedConfigPaths.length > 0 ? readAdoptedLintConfigSettings(detectedConfigPaths) : {};
|
|
75878
75878
|
const userPlugins = includedTags.size > 0 ? [] : resolveUserPlugins(userConfig?.plugins, configSourceDirectory);
|
|
75879
75879
|
const restoreDisableDirectives = await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path), { recoverOnly: respectInlineDisables });
|
|
75880
75880
|
const configDirectory = fs$1$3.mkdtempSync(path$1$1.join(os.tmpdir(), "react-doctor-oxlintrc-"));
|
|
@@ -75936,6 +75936,7 @@ const runOxlint = async (options) => {
|
|
|
75936
75936
|
serverAuthFunctionNames,
|
|
75937
75937
|
projectIndexModuleSources,
|
|
75938
75938
|
severityControls,
|
|
75939
|
+
adoptedSettings,
|
|
75939
75940
|
userPlugins,
|
|
75940
75941
|
disableReactHooksJsPlugin: overrides.disableReactHooksJsPlugin,
|
|
75941
75942
|
ruleSelection: overrides.ruleSelection,
|
|
@@ -78179,4 +78180,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
78179
78180
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
78180
78181
|
|
|
78181
78182
|
//# sourceMappingURL=index.js.map
|
|
78182
|
-
//# debugId=
|
|
78183
|
+
//# debugId=99fcede8-f7dd-50eb-a707-599a7e94811f
|
|
@@ -1,18 +1,18 @@
|
|
|
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 { An as gen, At as discoverSupportedSubprojects, Bt as getDiffInfo, Cr as messageFromUnknown, F as STAGED_FILES_TEMP_DIR_PREFIX, Fn as provide$1, Gn as provide, H as isDebugFlagEnabled, I as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, Jt as isPathInsideDirectory, K as isCiOrCodingAgentEnvironment, Kt as highlighter, Lt as getBaselineDiffPlan, Pt as findLegacyConfig, Rn as runPromise, Rt as getChangedLineRanges, Sr as isPlainObject, T as METRIC, Wt as hasSupportedFrameworkOrLibrary, X as Git, _ as VERSION, _r as STAGED_FILES_PROJECT_CONFIG_FILENAMES, br as isErrnoException, er as CANONICAL_GITHUB_URL, f as setJsonReportDirectory, fn as resolveScanTarget, g as writeJsonReport, h as writeJsonErrorReport, ht as buildJsonReport, in as mapWithConcurrency, kt as detectAiTrainingEnvironment, n as recordDistribution, nn as listWorkspacePackages, p as setJsonReportMode, q as isCodingAgentEnvironment, sn as remainingDeadlineBudgetMs, t as recordCount, u as enableJsonMode, ut as StagedFiles, yn as toRelativePath, z as CliInputError } from "./record-metric-
|
|
4
|
-
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-
|
|
5
|
-
import { r as flushSentry } from "./build-section-divider-
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
8
|
-
import { A as runGitRaw, M as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-
|
|
9
|
-
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-
|
|
10
|
-
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope, u as toForwardSlashes } from "./resolve-scope-
|
|
11
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
12
|
-
import { A as resolveMergeBaseRef, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, I as printDiagnosticsDump, O as createInvocationInspect, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, V as buildEmptyReportMessage, _ as resolveCliInspectOptions, a as projectManifestChanged, b as setUpGitHubActions, c as selectProjects, d as resolveProjectChangedLineRanges, f as resolveProjectDiffIncludePaths, g as resolveWorkspaceDeadCodeOwner, h as retryMissingProjectScores, i as validateModeFlags, j as printHeadlessReport, k as inspect, l as buildCodeFrame, m as resolveProjectRelativeDirectory, n as formatSkippedProjectsMessage, o as partitionProjectScanOutcomes, p as resolveProjectSourceFilePaths, r as validateIncludeUntrackedScope, t as shouldFailScanGate, u as resolveProjectScan, v as filterScansForSurface, w as launchCliAgent, x as detectLaunchableAgents, y as countUniqueScannedFiles, z as filterDiagnosticsByCategories } from "./should-fail-scan-gate-
|
|
13
|
-
import { a as recordGate, i as readPreference, o as runMigrations, p as SETUP_HINT_EVENT, r as isGatePending, s as writePreference, u as HANDOFF_TARGET_PREFERENCE_ID } from "./report-workflow-result
|
|
14
|
-
import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithOutdatedReactDoctorHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-
|
|
15
|
-
import { t as readObjectFile } from "./read-object-file-
|
|
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]="29d556c3-940b-5d17-a46e-1fd60be34a97")}catch(e){}}();
|
|
3
|
+
import { An as gen, At as discoverSupportedSubprojects, Bt as getDiffInfo, Cr as messageFromUnknown, F as STAGED_FILES_TEMP_DIR_PREFIX, Fn as provide$1, Gn as provide, H as isDebugFlagEnabled, I as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, Jt as isPathInsideDirectory, K as isCiOrCodingAgentEnvironment, Kt as highlighter, Lt as getBaselineDiffPlan, Pt as findLegacyConfig, Rn as runPromise, Rt as getChangedLineRanges, Sr as isPlainObject, T as METRIC, Wt as hasSupportedFrameworkOrLibrary, X as Git, _ as VERSION, _r as STAGED_FILES_PROJECT_CONFIG_FILENAMES, br as isErrnoException, er as CANONICAL_GITHUB_URL, f as setJsonReportDirectory, fn as resolveScanTarget, g as writeJsonReport, h as writeJsonErrorReport, ht as buildJsonReport, in as mapWithConcurrency, kt as detectAiTrainingEnvironment, n as recordDistribution, nn as listWorkspacePackages, p as setJsonReportMode, q as isCodingAgentEnvironment, sn as remainingDeadlineBudgetMs, t as recordCount, u as enableJsonMode, ut as StagedFiles, yn as toRelativePath, z as CliInputError } from "./record-metric-BmOG6HVR.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-BjUcF9hs.js";
|
|
5
|
+
import { r as flushSentry } from "./build-section-divider-vpun8x_J.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Yaoez-RH.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-DuiY23eQ.js";
|
|
8
|
+
import { A as runGitRaw, M as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-M8suVmTf.js";
|
|
9
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-CNBnhu3z.js";
|
|
10
|
+
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope, u as toForwardSlashes } from "./resolve-scope-_nyipRUA.js";
|
|
11
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-DoakhC6R.js";
|
|
12
|
+
import { A as resolveMergeBaseRef, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, I as printDiagnosticsDump, O as createInvocationInspect, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, V as buildEmptyReportMessage, _ as resolveCliInspectOptions, a as projectManifestChanged, b as setUpGitHubActions, c as selectProjects, d as resolveProjectChangedLineRanges, f as resolveProjectDiffIncludePaths, g as resolveWorkspaceDeadCodeOwner, h as retryMissingProjectScores, i as validateModeFlags, j as printHeadlessReport, k as inspect, l as buildCodeFrame, m as resolveProjectRelativeDirectory, n as formatSkippedProjectsMessage, o as partitionProjectScanOutcomes, p as resolveProjectSourceFilePaths, r as validateIncludeUntrackedScope, t as shouldFailScanGate, u as resolveProjectScan, v as filterScansForSurface, w as launchCliAgent, x as detectLaunchableAgents, y as countUniqueScannedFiles, z as filterDiagnosticsByCategories } from "./should-fail-scan-gate-Cj5xP9sP.js";
|
|
13
|
+
import { a as recordGate, i as readPreference, o as runMigrations, p as SETUP_HINT_EVENT, r as isGatePending, s as writePreference, u as HANDOFF_TARGET_PREFERENCE_ID } from "./report-workflow-result-CmOfCx0C.js";
|
|
14
|
+
import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithOutdatedReactDoctorHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-BnWcj7RF.js";
|
|
15
|
+
import { t as readObjectFile } from "./read-object-file-bC4NjM3m.js";
|
|
16
16
|
import * as path$1 from "node:path";
|
|
17
17
|
import * as fs$1 from "node:fs";
|
|
18
18
|
import { tmpdir } from "node:os";
|
|
@@ -1441,5 +1441,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1441
1441
|
//#endregion
|
|
1442
1442
|
export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
|
|
1443
1443
|
|
|
1444
|
-
//# sourceMappingURL=inspect-
|
|
1445
|
-
//# debugId=
|
|
1444
|
+
//# sourceMappingURL=inspect-09aTvLGt.js.map
|
|
1445
|
+
//# debugId=29d556c3-940b-5d17-a46e-1fd60be34a97
|
|
@@ -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 { B as isNonInteractiveEnvironment, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } from "./record-metric-
|
|
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]="0afa6141-a5dc-5726-83da-a006514b2c42")}catch(e){}}();
|
|
3
|
+
import { B as isNonInteractiveEnvironment, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } from "./record-metric-BmOG6HVR.js";
|
|
4
4
|
import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-Cglw13G7.js";
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
@@ -2805,5 +2805,5 @@ const installReactDoctorScriptStep = (projectRoot) => {
|
|
|
2805
2805
|
//#endregion
|
|
2806
2806
|
export { runGitRaw as A, isRecord as C, readPackageJson as D, packageHasRecordKey as E, cliLogger as M, resolveGitPath as O, getPackageJsonPath as S, packageHasNestedRecordKey as T, REACT_DOCTOR_COMMAND as _, installReactDoctorScriptStep as a, VITE_PLUS_HOOKS_PATH as b, spinner as c, HUSKY_HOOKS_PATH as d, LEFTHOOK_CONFIG_FILES as f, PRE_COMMIT_CONFIG_FILE as g, OVERCOMMIT_CONFIG_FILE as h, hasDoctorScript as i, writeJsonFile as j, runGit as k, HOOK_FILE_NAME as l, NON_BLOCKING_REACT_DOCTOR_COMMAND as m, findNearestPackageDirectory as n, isSpinnerSilent as o, LEGACY_HOOK_RUNNER_RELATIVE_PATH as p, hasDoctorDependency as r, setSpinnerSilent as s, DOCTOR_PACKAGE_NAME as t, HOOK_RELATIVE_PATH as u, SIMPLE_GIT_HOOKS_CONFIG_FILE as v, packageHasDependency as w, ensureTrailingNewline as x, SIMPLE_GIT_HOOKS_PACKAGE_JSON_KEY as y };
|
|
2807
2807
|
|
|
2808
|
-
//# sourceMappingURL=install-doctor-script-
|
|
2809
|
-
//# debugId=
|
|
2808
|
+
//# sourceMappingURL=install-doctor-script-M8suVmTf.js.map
|
|
2809
|
+
//# debugId=0afa6141-a5dc-5726-83da-a006514b2c42
|