react-doctor 0.9.12 → 0.9.13-dev.1239043

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.
Files changed (52) hide show
  1. package/README.md +34 -1
  2. package/bin/react-doctor.js +1 -9
  3. package/dist/active-run-trace-dlIZeEvb.js +18 -0
  4. package/dist/active-scan-abort-registry-DwG6tSPy.js +28 -0
  5. package/dist/{build-section-divider-BsQvH-7I.js → build-section-divider-C09RcJrc.js} +10 -25
  6. package/dist/{ci-B4x4RjKD.js → ci-CUgNjCr-.js} +13 -12
  7. package/dist/cli.js +121 -41
  8. package/dist/{design-A48PNCf_.js → design-CX2j8ubS.js} +4 -4
  9. package/dist/{devtools-DPRVRu3S.js → devtools-CC2PAZ85.js} +4 -4
  10. package/dist/{exit-gracefully-Bk531kS-.js → exit-gracefully-cGJM2g3O.js} +15 -9
  11. package/dist/get-east-asian-width-Bv2TD3Xj.js +444 -0
  12. package/dist/{report-error-Pb2uO8EG.js → handle-error-BCI-Nv3P.js} +18 -68
  13. package/dist/index.d.ts +53 -42
  14. package/dist/index.js +55146 -54688
  15. package/dist/{inspect-CwH84aSA.js → inspect-Dq5krKWG.js} +47 -34
  16. package/dist/{install-sFN_w425.js → install-C0aiZKgf.js} +9 -8
  17. package/dist/{install-doctor-script-DLayXS7q.js → install-doctor-script-CaTIms0r.js} +7 -449
  18. package/dist/{install-github-workflow-Goz-KFqb.js → install-github-workflow-DjPgXVqg.js} +10 -6
  19. package/dist/{install-react-doctor-Bq7dfEBI.js → install-react-doctor-C-PVDWXv.js} +47 -45
  20. package/dist/{run-scan-app-DXBMW54J.js → jsx-runtime-D_A4d39v.js} +281 -2759
  21. package/dist/path-format-DnHpmJwG.js +9 -0
  22. package/dist/{print-branded-header-D_J8Qdsj.js → print-branded-header-Dz0SwyHQ.js} +4 -4
  23. package/dist/project-analysis-worker.d.ts +1 -0
  24. package/dist/project-analysis-worker.js +51905 -0
  25. package/dist/prompt-runtime-scan-url-BXdY2Opw.js +240 -0
  26. package/dist/{read-object-file-Hk79zI91.js → read-object-file-CmMGK1uu.js} +4 -4
  27. package/dist/{record-metric-CsQXJewH.js → record-metric-B6T_Ej33.js} +3285 -6018
  28. package/dist/report-error-DwL3b99q.js +64 -0
  29. package/dist/{report-workflow-result-6n_wSqzA.js → report-workflow-result-5PueDIAr.js} +5 -5
  30. package/dist/{resolve-scope-DP6rYlNO.js → resolve-scope-CTlLl7e6.js} +8 -10
  31. package/dist/{rules-BnIZ4Fq_.js → rules-DEbHKRag.js} +6 -6
  32. package/dist/run-scan-app-D3huvmXJ.js +2517 -0
  33. package/dist/runtime-scan/browser-probe.iife.js +855 -0
  34. package/dist/runtime-scan-CHFAEYg3.js +770 -0
  35. package/dist/sanitize-runtime-url-Bbq40iIp.js +76 -0
  36. package/dist/scan-C7sCm7wi.js +47 -0
  37. package/dist/semver-DFtnEmN-.js +3219 -0
  38. package/dist/{should-fail-scan-gate-DzZuTxim.js → should-fail-scan-gate-CfG_ppAV.js} +188 -187
  39. package/dist/{should-skip-prompts-D1GWG2qN.js → should-skip-prompts-BuNtAVEs.js} +4 -4
  40. package/dist/should-use-tui-B-lCjXVG.js +25 -0
  41. package/dist/skills/improve-threejs/SKILL.md +102 -0
  42. package/dist/skills/performance/SKILL.md +113 -0
  43. package/dist/skills/react-doctor/SKILL.md +6 -0
  44. package/dist/{unref-stdin-0a_0uwC6.js → telemetry-runtime-BF83aBFL.js} +57 -33
  45. package/dist/unref-stdin-SK3WfwxS.js +12 -0
  46. package/dist/{version-Bo5QDp7F.js → version-C27gr4Qj.js} +4 -4
  47. package/dist/{why-BFYbtnm8.js → why-CYRkZ2VY.js} +4 -4
  48. package/dist/with-run-span-CdsXSJgE.js +110 -0
  49. package/package.json +9 -10
  50. package/dist/chunk-q7NCDQ7-.js +0 -28
  51. package/dist/lsp.js +0 -81145
  52. package/dist/scan-CnnXz78m.js +0 -53
