react-doctor 0.9.16 → 0.9.17
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 +3 -3
- package/dist/{build-section-divider-DdDfVhIU.js → build-section-divider-BpE5NDDX.js} +5 -5
- package/dist/{ci-DB7v3zSt.js → ci-DNtt9X6S.js} +13 -13
- package/dist/cli.js +25 -25
- package/dist/{constants-rmkaA7iw.js → constants-DHn5rUeg.js} +5 -5
- package/dist/{design-CdjV6tS8.js → design-u2afuNir.js} +4 -4
- package/dist/{exit-gracefully-DYAZMdvL.js → exit-gracefully-DlI5QxjC.js} +6 -6
- package/dist/{handle-error-rZIxgzIJ.js → handle-error-ChH7NTTt.js} +6 -6
- package/dist/index.d.ts +4 -1
- package/dist/index.js +9 -7
- package/dist/{inspect-td2f87RL.js → inspect-BEMrqB0D.js} +29 -29
- package/dist/{install-doctor-script-DutA3AmF.js → install-doctor-script-D5XbyGON.js} +5 -5
- package/dist/{install-github-workflow-CrCUq-fk.js → install-github-workflow-bsR3MAJ4.js} +5 -5
- package/dist/{install-react-doctor-AjM8eNr6.js → install-react-doctor-CEZd9boZ.js} +9 -9
- package/dist/{install-DFz26Git.js → install-rmw4kZuQ.js} +10 -10
- package/dist/{is-cache-globally-disabled-DquUESHw.js → is-cache-globally-disabled-DDlh_f1u.js} +4 -4
- package/dist/{jsx-runtime-CmVfaGKL.js → jsx-runtime-RhgTgCyJ.js} +6 -6
- package/dist/{print-branded-header-BSPcMb1k.js → print-branded-header-DUpSxfB1.js} +4 -4
- package/dist/{prompt-runtime-scan-url-9SslR9ci.js → prompt-runtime-scan-url-ClnyA-kD.js} +5 -5
- package/dist/{read-object-file-FXP4EgJe.js → read-object-file-BmbbCthv.js} +4 -4
- package/dist/{record-metric-DlQ2Xkco.js → record-metric-BNXhF2A-.js} +157 -83
- package/dist/{report-error-CsS16tjk.js → report-error-BaQdqDfo.js} +6 -6
- package/dist/{report-workflow-result-DL4pJV2h.js → report-workflow-result-keduRDKN.js} +6 -6
- package/dist/{resolve-scope-Dydx4htr.js → resolve-scope-_R9av4PA.js} +6 -6
- package/dist/{rules-BITRtAOo.js → rules-mbLozamL.js} +7 -7
- package/dist/{run-scan-app-BvZAmq01.js → run-scan-app-yG6ELpUl.js} +11 -11
- package/dist/{runtime-scan-BKWHOq5l.js → runtime-scan-DNhYo683.js} +10 -10
- package/dist/{sanitize-runtime-url-SAbuIQOl.js → sanitize-runtime-url-DM_qbPGY.js} +4 -4
- package/dist/{scan-BNqVRm8k.js → scan-CAAixMS9.js} +10 -10
- package/dist/{should-fail-scan-gate-ASw8KS4V.js → should-fail-scan-gate-DobEL_kS.js} +104 -18
- package/dist/{should-skip-prompts-D86BK2WZ.js → should-skip-prompts-CGTEgq2F.js} +4 -4
- package/dist/{should-use-tui--ondyPLd.js → should-use-tui-DG2l-Td3.js} +4 -4
- package/dist/skills/react-doctor/SKILL.md +1 -1
- package/dist/{start-scan-preamble-CCqs1vP4.js → start-scan-preamble-BPz3nzCQ.js} +5 -5
- package/dist/start-scan-preamble.js +3 -3
- package/dist/{telemetry-runtime-DRB6SHxI.js → telemetry-runtime-CUn1--rM.js} +7 -7
- package/dist/{version-c57nNOfC.js → version-CbFBCUY9.js} +5 -5
- package/dist/{why-B16Tzl_q.js → why-BIX2FUbP.js} +4 -4
- package/dist/{with-run-span-BpoDt67p.js → with-run-span-BsS7dU6e.js} +6 -6
- package/package.json +4 -4
|
@@ -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 { dt as COMPILER_CLEANUP_BUCKET, ft as COMPILER_CLEANUP_RULE_KEYS, u as METRIC } from "./constants-
|
|
4
|
-
import {
|
|
5
|
-
import { N as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
6
|
-
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]="8bae672d-a5d5-5ec5-91b6-6fa15b4693a9")}catch(e){}}();
|
|
3
|
+
import { dt as COMPILER_CLEANUP_BUCKET, ft as COMPILER_CLEANUP_RULE_KEYS, u as METRIC } from "./constants-DHn5rUeg.js";
|
|
4
|
+
import { At as highlighter, Bt as loadConfigWithSource, Pt as isSameRuleKey, Q as buildRuleDocsUrl, Un as isPlainObject, it as clearConfigCache, nn as validateConfigTypes, t as recordCount, wt as getEquivalentRuleKeys } from "./record-metric-BNXhF2A-.js";
|
|
5
|
+
import { N as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-D5XbyGON.js";
|
|
6
|
+
import { t as readObjectFile } from "./read-object-file-BmbbCthv.js";
|
|
7
7
|
import * as fs$1 from "node:fs";
|
|
8
8
|
import * as path$1 from "node:path";
|
|
9
9
|
import { REACT_DOCTOR_RULES } from "oxlint-plugin-react-doctor/core";
|
|
@@ -578,5 +578,5 @@ const rulesUnignoreTagAction = async (tag, options) => {
|
|
|
578
578
|
//#endregion
|
|
579
579
|
export { rulesCategoryAction, rulesDisableAction, rulesEnableAction, rulesExplainAction, rulesIgnoreTagAction, rulesListAction, rulesSetAction, rulesUnignoreTagAction };
|
|
580
580
|
|
|
581
|
-
//# sourceMappingURL=rules-
|
|
582
|
-
//# debugId=
|
|
581
|
+
//# sourceMappingURL=rules-mbLozamL.js.map
|
|
582
|
+
//# debugId=8bae672d-a5d5-5ec5-91b6-6fa15b4693a9
|
|
@@ -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]="
|
|
3
|
-
import { D as TUI_REPORT_COMPACT_MAX_ROWS, In as getCategoryImpact, O as TUI_REPORT_DETAIL_WIDTH_FRACTION, _t as DIAGNOSTIC_CATEGORY_BUCKETS, kt as GITHUB_ACTIONS_SETUP_URL, o as CI_TRUST_COMPANIES, u as METRIC } 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]="f6185bb4-3f3a-524a-bd32-0b19cc8c031b")}catch(e){}}();
|
|
3
|
+
import { D as TUI_REPORT_COMPACT_MAX_ROWS, In as getCategoryImpact, O as TUI_REPORT_DETAIL_WIDTH_FRACTION, _t as DIAGNOSTIC_CATEGORY_BUCKETS, kt as GITHUB_ACTIONS_SETUP_URL, o as CI_TRUST_COMPANIES, u as METRIC } from "./constants-DHn5rUeg.js";
|
|
4
|
+
import { An as succeed, At as highlighter, Ct as getDiffInfo, Dt as hasPublishedFixRecipe, En as void_, Gt as remainingDeadlineBudgetMs, Jt as resolveScanTarget, Ln as yieldToEventLoop, Q as buildRuleDocsUrl, Sn as runPromise, T as isCiEnvironment, U as Reporter, V as Progress, Vt as mapWithConcurrency, bt as getBaselineDiffPlan, n as recordDistribution, t as recordCount, tt as calculateScore, wn as sync, x as isGitHookEnvironment, xt as getChangedLineRanges } from "./record-metric-BNXhF2A-.js";
|
|
5
5
|
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
6
|
-
import { N as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
7
|
-
import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-
|
|
8
|
-
import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-
|
|
9
|
-
import { A as createInvocationInspect, B as hasIncompleteScoreAnalysis, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, F as formatSkippedCheckLabel, G as hasLintHardFailure, H as buildNoScoreMessage, I as formatElapsedTime, J as formatFixRecipeLine, K as buildRulePriorityMap, L as printFooter, M as resolveMergeBaseRef, O as collectProjectSourceFiles, P as pluralize, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, Y as formatLearnMoreLine, _ as retryMissingProjectScores, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, q as buildSortedRuleGroups, s as projectManifestChanged, t as shouldFailScanGate, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions, z as formatDiagnosticSite } from "./should-fail-scan-gate-
|
|
10
|
-
import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-
|
|
11
|
-
import { a as useExitOnCtrlC, c as Spinner, d as useInput, f as Transform, h as Box, i as import_react, l as useStdout, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime, u as useApp } from "./jsx-runtime-
|
|
6
|
+
import { N as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-D5XbyGON.js";
|
|
7
|
+
import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-bsR3MAJ4.js";
|
|
8
|
+
import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-_R9av4PA.js";
|
|
9
|
+
import { A as createInvocationInspect, B as hasIncompleteScoreAnalysis, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, F as formatSkippedCheckLabel, G as hasLintHardFailure, H as buildNoScoreMessage, I as formatElapsedTime, J as formatFixRecipeLine, K as buildRulePriorityMap, L as printFooter, M as resolveMergeBaseRef, O as collectProjectSourceFiles, P as pluralize, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, Y as formatLearnMoreLine, _ as retryMissingProjectScores, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, q as buildSortedRuleGroups, s as projectManifestChanged, t as shouldFailScanGate, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions, z as formatDiagnosticSite } from "./should-fail-scan-gate-DobEL_kS.js";
|
|
10
|
+
import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-keduRDKN.js";
|
|
11
|
+
import { a as useExitOnCtrlC, c as Spinner, d as useInput, f as Transform, h as Box, i as import_react, l as useStdout, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime, u as useApp } from "./jsx-runtime-RhgTgCyJ.js";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import { performance } from "node:perf_hooks";
|
|
14
14
|
import isUnicodeSupported from "is-unicode-supported";
|
|
@@ -2514,5 +2514,5 @@ const runScanApp = async (input) => {
|
|
|
2514
2514
|
//#endregion
|
|
2515
2515
|
export { runScanApp };
|
|
2516
2516
|
|
|
2517
|
-
//# sourceMappingURL=run-scan-app-
|
|
2518
|
-
//# debugId=
|
|
2517
|
+
//# sourceMappingURL=run-scan-app-yG6ELpUl.js.map
|
|
2518
|
+
//# debugId=f6185bb4-3f3a-524a-bd32-0b19cc8c031b
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { u as METRIC } 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]="d28937fb-7393-545a-aace-3b6c8ab74686")}catch(e){}}();
|
|
3
|
+
import { u as METRIC } from "./constants-DHn5rUeg.js";
|
|
4
|
+
import { At as highlighter, t as recordCount, u as enableJsonMode, y as CliInputError } from "./record-metric-BNXhF2A-.js";
|
|
5
5
|
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-CCTgal0O.js";
|
|
6
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
7
|
-
import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-
|
|
8
|
-
import { _ as RUNTIME_SCAN_SNAPSHOT_TIMEOUT_MS, b as RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS, f as RUNTIME_SCAN_PROBE_RELATIVE_PATH, g as RUNTIME_SCAN_SAFE_CDP_PAGE_URLS, h as RUNTIME_SCAN_PROBE_SNAPSHOT_TOKEN_PLACEHOLDER, l as RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES, m as RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER, n as RUNTIME_SCAN_BROWSER_WIDTH_PX, o as RUNTIME_SCAN_MAX_COMPONENT_EVENTS, p as RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER, r as RUNTIME_SCAN_CONTROL_CHARACTERS_PATTERN, s as RUNTIME_SCAN_MAX_RECORDING_DURATION_MS, t as sanitizeRuntimeUrl, v as RUNTIME_SCAN_TRACE_CATEGORIES, y as RUNTIME_SCAN_TRACE_FILE_EXTENSION } from "./sanitize-runtime-url-
|
|
9
|
-
import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-BaQdqDfo.js";
|
|
7
|
+
import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-BsS7dU6e.js";
|
|
8
|
+
import { _ as RUNTIME_SCAN_SNAPSHOT_TIMEOUT_MS, b as RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS, f as RUNTIME_SCAN_PROBE_RELATIVE_PATH, g as RUNTIME_SCAN_SAFE_CDP_PAGE_URLS, h as RUNTIME_SCAN_PROBE_SNAPSHOT_TOKEN_PLACEHOLDER, l as RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES, m as RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER, n as RUNTIME_SCAN_BROWSER_WIDTH_PX, o as RUNTIME_SCAN_MAX_COMPONENT_EVENTS, p as RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER, r as RUNTIME_SCAN_CONTROL_CHARACTERS_PATTERN, s as RUNTIME_SCAN_MAX_RECORDING_DURATION_MS, t as sanitizeRuntimeUrl, v as RUNTIME_SCAN_TRACE_CATEGORIES, y as RUNTIME_SCAN_TRACE_FILE_EXTENSION } from "./sanitize-runtime-url-DM_qbPGY.js";
|
|
9
|
+
import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-DG2l-Td3.js";
|
|
10
10
|
import * as fs$1 from "node:fs";
|
|
11
11
|
import * as path$1 from "node:path";
|
|
12
12
|
import * as os$1 from "node:os";
|
|
@@ -720,7 +720,7 @@ const resolveRuntimeScanUrl = async (url) => {
|
|
|
720
720
|
if (url !== void 0) return url;
|
|
721
721
|
if (!isTuiEnvironmentSupported(resolveTuiEnvironment(process.stderr.isTTY === true))) throw new CliInputError("A URL is required outside an interactive terminal. Run `react-doctor scan <url>`.");
|
|
722
722
|
recordCount(METRIC.runtimeScanUrlPromptShown);
|
|
723
|
-
const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-
|
|
723
|
+
const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-ClnyA-kD.js");
|
|
724
724
|
return promptRuntimeScanUrl();
|
|
725
725
|
};
|
|
726
726
|
const runtimeScanAction = async (url, flags) => {
|
|
@@ -767,5 +767,5 @@ const runtimeScanAction = async (url, flags) => {
|
|
|
767
767
|
//#endregion
|
|
768
768
|
export { runtimeScanAction };
|
|
769
769
|
|
|
770
|
-
//# sourceMappingURL=runtime-scan-
|
|
771
|
-
//# debugId=
|
|
770
|
+
//# sourceMappingURL=runtime-scan-DNhYo683.js.map
|
|
771
|
+
//# debugId=d28937fb-7393-545a-aace-3b6c8ab74686
|
|
@@ -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 { y as CliInputError } 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]="d65901ed-441b-5faf-a87b-f9b36838d024")}catch(e){}}();
|
|
3
|
+
import { y as CliInputError } from "./record-metric-BNXhF2A-.js";
|
|
4
4
|
//#region src/cli/runtime-scan/constants.ts
|
|
5
5
|
const RUNTIME_SCAN_MAX_COMPONENT_EVENTS = 2e3;
|
|
6
6
|
const RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES = 5 * 1024 * 1024;
|
|
@@ -72,5 +72,5 @@ const sanitizeRuntimeUrl = (rawUrl) => {
|
|
|
72
72
|
//#endregion
|
|
73
73
|
export { RUNTIME_SCAN_SNAPSHOT_TIMEOUT_MS as _, RUNTIME_SCAN_LOCAL_DEV_PORTS as a, RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS as b, RUNTIME_SCAN_MAX_SNAPSHOT_BYTES as c, RUNTIME_SCAN_MAX_TRACE_BYTES as d, RUNTIME_SCAN_PROBE_RELATIVE_PATH as f, RUNTIME_SCAN_SAFE_CDP_PAGE_URLS as g, RUNTIME_SCAN_PROBE_SNAPSHOT_TOKEN_PLACEHOLDER as h, RUNTIME_SCAN_LAYOUT_THRASH_RATIO as i, RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES as l, RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER as m, RUNTIME_SCAN_BROWSER_WIDTH_PX as n, RUNTIME_SCAN_MAX_COMPONENT_EVENTS as o, RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER as p, RUNTIME_SCAN_CONTROL_CHARACTERS_PATTERN as r, RUNTIME_SCAN_MAX_RECORDING_DURATION_MS as s, sanitizeRuntimeUrl as t, RUNTIME_SCAN_MAX_STRING_LENGTH as u, RUNTIME_SCAN_TRACE_CATEGORIES as v, RUNTIME_SCAN_TRACE_FILE_EXTENSION as y };
|
|
74
74
|
|
|
75
|
-
//# sourceMappingURL=sanitize-runtime-url-
|
|
76
|
-
//# debugId=
|
|
75
|
+
//# sourceMappingURL=sanitize-runtime-url-DM_qbPGY.js.map
|
|
76
|
+
//# debugId=d65901ed-441b-5faf-a87b-f9b36838d024
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { u as METRIC } from "./constants-
|
|
4
|
-
import {
|
|
5
|
-
import { i as warnDeprecatedDiff } from "./resolve-scope-
|
|
6
|
-
import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-
|
|
7
|
-
import { a as validateModeFlags, r as validateFilePathSelectionFlags, y as resolveCliInspectOptions } from "./should-fail-scan-gate-
|
|
8
|
-
import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui
|
|
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]="688cf58e-764c-5dca-96d2-74f35e8f59e1")}catch(e){}}();
|
|
3
|
+
import { u as METRIC } from "./constants-DHn5rUeg.js";
|
|
4
|
+
import { Jt as resolveScanTarget, t as recordCount } from "./record-metric-BNXhF2A-.js";
|
|
5
|
+
import { i as warnDeprecatedDiff } from "./resolve-scope-_R9av4PA.js";
|
|
6
|
+
import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-BEMrqB0D.js";
|
|
7
|
+
import { a as validateModeFlags, r as validateFilePathSelectionFlags, y as resolveCliInspectOptions } from "./should-fail-scan-gate-DobEL_kS.js";
|
|
8
|
+
import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-DG2l-Td3.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
//#region src/cli/commands/scan.ts
|
|
11
11
|
const runScanCommand = async (input) => {
|
|
@@ -29,7 +29,7 @@ const runScanCommand = async (input) => {
|
|
|
29
29
|
warnDeprecatedFailOn(input.flags, scanTarget.userConfig);
|
|
30
30
|
warnDeprecatedDiff(input.flags, scanTarget.userConfig);
|
|
31
31
|
recordCount(METRIC.cliInvoked, 1, { command: input.invocationCommand });
|
|
32
|
-
const { runScanApp } = await import("./run-scan-app-
|
|
32
|
+
const { runScanApp } = await import("./run-scan-app-yG6ELpUl.js");
|
|
33
33
|
const { shouldFail } = await runScanApp({
|
|
34
34
|
directory: input.directory,
|
|
35
35
|
scanTarget,
|
|
@@ -44,5 +44,5 @@ const runScanCommand = async (input) => {
|
|
|
44
44
|
//#endregion
|
|
45
45
|
export { runScanCommand };
|
|
46
46
|
|
|
47
|
-
//# sourceMappingURL=scan-
|
|
48
|
-
//# debugId=
|
|
47
|
+
//# sourceMappingURL=scan-CAAixMS9.js.map
|
|
48
|
+
//# debugId=688cf58e-764c-5dca-96d2-74f35e8f59e1
|
|
@@ -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 { E as TRACKED_FILE_FLAGS_GIT_ARGUMENTS, Ft as HTML_FILE_PATTERN, Ht as MAINTAINABILITY_SOURCE_FILE_PATTERN, Jt as OXLINT_NODE_REQUIREMENT, K as resolveReactDoctorCacheDir, Nt as GIT_SHOW_MAX_BUFFER_BYTES, Rt as JSX_FILE_PATTERN, St as ENTERPRISE_CONTACT_URL, Wt as MILLISECONDS_PER_SECOND, _t as DIAGNOSTIC_CATEGORY_BUCKETS, c as HEAD_SHA_GIT_ARGUMENTS, dn as SHARE_BASE_URL, h as REPOSITORY_ROOT_GIT_ARGUMENTS, i as BASELINE_FILES_TEMP_DIR_PREFIX, k as WORKTREE_STATUS_GIT_ARGUMENTS, q as resolveScanConcurrency, u as METRIC, ut as CI_URL, v as SCAN_RESULT_CACHE_FILENAME } from "./constants-
|
|
4
|
-
import { t as isCacheGloballyDisabled } from "./is-cache-globally-disabled-
|
|
5
|
-
import { $ as buildRuleSeverityControls, A as Files,
|
|
6
|
-
import { t as getTelemetryContext } 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]="e48b769a-9844-5e61-94ac-3094eebbccc5")}catch(e){}}();
|
|
3
|
+
import { E as TRACKED_FILE_FLAGS_GIT_ARGUMENTS, Ft as HTML_FILE_PATTERN, Ht as MAINTAINABILITY_SOURCE_FILE_PATTERN, Jt as OXLINT_NODE_REQUIREMENT, K as resolveReactDoctorCacheDir, Nt as GIT_SHOW_MAX_BUFFER_BYTES, Rt as JSX_FILE_PATTERN, St as ENTERPRISE_CONTACT_URL, Wt as MILLISECONDS_PER_SECOND, _t as DIAGNOSTIC_CATEGORY_BUCKETS, c as HEAD_SHA_GIT_ARGUMENTS, dn as SHARE_BASE_URL, h as REPOSITORY_ROOT_GIT_ARGUMENTS, i as BASELINE_FILES_TEMP_DIR_PREFIX, k as WORKTREE_STATUS_GIT_ARGUMENTS, q as resolveScanConcurrency, u as METRIC, ut as CI_URL, v as SCAN_RESULT_CACHE_FILENAME } from "./constants-DHn5rUeg.js";
|
|
4
|
+
import { t as isCacheGloballyDisabled } from "./is-cache-globally-disabled-DDlh_f1u.js";
|
|
5
|
+
import { $ as buildRuleSeverityControls, $t as shouldUseMaintainabilityLayer, A as Files, An as succeed, At as highlighter, B as PerFileLintCacheEnabled, Bn as isDirectory, C as ACTION_INPUT_ENVIRONMENT_VARIABLES, Cn as runSync, Dt as hasPublishedFixRecipe, E as isCiOrCodingAgentEnvironment, Et as groupBy, F as Linter, Fn as ParentSpan, Ft as isScanComplete, G as SidecarLintCacheEnabled, Gt as remainingDeadlineBudgetMs, H as Project, Hn as isFile, Ht as materializeSourceTree, I as Maintainability, In as isMonorepoRoot, Jt as resolveScanTarget, Kt as resolveGithubActionsScoreMetadata, L as NodeResolver, Ln as yieldToEventLoop, Lt as listSourceFiles, M as InvocationCaches, Nt as isReactDoctorError, O as Config, On as mergeAll, P as LintPartialFailures, Q as buildRuleDocsUrl, R as OxlintConcurrency, Rt as listSourceFilesCooperative, Sn as runPromise, St as getDiagnosticRuleIdentity, T as isCiEnvironment, Tn as try_, Tt as getRuleMetadata, U as Reporter, Ut as mergeAndFilterDiagnostics, V as Progress, Vt as mapWithConcurrency, W as Score, Wt as mergeReactDoctorConfigs, X as atomicWriteJson, Xt as runInspect, Yt as restoreLegacyThrow, _ as VERSION, _n as orElseSucceed, _t as fingerprintDiagnosticEvidence, an as Console, at as collectSourceFilesByDirectory, b as isNonInteractiveEnvironment, bn as provideContext, cn as log, ct as countOptInProjectRuleSelections, d as isJsonModeActive, en as summarizeDiagnostics, et as buildSkippedChecks, fn as decodeUnknownSync, ft as discoverSupportedSubprojects, gn as map, ht as filterSourceFiles, in as warmOxlintWorkerPool, j as Git, jt as isPathInsideDirectory, k as DIAGNOSTIC_DELTA_IDENTITY, kt as hashFileContents, l as getRunId, ln as warn, lt as createInvocationCaches, mn as gen, mt as filterPathsOutsideDirectories, n as recordDistribution, nt as canonicalizeUserRuleKey, on as error, ot as computeConfigFingerprint, pt as filterDiagnosticsForSurface, q as SupplyChain, qt as resolveLintBatchOrdering, r as toSpanAttributes, rn as warmDuplicateJsxWorker, rt as classifyFileContext, st as computeDiagnosticDelta, t as recordCount, tt as calculateScore, un as Diagnostic, ut as createOxlintSpawnSlots, v as makeNoopConsole, vn as promise, w as detectRunnerOs, wn as sync, xn as provideService, y as CliInputError, yn as provide, z as OxlintSpawnSlots, zt as listWorkspacePackages } from "./record-metric-BNXhF2A-.js";
|
|
6
|
+
import { t as getTelemetryContext } from "./telemetry-runtime-CUn1--rM.js";
|
|
7
7
|
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-CCTgal0O.js";
|
|
8
|
-
import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-
|
|
8
|
+
import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-BpE5NDDX.js";
|
|
9
9
|
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
10
10
|
import { t as typescriptBinding } from "./_react-doctor_require-typescript-DXQDYeWK.js";
|
|
11
|
-
import { A as runGitAsync, C as isRecord, N as cliLogger, S as getPackageJsonPath, a as installReactDoctorScriptStep, c as spinner, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-
|
|
12
|
-
import { d as detectDefaultBranch, l as prompts, r as installReactDoctorWorkflow, u as isCommandAvailable } from "./install-github-workflow-
|
|
13
|
-
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, o as pickBlockingLevel } from "./resolve-scope-
|
|
14
|
-
import { n as resetSentryRunState, r as withRunSpan, t as recordSentryProjectContext } from "./with-run-span-
|
|
15
|
-
import { h as detectAvailableAgents, t as reportWorkflowResult } from "./report-workflow-result-
|
|
11
|
+
import { A as runGitAsync, C as isRecord, N as cliLogger, S as getPackageJsonPath, a as installReactDoctorScriptStep, c as spinner, j as runGitRaw, k as runGit, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-D5XbyGON.js";
|
|
12
|
+
import { d as detectDefaultBranch, l as prompts, r as installReactDoctorWorkflow, u as isCommandAvailable } from "./install-github-workflow-bsR3MAJ4.js";
|
|
13
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, o as pickBlockingLevel } from "./resolve-scope-_R9av4PA.js";
|
|
14
|
+
import { n as resetSentryRunState, r as withRunSpan, t as recordSentryProjectContext } from "./with-run-span-BsS7dU6e.js";
|
|
15
|
+
import { h as detectAvailableAgents, t as reportWorkflowResult } from "./report-workflow-result-keduRDKN.js";
|
|
16
16
|
import { createRequire } from "node:module";
|
|
17
17
|
import * as fs$2 from "node:fs";
|
|
18
18
|
import fs, { mkdtempSync, rmSync } from "node:fs";
|
|
@@ -20,9 +20,16 @@ import * as path$1 from "node:path";
|
|
|
20
20
|
import path from "node:path";
|
|
21
21
|
import { spawn } from "node:child_process";
|
|
22
22
|
import { tmpdir } from "node:os";
|
|
23
|
-
import crypto, { randomUUID } from "node:crypto";
|
|
23
|
+
import crypto, { createHash, randomUUID } from "node:crypto";
|
|
24
24
|
import * as fs$1 from "node:fs/promises";
|
|
25
25
|
import { performance } from "node:perf_hooks";
|
|
26
|
+
//#region src/cli/utils/compute-source-filter-config-hash.ts
|
|
27
|
+
const computeSourceFilterConfigHash = (input) => createHash("sha256").update(JSON.stringify({
|
|
28
|
+
textComponents: [...new Set(input.userConfig?.textComponents ?? [])].sort(),
|
|
29
|
+
rawTextWrapperComponents: [...new Set(input.userConfig?.rawTextWrapperComponents ?? [])].sort(),
|
|
30
|
+
respectInlineDisables: input.respectInlineDisables
|
|
31
|
+
})).digest("hex");
|
|
32
|
+
//#endregion
|
|
26
33
|
//#region src/cli/utils/apply-observability.ts
|
|
27
34
|
/**
|
|
28
35
|
* Installs the tracing backend for the inspect program.
|
|
@@ -512,6 +519,7 @@ const buildOutcomeAttributes = (input) => {
|
|
|
512
519
|
baseTotal: result.baselineDelta.baseTotalCount,
|
|
513
520
|
crossFileMatches: result.baselineDelta.crossFileMatchCount,
|
|
514
521
|
source: result.baselineDelta.source ?? "base",
|
|
522
|
+
ruleCountMatches: result.baselineDelta.ruleCountMatchCount ?? 0,
|
|
515
523
|
degraded: false
|
|
516
524
|
}));
|
|
517
525
|
else if (input.gateExempt) attributes["baseline.degraded"] = true;
|
|
@@ -1196,6 +1204,64 @@ const copyUnchangedBaselineSources = async (input) => {
|
|
|
1196
1204
|
})).every(Boolean);
|
|
1197
1205
|
};
|
|
1198
1206
|
//#endregion
|
|
1207
|
+
//#region src/cli/utils/read-baseline-line-map.ts
|
|
1208
|
+
const readBaselineLineMap = (directory, ref) => {
|
|
1209
|
+
const hunksByFile = /* @__PURE__ */ new Map();
|
|
1210
|
+
const revision = ref ? runGit(directory, [
|
|
1211
|
+
"rev-parse",
|
|
1212
|
+
"--verify",
|
|
1213
|
+
"--end-of-options",
|
|
1214
|
+
`${ref}^{commit}`
|
|
1215
|
+
]) : null;
|
|
1216
|
+
const patch = revision ? runGitRaw(directory, [
|
|
1217
|
+
"-c",
|
|
1218
|
+
"core.quotePath=false",
|
|
1219
|
+
"diff",
|
|
1220
|
+
"--no-ext-diff",
|
|
1221
|
+
"--no-textconv",
|
|
1222
|
+
"--unified=0",
|
|
1223
|
+
"--find-renames",
|
|
1224
|
+
"--relative",
|
|
1225
|
+
"--src-prefix=a/",
|
|
1226
|
+
"--dst-prefix=b/",
|
|
1227
|
+
revision,
|
|
1228
|
+
"--"
|
|
1229
|
+
]) : null;
|
|
1230
|
+
let currentHunks;
|
|
1231
|
+
for (const line of patch?.split("\n") ?? []) {
|
|
1232
|
+
if (line.startsWith("+++ ")) {
|
|
1233
|
+
currentHunks = [];
|
|
1234
|
+
const headerPath = line.slice(4).replace(/\t$/, "");
|
|
1235
|
+
let filePath = headerPath;
|
|
1236
|
+
if (headerPath.startsWith("\"")) try {
|
|
1237
|
+
filePath = JSON.parse(headerPath);
|
|
1238
|
+
} catch {
|
|
1239
|
+
continue;
|
|
1240
|
+
}
|
|
1241
|
+
if (filePath.startsWith("b/")) hunksByFile.set(filePath.slice(2), currentHunks);
|
|
1242
|
+
continue;
|
|
1243
|
+
}
|
|
1244
|
+
const hunk = /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/.exec(line);
|
|
1245
|
+
if (!hunk || !currentHunks) continue;
|
|
1246
|
+
currentHunks.push({
|
|
1247
|
+
baseStart: Number(hunk[1]),
|
|
1248
|
+
baseCount: hunk[2] === void 0 ? 1 : Number(hunk[2]),
|
|
1249
|
+
headStart: Number(hunk[3]),
|
|
1250
|
+
headCount: hunk[4] === void 0 ? 1 : Number(hunk[4])
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
return (filePath, baseLine) => {
|
|
1254
|
+
let lineOffset = 0;
|
|
1255
|
+
for (const hunk of hunksByFile.get(filePath) ?? []) {
|
|
1256
|
+
if (baseLine < hunk.baseStart) break;
|
|
1257
|
+
if (hunk.baseCount > 0 && baseLine < hunk.baseStart + hunk.baseCount) return hunk.headStart + Math.min(baseLine - hunk.baseStart, Math.max(0, hunk.headCount - 1));
|
|
1258
|
+
if (hunk.baseCount === 0 && baseLine === hunk.baseStart) break;
|
|
1259
|
+
lineOffset = hunk.headStart + Math.max(1, hunk.headCount) - (hunk.baseStart + Math.max(1, hunk.baseCount));
|
|
1260
|
+
}
|
|
1261
|
+
return baseLine + lineOffset;
|
|
1262
|
+
};
|
|
1263
|
+
};
|
|
1264
|
+
//#endregion
|
|
1199
1265
|
//#region src/cli/utils/read-diagnostic-evidence.ts
|
|
1200
1266
|
const SOURCE_EXTENSIONS = [
|
|
1201
1267
|
".ts",
|
|
@@ -1746,6 +1812,7 @@ const runBaselineComparison = async (input) => {
|
|
|
1746
1812
|
const diagnosticDelta = computeDiagnosticDelta({
|
|
1747
1813
|
headDiagnostics: input.headDiagnostics,
|
|
1748
1814
|
renamedFiles: snapshot.renamedFiles ?? {},
|
|
1815
|
+
mapBaseLine: readBaselineLineMap(input.directory, input.baselineRef),
|
|
1749
1816
|
baseDiagnostics: withDiagnosticFingerprints(snapshot.tempDirectory, baseOutput.diagnostics),
|
|
1750
1817
|
readHeadLine: () => null,
|
|
1751
1818
|
readBaseLine: () => null
|
|
@@ -1758,7 +1825,8 @@ const runBaselineComparison = async (input) => {
|
|
|
1758
1825
|
matchedCount: baseOutput.diagnostics.length - diagnosticDelta.fixedCount,
|
|
1759
1826
|
fixedCount: hasUnscannedUntrackedSourceFiles ? 0 : diagnosticDelta.fixedCount,
|
|
1760
1827
|
baseTotalCount: baseOutput.diagnostics.length,
|
|
1761
|
-
crossFileMatchCount: diagnosticDelta.crossFileMatchCount
|
|
1828
|
+
crossFileMatchCount: diagnosticDelta.crossFileMatchCount,
|
|
1829
|
+
ruleCountMatchCount: diagnosticDelta.ruleCountMatchCount
|
|
1762
1830
|
}
|
|
1763
1831
|
};
|
|
1764
1832
|
} finally {
|
|
@@ -2269,6 +2337,11 @@ const inspectWithOxlintRuntime = async (directory, inputOptions, oxlintRuntime)
|
|
|
2269
2337
|
...inputOptions,
|
|
2270
2338
|
precomputedSourceFiles: void 0
|
|
2271
2339
|
}, userConfig);
|
|
2340
|
+
const sourceFilterConfigHash = computeSourceFilterConfigHash({
|
|
2341
|
+
userConfig,
|
|
2342
|
+
respectInlineDisables: options.respectInlineDisables
|
|
2343
|
+
});
|
|
2344
|
+
if (options.baselineReport && (options.baselineReport.sourceFilterConfigHash !== void 0 || options.baselineReport.diagnostics.length > 0) && options.baselineReport.sourceFilterConfigHash !== sourceFilterConfigHash) throw new CliInputError("The baseline uses different or unknown source-dependent filters. Regenerate the base --json report with the current textComponents, rawTextWrapperComponents, and respectInlineDisables settings, or use --scope changed --base <ref>.");
|
|
2272
2345
|
const ownsSpinnerSilence = options.silent && !isConcurrentScan;
|
|
2273
2346
|
const wasSpinnerSilent = isSpinnerSilent();
|
|
2274
2347
|
if (ownsSpinnerSilence) setSpinnerSilent(true);
|
|
@@ -2286,7 +2359,10 @@ const inspectWithOxlintRuntime = async (directory, inputOptions, oxlintRuntime)
|
|
|
2286
2359
|
}
|
|
2287
2360
|
}, { concurrentScan: isConcurrentScan });
|
|
2288
2361
|
if (!isConcurrentScan) resetSentryRunState();
|
|
2289
|
-
return
|
|
2362
|
+
return {
|
|
2363
|
+
...result,
|
|
2364
|
+
sourceFilterConfigHash
|
|
2365
|
+
};
|
|
2290
2366
|
} finally {
|
|
2291
2367
|
if (ownsSpinnerSilence) setSpinnerSilent(wasSpinnerSilent);
|
|
2292
2368
|
}
|
|
@@ -2391,11 +2467,20 @@ const runInspectWithRuntime = async (directory, options, userConfig, hasConfigOv
|
|
|
2391
2467
|
let inspectDiagnostics = headDiagnostics;
|
|
2392
2468
|
let baselineDelta;
|
|
2393
2469
|
if (options.baselineReport && !didLintFail && !output.didDeadCodeFail && countIncompleteLintFiles(output.lintPartialFailures) === 0) {
|
|
2394
|
-
const baseDiagnostics = options.baselineReport.diagnostics
|
|
2470
|
+
const baseDiagnostics = mergeAndFilterDiagnostics(options.baselineReport.diagnostics.filter((diagnostic) => {
|
|
2471
|
+
const metadata = getRuleMetadata(diagnostic.plugin, diagnostic.rule);
|
|
2472
|
+
if (!metadata) return true;
|
|
2473
|
+
if (metadata.tags.some((tag) => options.ignoredTags.has(tag))) return false;
|
|
2474
|
+
return options.includedTags.size === 0 || metadata.tags.some((tag) => options.includedTags.has(tag));
|
|
2475
|
+
}), directory, userConfig, () => null, {
|
|
2476
|
+
respectInlineDisables: false,
|
|
2477
|
+
warnings: options.warnings
|
|
2478
|
+
});
|
|
2395
2479
|
const delta = computeDiagnosticDelta({
|
|
2396
2480
|
headDiagnostics,
|
|
2397
2481
|
baseDiagnostics,
|
|
2398
2482
|
renamedFiles: options.baselineReport.renamedFiles ?? {},
|
|
2483
|
+
mapBaseLine: readBaselineLineMap(directory, options.baselineReport.sourceRevision),
|
|
2399
2484
|
readHeadLine: () => null,
|
|
2400
2485
|
readBaseLine: () => null
|
|
2401
2486
|
});
|
|
@@ -2407,7 +2492,8 @@ const runInspectWithRuntime = async (directory, options, userConfig, hasConfigOv
|
|
|
2407
2492
|
matchedCount: baseDiagnostics.length - delta.fixedCount,
|
|
2408
2493
|
baseTotalCount: baseDiagnostics.length,
|
|
2409
2494
|
fixedCount: delta.fixedCount,
|
|
2410
|
-
crossFileMatchCount: delta.crossFileMatchCount
|
|
2495
|
+
crossFileMatchCount: delta.crossFileMatchCount,
|
|
2496
|
+
ruleCountMatchCount: delta.ruleCountMatchCount
|
|
2411
2497
|
};
|
|
2412
2498
|
} else if (options.baseline && isDiffMode && !didLintFail && !output.didDeadCodeFail && countIncompleteLintFiles(output.lintPartialFailures) === 0) {
|
|
2413
2499
|
const comparison = await runBaselineComparison({
|
|
@@ -3084,5 +3170,5 @@ const shouldFailScanGate = (input) => {
|
|
|
3084
3170
|
//#endregion
|
|
3085
3171
|
export { createInvocationInspect as A, hasIncompleteScoreAnalysis as B, detectLaunchableAgents as C, buildHandoffPayload as D, launchCliAgent as E, formatSkippedCheckLabel as F, hasLintHardFailure as G, buildNoScoreMessage as H, formatElapsedTime as I, formatFixRecipeLine as J, buildRulePriorityMap as K, printFooter as L, resolveMergeBaseRef as M, printHeadlessReport as N, collectProjectSourceFiles as O, pluralize as P, printDiagnosticsDump as R, setUpGitHubActions as S, copyToClipboard as T, buildEmptyReportMessage as U, filterDiagnosticsByCategories as V, resolveInvocationOxlintConcurrency as W, formatLearnMoreLine as Y, retryMissingProjectScores as _, validateModeFlags as a, filterScansForSurface as b, partitionProjectScanOutcomes as c, buildCodeFrame as d, resolveProjectScan as f, resolveProjectRelativeDirectory as g, resolveProjectSourceFilePaths as h, validateIncludeUntrackedScope as i, inspect as j, deduplicateProjectScans as k, discoverWorkspacePackages as l, resolveProjectDiffIncludePaths as m, formatSkippedProjectsMessage as n, resolveExcludedProjectDirectories as o, resolveProjectChangedLineRanges as p, buildSortedRuleGroups as q, validateFilePathSelectionFlags as r, projectManifestChanged as s, shouldFailScanGate as t, selectProjects as u, resolveWorkspaceDeadCodeOwner as v, CLI_AGENT_BINARIES as w, countUniqueScannedFiles as x, resolveCliInspectOptions as y, formatDiagnosticSite as z };
|
|
3086
3172
|
|
|
3087
|
-
//# sourceMappingURL=should-fail-scan-gate-
|
|
3088
|
-
//# debugId=
|
|
3173
|
+
//# sourceMappingURL=should-fail-scan-gate-DobEL_kS.js.map
|
|
3174
|
+
//# debugId=e48b769a-9844-5e61-94ac-3094eebbccc5
|
|
@@ -1,10 +1,10 @@
|
|
|
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 } 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]="728003f8-3cb5-5513-a28e-b45bb3c50a37")}catch(e){}}();
|
|
3
|
+
import { b as isNonInteractiveEnvironment } from "./record-metric-BNXhF2A-.js";
|
|
4
4
|
//#region src/cli/utils/should-skip-prompts.ts
|
|
5
5
|
const shouldSkipPrompts = (input = {}) => Boolean(input.yes) || Boolean(input.json) || isNonInteractiveEnvironment() || !process.stdin.isTTY;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { shouldSkipPrompts as t };
|
|
8
8
|
|
|
9
|
-
//# sourceMappingURL=should-skip-prompts-
|
|
10
|
-
//# debugId=
|
|
9
|
+
//# sourceMappingURL=should-skip-prompts-CGTEgq2F.js.map
|
|
10
|
+
//# debugId=728003f8-3cb5-5513-a28e-b45bb3c50a37
|
|
@@ -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 } 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]="02569640-91b6-50fe-8744-090eecaece6b")}catch(e){}}();
|
|
3
|
+
import { b as isNonInteractiveEnvironment } from "./record-metric-BNXhF2A-.js";
|
|
4
4
|
//#region src/cli/utils/resolve-tui-environment.ts
|
|
5
5
|
const resolveTuiEnvironment = (outputIsTty = process.stdout.isTTY === true) => ({
|
|
6
6
|
isNonInteractiveEnvironment: isNonInteractiveEnvironment(),
|
|
@@ -21,5 +21,5 @@ const shouldUseTui = (input) => {
|
|
|
21
21
|
//#endregion
|
|
22
22
|
export { shouldUseTui as n, resolveTuiEnvironment as r, isTuiEnvironmentSupported as t };
|
|
23
23
|
|
|
24
|
-
//# sourceMappingURL=should-use-tui
|
|
25
|
-
//# debugId=
|
|
24
|
+
//# sourceMappingURL=should-use-tui-DG2l-Td3.js.map
|
|
25
|
+
//# debugId=02569640-91b6-50fe-8744-090eecaece6b
|
|
@@ -63,4 +63,4 @@ npx react-doctor@latest --verbose --scope changed
|
|
|
63
63
|
|
|
64
64
|
### Reuse a base scan
|
|
65
65
|
|
|
66
|
-
Save a complete `--json` scan, then pass `--baseline base-report.json` to report only new findings. This also works with `--scope changed`. Use the same version and rules for both scans.
|
|
66
|
+
Save a complete `--json` scan, then pass `--baseline base-report.json` to report only new findings. This also works with `--scope changed`. Use the same version and rules for both scans. Findings are grouped by rule and file path, following Git renames. Only increases in each group's count are reported; groups without an increase skip location matching. Fingerprints, message similarity, and Git-adjusted line distance select the added findings. Formatting and edits that keep the same counts report no new findings. Saved reports must use the same `textComponents`, `rawTextWrapperComponents`, and `respectInlineDisables` settings. Regenerate the base report after changing these settings, or use a Git comparison. Older reports without fingerprints or `sourceFilterConfigHash` must be regenerated.
|
|
@@ -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 { $ as warmReactCompilerDetection, A as buildGitSourceListingRequest, I as prefetchGitCommand, K as resolveReactDoctorCacheDir, L as prespawnOxlintWorkers, M as buildOxlintWorkerSpawnSpec, W as resolveOxlintWorkerRuntime, _ as SCAN_PREAMBLE_SKIP_FLAGS, g as RUN_GIT_MAX_BUFFER_BYTES, j as buildOxlintChildEnv, q as resolveScanConcurrency, y as SCAN_RESULT_CACHE_GIT_ARGUMENTS, z as resolveConfiguredScanConcurrency } from "./constants-
|
|
4
|
-
import { t as isCacheGloballyDisabled } from "./is-cache-globally-disabled-
|
|
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]="0ecf30ea-9d69-54a7-a97a-7e36bd014c63")}catch(e){}}();
|
|
3
|
+
import { $ as warmReactCompilerDetection, A as buildGitSourceListingRequest, I as prefetchGitCommand, K as resolveReactDoctorCacheDir, L as prespawnOxlintWorkers, M as buildOxlintWorkerSpawnSpec, W as resolveOxlintWorkerRuntime, _ as SCAN_PREAMBLE_SKIP_FLAGS, g as RUN_GIT_MAX_BUFFER_BYTES, j as buildOxlintChildEnv, q as resolveScanConcurrency, y as SCAN_RESULT_CACHE_GIT_ARGUMENTS, z as resolveConfiguredScanConcurrency } from "./constants-DHn5rUeg.js";
|
|
4
|
+
import { t as isCacheGloballyDisabled } from "./is-cache-globally-disabled-DDlh_f1u.js";
|
|
5
5
|
import * as fs$1 from "node:fs";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
//#region src/cli/utils/resolve-prefetch-scan-directory.ts
|
|
@@ -64,5 +64,5 @@ try {
|
|
|
64
64
|
//#endregion
|
|
65
65
|
export {};
|
|
66
66
|
|
|
67
|
-
//# sourceMappingURL=start-scan-preamble-
|
|
68
|
-
//# debugId=
|
|
67
|
+
//# sourceMappingURL=start-scan-preamble-BPz3nzCQ.js.map
|
|
68
|
+
//# debugId=0ecf30ea-9d69-54a7-a97a-7e36bd014c63
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./start-scan-preamble-
|
|
1
|
+
import "./start-scan-preamble-BPz3nzCQ.js";
|
|
2
2
|
export {};
|
|
3
|
-
!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]="
|
|
4
|
-
//# debugId=
|
|
3
|
+
!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]="3be9ee49-d3de-5162-8cf9-ad3d9b8b20b9")}catch(e){}}();
|
|
4
|
+
//# debugId=3be9ee49-d3de-5162-8cf9-ad3d9b8b20b9
|
|
@@ -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 { S as SENTRY_FLUSH_TIMEOUT_MS } 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]="d3677805-d716-5732-9fc0-4c777cf8b48f")}catch(e){}}();
|
|
3
|
+
import { S as SENTRY_FLUSH_TIMEOUT_MS } from "./constants-DHn5rUeg.js";
|
|
4
|
+
import { Cn as runSync, Dn as buildWithScope, It as layerObservability, J as anonymizeInPlace, Mn as makeUnsafe, Mt as isProjectDiscoveryError, Nt as isReactDoctorError, Pn as void_, Rn as messageFromUnknown, Sn as runPromise, Vn as isErrnoException, Y as anonymizeText, Zt as scrubSensitivePaths, _ as VERSION, a as isEnvFlagEnabled, i as isTelemetryEnabled, jn as close, o as buildSentryScope, pn as make, y as CliInputError } from "./record-metric-BNXhF2A-.js";
|
|
5
5
|
//#region src/cli/utils/is-environment-error.ts
|
|
6
6
|
const ENVIRONMENT_ERROR_CODES = new Set([
|
|
7
7
|
"EACCES",
|
|
@@ -212,13 +212,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
212
212
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
213
213
|
* standard `SENTRY_RELEASE` override.
|
|
214
214
|
*/
|
|
215
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.
|
|
215
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.17`;
|
|
216
216
|
/**
|
|
217
217
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
218
218
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
219
219
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
220
220
|
*/
|
|
221
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.
|
|
221
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.17") ? "development" : "production");
|
|
222
222
|
//#endregion
|
|
223
223
|
//#region src/instrument.ts
|
|
224
224
|
let sentryPromise = null;
|
|
@@ -396,5 +396,5 @@ const shutdownTelemetry = async () => {
|
|
|
396
396
|
//#endregion
|
|
397
397
|
export { initializeSentry as a, isNpmCacheCorruptionError as c, getSentry as i, formatEnvironmentError as l, shutdownTelemetry as n, isExpectedUserError as o, flushSentry as r, formatNpmCacheCorruptionError as s, getTelemetryContext as t, isEnvironmentError as u };
|
|
398
398
|
|
|
399
|
-
//# sourceMappingURL=telemetry-runtime-
|
|
400
|
-
//# debugId=
|
|
399
|
+
//# sourceMappingURL=telemetry-runtime-CUn1--rM.js.map
|
|
400
|
+
//# debugId=d3677805-d716-5732-9fc0-4c777cf8b48f
|
|
@@ -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 { u as METRIC } from "./constants-
|
|
4
|
-
import { _ as VERSION, t as recordCount } 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]="c08e6b2d-bff8-56e6-b74e-772c2cbddf7a")}catch(e){}}();
|
|
3
|
+
import { u as METRIC } from "./constants-DHn5rUeg.js";
|
|
4
|
+
import { _ as VERSION, t as recordCount } from "./record-metric-BNXhF2A-.js";
|
|
5
5
|
//#region src/cli/commands/version.ts
|
|
6
6
|
/**
|
|
7
7
|
* oclif-style version line. 12-factor CLI Apps (#3, "What version am I
|
|
@@ -18,5 +18,5 @@ const versionAction = () => {
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { versionAction };
|
|
20
20
|
|
|
21
|
-
//# sourceMappingURL=version-
|
|
22
|
-
//# debugId=
|
|
21
|
+
//# sourceMappingURL=version-CbFBCUY9.js.map
|
|
22
|
+
//# debugId=c08e6b2d-bff8-56e6-b74e-772c2cbddf7a
|
|
@@ -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]="c6d94df1-9f0c-5a18-a7f6-afa2b911e8b4")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-BEMrqB0D.js";
|
|
4
4
|
//#region src/cli/commands/why.ts
|
|
5
5
|
/**
|
|
6
6
|
* `why <file:line>` — explains why a rule fired (or why a suppression didn't
|
|
@@ -17,5 +17,5 @@ const whyAction = async (location, options) => {
|
|
|
17
17
|
//#endregion
|
|
18
18
|
export { whyAction };
|
|
19
19
|
|
|
20
|
-
//# sourceMappingURL=why-
|
|
21
|
-
//# debugId=
|
|
20
|
+
//# sourceMappingURL=why-BIX2FUbP.js.map
|
|
21
|
+
//# debugId=c6d94df1-9f0c-5a18-a7f6-afa2b911e8b4
|
|
@@ -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 { p as NANOSECONDS_PER_MILLISECOND } from "./constants-
|
|
4
|
-
import {
|
|
5
|
-
import { t as getTelemetryContext } 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]="f29dc02c-129d-5cc3-a3a3-0b4995c2419a")}catch(e){}}();
|
|
3
|
+
import { p as NANOSECONDS_PER_MILLISECOND } from "./constants-DHn5rUeg.js";
|
|
4
|
+
import { Cn as runSync, Nn as fail, Pn as void_, bn as provideContext, c as setSentryProjectInfo, hn as makeSpan, o as buildSentryScope, r as toSpanAttributes, s as buildSentryProjectContext } from "./record-metric-BNXhF2A-.js";
|
|
5
|
+
import { t as getTelemetryContext } from "./telemetry-runtime-CUn1--rM.js";
|
|
6
6
|
import { i as setActiveRunTrace, r as recordRunTraceId } from "./active-run-trace-Dewycxda.js";
|
|
7
7
|
//#region src/cli/utils/with-run-span.ts
|
|
8
8
|
/**
|
|
@@ -107,5 +107,5 @@ const recordSentryProjectContext = (projectInfo, rootSpan, options = {}) => {
|
|
|
107
107
|
//#endregion
|
|
108
108
|
export { resetSentryRunState as n, withRunSpan as r, recordSentryProjectContext as t };
|
|
109
109
|
|
|
110
|
-
//# sourceMappingURL=with-run-span-
|
|
111
|
-
//# debugId=
|
|
110
|
+
//# sourceMappingURL=with-run-span-BsS7dU6e.js.map
|
|
111
|
+
//# debugId=f29dc02c-129d-5cc3-a3a3-0b4995c2419a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"typescript": ">=5.0.4 <6",
|
|
71
71
|
"yaml": "^2.9.0",
|
|
72
72
|
"yoga-layout": "~3.2.1",
|
|
73
|
-
"oxlint-plugin-react-doctor": "0.9.
|
|
73
|
+
"oxlint-plugin-react-doctor": "0.9.17"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/babel__code-frame": "^7.27.0",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"ora": "^9.4.0",
|
|
84
84
|
"react": "19.2.5",
|
|
85
85
|
"react-devtools-core": "^7.0.1",
|
|
86
|
-
"@react-doctor/api": "0.9.
|
|
87
|
-
"@react-doctor/core": "0.9.
|
|
86
|
+
"@react-doctor/api": "0.9.17",
|
|
87
|
+
"@react-doctor/core": "0.9.17"
|
|
88
88
|
},
|
|
89
89
|
"engines": {
|
|
90
90
|
"node": "^20.19.0 || >=22.13.0"
|