@@ -1,17 +1,19 @@
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]="84ff2f1c-e3ef-5496-9c58-6dddc98717fc")}catch(e){}}();
3
- import { Cn as mapWithConcurrency, Dn as remainingDeadlineBudgetMs, En as messageFromUnknown, F as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, G as isCiOrCodingAgentEnvironment, Gt as discoverReactSubprojects, K as isCodingAgentEnvironment, Mn as resolveScanTarget, Nt as buildJsonReport, Ot as StagedFiles, P as STAGED_FILES_TEMP_DIR_PREFIX, Qt as getBaselineDiffPlan, R as CliInputError, Tt as STAGED_FILES_PROJECT_CONFIG_FILENAMES, V as isDebugFlagEnabled, Wt as detectAiTrainingEnvironment, Xn as gen, Y as CANONICAL_GITHUB_URL, Yt as findLegacyConfig, cn as highlighter, ct as Git, dr as provide, en as getChangedLineRanges, f as setJsonReportDirectory, g as VERSION, h as writeJsonReport, ir as runPromise, m as writeJsonErrorReport, mn as isPlainObject, n as recordDistribution, nn as getDiffInfo, on as hasSupportedFrameworkOrLibrary, p as setJsonReportMode, pn as isPathInsideDirectory, t as recordCount, tr as provide$1, u as enableJsonMode, un as isErrnoException, w as METRIC, xn as listWorkspacePackages, zn as toRelativePath } from "./record-metric-CsQXJewH.js";
4
- import { c as isExpectedUserError, s as shutdownTelemetry } from "./unref-stdin-0a_0uwC6.js";
5
- import { i as flushSentry } from "./build-section-divider-BsQvH-7I.js";
6
- import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-Pb2uO8EG.js";
7
- import { F as runGitRaw, L as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-DLayXS7q.js";
8
- import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-Goz-KFqb.js";
9
- 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-DP6rYlNO.js";
10
- import { t as shouldSkipPrompts } from "./should-skip-prompts-D1GWG2qN.js";
11
- import { A as resolveMergeBaseRef, B as buildEmptyReportMessage, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, F as printDiagnosticsDump, O as createInvocationInspect, R as filterDiagnosticsByCategories, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, _ 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 } from "./should-fail-scan-gate-DzZuTxim.js";
12
- 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-6n_wSqzA.js";
13
- import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithLegacyShellHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-Bq7dfEBI.js";
14
- import { t as readObjectFile } from "./read-object-file-Hk79zI91.js";
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]="a848d2ef-3d8d-5de6-8dea-5b757aa38c3e")}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, 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-B6T_Ej33.js";
4
+ import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-BF83aBFL.js";
5
+ import { r as flushSentry } from "./build-section-divider-C09RcJrc.js";
6
+ import { n as handleUserError, t as handleError } from "./handle-error-BCI-Nv3P.js";
7
+ import { t as reportErrorToSentry } from "./report-error-DwL3b99q.js";
8
+ import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
9
+ 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-CaTIms0r.js";
10
+ import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-DjPgXVqg.js";
11
+ import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-CTlLl7e6.js";
12
+ import { t as shouldSkipPrompts } from "./should-skip-prompts-BuNtAVEs.js";
13
+ import { A as createInvocationInspect, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, M as resolveMergeBaseRef, N as printHeadlessReport, O as collectProjectSourceFileCounts, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, _ as retryMissingProjectScores, a as validateModeFlags, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, g as resolveProjectRelativeDirectory, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, j as inspect, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, s as projectManifestChanged, t as shouldFailScanGate, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions } from "./should-fail-scan-gate-CfG_ppAV.js";
14
+ 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-5PueDIAr.js";
15
+ 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-C-PVDWXv.js";
16
+ import { t as readObjectFile } from "./read-object-file-CmMGK1uu.js";
15
17
  import * as path$1 from "node:path";
16
18
  import * as fs$1 from "node:fs";
17
19
  import { tmpdir } from "node:os";
@@ -315,17 +317,18 @@ const PROJECT_MIGRATIONS = [
315
317
  },
316
318
  {
317
319
  id: "agent-hooks-sh-to-mjs",
320
+ version: 2,
318
321
  scope: "project",
319
322
  run: ({ projectRoot }) => {
320
323
  if (projectRoot === void 0) return false;
321
- const agents = findAgentsWithLegacyShellHooks(projectRoot);
324
+ const agents = findAgentsWithOutdatedReactDoctorHooks(projectRoot);
322
325
  if (agents.length === 0) return false;
323
326
  installReactDoctorAgentHooks({
324
327
  projectRoot,
325
328
  agents
326
329
  });
327
- cliLogger.success(`Upgraded the legacy react-doctor.sh agent hook to the Node hook (${agents.join(", ")})`);
328
- cliLogger.dim(" The shell hook can't run on Windows and would double-scan next to the current hook. Review and commit the change.");
330
+ cliLogger.success(`Moved React Doctor agent hooks to end-of-turn checks (${agents.join(", ")})`);
331
+ cliLogger.dim(" Hooks now scan changed and untracked files once when the agent stops. Review and commit the change.");
329
332
  cliLogger.break();
330
333
  return true;
331
334
  }
@@ -474,7 +477,7 @@ const buildDiagnosticIssueUrl = (input) => {
474
477
  const findOwningProjectDirectory = (rootDirectory, filePath) => {
475
478
  const absoluteFile = path$1.isAbsolute(filePath) ? filePath : path$1.resolve(rootDirectory, filePath);
476
479
  const workspacePackages = listWorkspacePackages(rootDirectory);
477
- const candidates = workspacePackages.length > 0 ? workspacePackages : discoverReactSubprojects(rootDirectory);
480
+ const candidates = workspacePackages.length > 0 ? workspacePackages : discoverSupportedSubprojects(rootDirectory);
478
481
  if (candidates.length === 0) return rootDirectory;
479
482
  let bestMatch = null;
480
483
  for (const candidate of candidates) {
@@ -1092,11 +1095,11 @@ const runStagedInspect = async (input) => {
1092
1095
  };
1093
1096
  //#endregion
1094
1097
  //#region src/cli/commands/inspect.ts
1095
- const buildChangedFilesDiffInfo = (changedFiles) => ({
1098
+ const buildFileSelectionDiffInfo = (filePaths) => ({
1096
1099
  currentBranch: process.env.GITHUB_HEAD_REF?.trim() || null,
1097
1100
  baseBranch: process.env.GITHUB_BASE_REF?.trim() || "pull request target",
1098
1101
  baseSha: process.env.REACT_DOCTOR_BASE_SHA?.trim() || void 0,
1099
- changedFiles,
1102
+ changedFiles: [...filePaths],
1100
1103
  isCurrentChanges: false
1101
1104
  });
1102
1105
  const hasScanDeadlineExpired = (scanDeadlineEpochMs) => scanDeadlineEpochMs !== void 0 && remainingDeadlineBudgetMs(scanDeadlineEpochMs) === 0;
@@ -1113,7 +1116,7 @@ const buildProjectInspectOptions = ({ context, projectScan, projectScanPlan, own
1113
1116
  configSourceDirectory: projectScan.configSourceDirectory ?? void 0,
1114
1117
  suppressRendering: context.isMultiProject,
1115
1118
  concurrentScan: context.isMultiProject,
1116
- excludedProjectDirectories: context.projectScans.filter((candidateProjectScan) => isPathInsideDirectory(candidateProjectScan.directory, scanDirectory)).map((candidateProjectScan) => candidateProjectScan.directory),
1119
+ excludedProjectDirectories: resolveExcludedProjectDirectories(scanDirectory, [...context.projectScans.map((candidateProjectScan) => candidateProjectScan.directory), ...context.workspaceProjectDirectories]),
1117
1120
  retainExcludedProjectDeadCodeDiagnostics: ownsWorkspaceDeadCode,
1118
1121
  baseline: context.baselineRef !== null && projectScanPlan.projectBaselineBaseFiles !== null && projectScanPlan.projectBaselineHeadFiles !== null ? {
1119
1122
  ref: context.baselineRef,
@@ -1183,7 +1186,7 @@ const maybeMigrateLegacyConfig = async (requestedDirectory, { isQuiet, isStaged
1183
1186
  if (!(!isQuiet && !isStaged && process.stdout.isTTY === true && !isCiOrCodingAgentEnvironment())) return;
1184
1187
  await runProjectMigrations(requestedDirectory);
1185
1188
  };
1186
- const inspectAction = async (directory, flags, invocationCommand = "inspect") => {
1189
+ const inspectAction = async (directory, flags, invocationCommand = "inspect", selectedFilePaths) => {
1187
1190
  const isScoreOnly = Boolean(flags.score);
1188
1191
  const isJsonMode = Boolean(flags.json);
1189
1192
  const isQuiet = isScoreOnly || isJsonMode;
@@ -1258,16 +1261,18 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1258
1261
  });
1259
1262
  return;
1260
1263
  }
1264
+ const workspaceProjectDirectories = discoverWorkspacePackages(resolvedDirectory).map((workspacePackage) => workspacePackage.directory);
1261
1265
  const projectDirectories = await selectProjects(resolvedDirectory, flags.project, skipPrompts, userConfig?.projects);
1262
1266
  const projectSelectionCompletedTime = performance.now();
1263
- let changedFilesDiffInfo = flags.changedFilesFrom ? buildChangedFilesDiffInfo(readChangedFilesFrom(path$1.resolve(flags.changedFilesFrom))) : null;
1264
- if (changedFilesDiffInfo !== null && scanTarget.didRedirectViaRootDir) {
1267
+ const hasPositionalFileSelection = selectedFilePaths !== void 0;
1268
+ let providedFilesDiffInfo = hasPositionalFileSelection ? buildFileSelectionDiffInfo(selectedFilePaths) : flags.changedFilesFrom ? buildFileSelectionDiffInfo(readChangedFilesFrom(path$1.resolve(flags.changedFilesFrom))) : null;
1269
+ if (providedFilesDiffInfo !== null && requestedDirectory !== resolvedDirectory) {
1265
1270
  const relativeProjectDirectory = resolveProjectRelativeDirectory(requestedDirectory, resolvedDirectory);
1266
1271
  if (relativeProjectDirectory) {
1267
1272
  const projectPrefix = `${relativeProjectDirectory}/`;
1268
- changedFilesDiffInfo = {
1269
- ...changedFilesDiffInfo,
1270
- changedFiles: changedFilesDiffInfo.changedFiles.flatMap((filePath) => {
1273
+ providedFilesDiffInfo = {
1274
+ ...providedFilesDiffInfo,
1275
+ changedFiles: providedFilesDiffInfo.changedFiles.flatMap((filePath) => {
1271
1276
  return filePath.startsWith(projectPrefix) ? [filePath.slice(projectPrefix.length)] : [];
1272
1277
  })
1273
1278
  };
@@ -1275,7 +1280,11 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1275
1280
  }
1276
1281
  const requestedScope = resolveScope(flags, userConfig);
1277
1282
  const includeUntracked = flags.includeUntracked ?? false;
1278
- const scopeRequest = requestedScope.scope === void 0 && changedFilesDiffInfo !== null ? {
1283
+ const scopeRequest = hasPositionalFileSelection ? {
1284
+ scope: "files",
1285
+ base: void 0,
1286
+ usedDeprecatedDiff: false
1287
+ } : requestedScope.scope === void 0 && providedFilesDiffInfo !== null ? {
1279
1288
  ...requestedScope,
1280
1289
  scope: "changed"
1281
1290
  } : requestedScope;
@@ -1283,8 +1292,8 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1283
1292
  scanStartupSpinner = !isQuiet ? spinner("Scanning...").start() : null;
1284
1293
  if (scanStartupSpinner !== null) recordDistribution(METRIC.scanFeedbackDelay, performance.now() - projectSelectionCompletedTime, { unit: "millisecond" });
1285
1294
  const wantsDiffMode = scopeRequest.scope !== void 0 && scopeRequest.scope !== "full";
1286
- const shouldDetectDiff = changedFilesDiffInfo === null && (wantsDiffMode || scopeRequest.scope === void 0 && !skipPrompts && !isQuiet);
1287
- const diffInfo = changedFilesDiffInfo ?? (shouldDetectDiff ? await getDiffInfo(resolvedDirectory, scopeRequest.base, includeUntracked) : null);
1295
+ const shouldDetectDiff = providedFilesDiffInfo === null && (wantsDiffMode || scopeRequest.scope === void 0 && !skipPrompts && !isQuiet);
1296
+ const diffInfo = providedFilesDiffInfo ?? (shouldDetectDiff ? await getDiffInfo(resolvedDirectory, scopeRequest.base, includeUntracked) : null);
1288
1297
  scanStartupSpinner?.stop();
1289
1298
  scanStartupSpinner = null;
1290
1299
  const scope = await finalizeScope({
@@ -1295,7 +1304,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1295
1304
  });
1296
1305
  scanStartupSpinner = !isQuiet ? spinner("Scanning...").start() : null;
1297
1306
  const isDiffMode = scope !== "full";
1298
- const comparisonBaseRef = isDiffMode && diffInfo && !diffInfo.isCurrentChanges ? diffInfo.baseSha ? await resolveMergeBaseRef(resolvedDirectory, diffInfo.baseSha) : diffInfo.diffBaseRef ?? await resolveMergeBaseRef(resolvedDirectory, diffInfo.baseBranch) : null;
1307
+ const comparisonBaseRef = isDiffMode && diffInfo && !diffInfo.isCurrentChanges && !hasPositionalFileSelection ? diffInfo.baseSha ? await resolveMergeBaseRef(resolvedDirectory, diffInfo.baseSha) : diffInfo.diffBaseRef ?? await resolveMergeBaseRef(resolvedDirectory, diffInfo.baseBranch) : null;
1299
1308
  const baselineRef = scope === "changed" ? comparisonBaseRef : null;
1300
1309
  const baselineDiffPlan = baselineRef === null ? null : await getBaselineDiffPlan(resolvedDirectory, baselineRef);
1301
1310
  const linesBaseRef = diffInfo?.isCurrentChanges ? "HEAD" : comparisonBaseRef;
@@ -1313,7 +1322,10 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1313
1322
  }
1314
1323
  setJsonReportMode(baselineRef ? "baseline" : isDiffMode ? "diff" : "full");
1315
1324
  if (isDiffMode && diffInfo && !isQuiet) {
1316
- if (diffInfo.isCurrentChanges) cliLogger.log("Scanning uncommitted changes");
1325
+ if (hasPositionalFileSelection) {
1326
+ const fileLabel = diffInfo.changedFiles.length === 1 ? "file" : "files";
1327
+ cliLogger.log(`Scanning ${diffInfo.changedFiles.length} selected ${fileLabel}`);
1328
+ } else if (diffInfo.isCurrentChanges) cliLogger.log("Scanning uncommitted changes");
1317
1329
  else {
1318
1330
  const currentBranchLabel = diffInfo.currentBranch ?? "(detached HEAD)";
1319
1331
  cliLogger.log(`Scanning changes: ${highlighter.info(currentBranchLabel)} → ${highlighter.info(diffInfo.baseBranch)}`);
@@ -1328,7 +1340,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1328
1340
  projectDirectories: projectScans.map((projectScan) => projectScan.directory),
1329
1341
  isRootDeadCodeEnabled: scanOptions.deadCode ?? rootProjectScan?.config?.deadCode ?? true
1330
1342
  });
1331
- if (workspaceDeadCodeOwner !== null) recordCount(METRIC.scanWorkspaceDeadCodeShared, 1, { projectCount: projectScans.length });
1343
+ if (workspaceDeadCodeOwner !== null) recordCount(METRIC.scanWorkspaceMaintainabilityShared, 1, { projectCount: projectScans.length });
1332
1344
  const projectScanExecutionContext = {
1333
1345
  flags,
1334
1346
  resolvedDirectory,
@@ -1343,6 +1355,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1343
1355
  workspaceDeadCodeOwner,
1344
1356
  precomputedSourceFileCounts: isMultiProject && !isDiffMode ? await collectProjectSourceFileCounts(resolvedDirectory, projectScans.map((projectScan) => projectScan.directory)) : null,
1345
1357
  projectScans,
1358
+ workspaceProjectDirectories,
1346
1359
  baselineRef,
1347
1360
  scope,
1348
1361
  changedLineRanges
@@ -1439,5 +1452,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1439
1452
  //#endregion
1440
1453
  export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
1441
1454
 
1442
- //# sourceMappingURL=inspect-CwH84aSA.js.map
1443
- //# debugId=84ff2f1c-e3ef-5496-9c58-6dddc98717fc
1455
+ //# sourceMappingURL=inspect-Dq5krKWG.js.map
1456
+ //# debugId=a848d2ef-3d8d-5de6-8dea-5b757aa38c3e
@@ -1,10 +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]="e7460021-b0b1-544c-9332-fc4e5e848785")}catch(e){}}();
3
- import { ar as runSync, t as recordCount, w as METRIC } from "./record-metric-CsQXJewH.js";
4
- import { c as isExpectedUserError } from "./unref-stdin-0a_0uwC6.js";
5
- import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-Pb2uO8EG.js";
6
- import { t as printBrandedHeader } from "./print-branded-header-D_J8Qdsj.js";
7
- import { n as runInstallReactDoctor } from "./install-react-doctor-Bq7dfEBI.js";
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]="1ec9c2fd-d101-59b4-b11c-283c3e91bcba")}catch(e){}}();
3
+ import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-B6T_Ej33.js";
4
+ import { r as isExpectedUserError } from "./telemetry-runtime-BF83aBFL.js";
5
+ import { n as handleUserError, t as handleError } from "./handle-error-BCI-Nv3P.js";
6
+ import { t as reportErrorToSentry } from "./report-error-DwL3b99q.js";
7
+ import { t as printBrandedHeader } from "./print-branded-header-Dz0SwyHQ.js";
8
+ import { n as runInstallReactDoctor } from "./install-react-doctor-C-PVDWXv.js";
8
9
  //#region src/cli/commands/install.ts
9
10
  const installAction = async (options, command) => {
10
11
  recordCount(METRIC.cliInvoked, 1, { command: "install" });
@@ -28,5 +29,5 @@ const installAction = async (options, command) => {
28
29
  //#endregion
29
30
  export { installAction };
30
31
 
31
- //# sourceMappingURL=install-sFN_w425.js.map
32
- //# debugId=e7460021-b0b1-544c-9332-fc4e5e848785
32
+ //# sourceMappingURL=install-C0aiZKgf.js.map
33
+ //# debugId=1ec9c2fd-d101-59b4-b11c-283c3e91bcba