react-doctor 0.4.0-dev.6216430 → 0.4.0-dev.65bab64

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 CHANGED
@@ -66,6 +66,7 @@ permissions:
66
66
  contents: read
67
67
  pull-requests: write
68
68
  issues: write
69
+ statuses: write # lets the action publish the score as a commit status
69
70
 
70
71
  concurrency:
71
72
  group: react-doctor-${{ github.event.pull_request.number || github.ref }}
@@ -78,15 +79,15 @@ jobs:
78
79
  - uses: actions/checkout@v5
79
80
  with:
80
81
  fetch-depth: 0 # so React Doctor can diff against the merge-base for new-vs-existing
81
- - uses: millionco/react-doctor@v1
82
+ - uses: millionco/react-doctor@v2
82
83
  ```
83
84
 
84
85
  `fetch-depth: 0` is recommended so the baseline comparison can read the base commit; without enough history the Action falls back to reporting every finding in the changed files.
85
86
 
86
- `@v1` always resolves to the latest `v1.x` release of the Action. For hardened CI — recommended whenever the workflow is granted `pull-requests: write` — pin to a full commit SHA instead and let Dependabot or Renovate keep it current:
87
+ `@v2` always resolves to the latest `v2.x` release of the Action. For hardened CI — recommended whenever the workflow is granted `pull-requests: write` — pin to a full commit SHA instead and let Dependabot or Renovate keep it current:
87
88
 
88
89
  ```yaml
89
- - uses: millionco/react-doctor@b612664043a9be414166e3c6a69b355e39a8dcf4 # v1.1.1
90
+ - uses: millionco/react-doctor@75932719d11ef50e110eac01ce04acdc05fde074 # v2.0.1
90
91
  ```
91
92
 
92
93
  [Add GitHub Action →](https://github.com/marketplace/actions/react-doctor)
package/dist/cli.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]="f6c4adc9-3353-560f-a49f-c50a13c0b8a2")}catch(e){}}();
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]="234f49e5-7510-5a79-ba10-9366aecc015b")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
5
5
  import * as path$1 from "node:path";
@@ -8394,6 +8394,7 @@ const checkReducedMotion = (rootDirectory) => {
8394
8394
  if (!hasMotionLibrary) return [];
8395
8395
  const result = spawnSync("git", [
8396
8396
  "grep",
8397
+ "--untracked",
8397
8398
  "-ql",
8398
8399
  "-E",
8399
8400
  REDUCED_MOTION_GREP_PATTERN,
@@ -10708,7 +10709,12 @@ const SANITIZED_ENV = (() => {
10708
10709
  const spawnOxlint = (args, rootDirectory, nodeBinaryPath, spawnTimeoutMs = OXLINT_SPAWN_TIMEOUT_MS, outputMaxBytes = OXLINT_OUTPUT_MAX_BYTES) => new Promise((resolve, reject) => {
10709
10710
  const child = spawn(nodeBinaryPath, args, {
10710
10711
  cwd: rootDirectory,
10711
- env: SANITIZED_ENV
10712
+ env: SANITIZED_ENV,
10713
+ stdio: [
10714
+ "ignore",
10715
+ "pipe",
10716
+ "pipe"
10717
+ ]
10712
10718
  });
10713
10719
  const timeoutHandle = setTimeout(() => {
10714
10720
  child.kill("SIGKILL");
@@ -12191,7 +12197,7 @@ const makeNoopConsole = () => ({
12191
12197
  });
12192
12198
  //#endregion
12193
12199
  //#region src/cli/utils/version.ts
12194
- const VERSION = "0.4.0-dev.6216430";
12200
+ const VERSION = "0.4.0-dev.65bab64";
12195
12201
  //#endregion
12196
12202
  //#region src/cli/utils/json-mode.ts
12197
12203
  let context = null;
@@ -12549,13 +12555,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
12549
12555
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
12550
12556
  * standard `SENTRY_RELEASE` override.
12551
12557
  */
12552
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.4.0-dev.6216430`;
12558
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.4.0-dev.65bab64`;
12553
12559
  /**
12554
12560
  * Deployment environment shown in Sentry's environment filter. Defaults to
12555
12561
  * `production` for tagged releases and `development` for dev/unbuilt versions,
12556
12562
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
12557
12563
  */
12558
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.4.0-dev.6216430") ? "development" : "production");
12564
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.4.0-dev.65bab64") ? "development" : "production");
12559
12565
  /**
12560
12566
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
12561
12567
  * (set to `0` to disable tracing) and falls back to
@@ -16752,10 +16758,10 @@ const canAnimateOnboarding = (stream = process.stdout) => {
16752
16758
  };
16753
16759
  //#endregion
16754
16760
  //#region src/cli/utils/onboarding-state.ts
16755
- const GLOBAL_CONFIG_PROJECT_NAME$1 = "react-doctor";
16761
+ const GLOBAL_CONFIG_PROJECT_NAME$2 = "react-doctor";
16756
16762
  const ONBOARDED_AT_KEY = "onboardedAt";
16757
16763
  const getOnboardingStore = (options = {}) => new Conf({
16758
- projectName: GLOBAL_CONFIG_PROJECT_NAME$1,
16764
+ projectName: GLOBAL_CONFIG_PROJECT_NAME$2,
16759
16765
  cwd: options.cwd
16760
16766
  });
16761
16767
  const hasCompletedOnboarding = (options = {}) => {
@@ -18143,6 +18149,11 @@ permissions:
18143
18149
  # comments (PRs are issues under the hood). Not exercised on \`push\`
18144
18150
  # events, so safe to drop if you only run on \`main\`.
18145
18151
  issues: write
18152
+ # Lets the action publish a commit status with the score + error/warning
18153
+ # counts (links to the run). This is how a \`push\` to \`main\` surfaces its
18154
+ # result, since the PR comment is skipped off pull requests. Drop it to
18155
+ # disable the status (or set \`commit-status: false\` below).
18156
+ statuses: write
18146
18157
 
18147
18158
  # Cancels any in-flight scan for the same PR (or branch, on push) the moment
18148
18159
  # a new commit arrives, so reviewers only ever see the latest run.
@@ -18156,20 +18167,42 @@ jobs:
18156
18167
  steps:
18157
18168
  - uses: actions/checkout@v5
18158
18169
 
18159
- - uses: millionco/react-doctor@v1
18170
+ - uses: millionco/react-doctor@v2
18160
18171
  # Common configuration knobs — uncomment any to override the default.
18161
18172
  # Full reference: https://www.react.doctor/ci
18162
18173
  # with:
18163
- # non-blocking: true # Report findings but always exit 0 (won't fail the PR check)
18164
- # fail-on: warning # Gate level: "error" (default) | "warning" | "none"
18174
+ # blocking: warning # Gate level: "error" (default) | "warning" | "none" (advisory)
18175
+ # scope: full # On PRs, scan the whole project instead of just changed files
18165
18176
  # comment: false # Disable the sticky PR summary comment
18166
- # annotations: false # Disable inline GitHub Actions annotations on changed files
18167
- # version: "0.2.18" # Pin to a specific react-doctor version instead of "latest"
18177
+ # review-comments: false # Disable inline review comments on changed lines
18178
+ # commit-status: false # Disable the commit status (score + counts, links to the run)
18179
+ # version: "0.4.0" # Pin to a specific react-doctor version instead of "latest"
18168
18180
  # directory: apps/web # Scan a sub-directory (default: ".")
18169
18181
  # project: "web,admin" # In a monorepo, scan specific workspace project(s)
18170
18182
  `;
18171
18183
  const getReactDoctorWorkflowPath = (projectRoot) => path$1.join(projectRoot, ".github", "workflows", "react-doctor.yml");
18172
18184
  const isReactDoctorWorkflowInstalled = (projectRoot) => fs$1.existsSync(getReactDoctorWorkflowPath(projectRoot));
18185
+ const V1_FLOATING_ACTION_REF = String.raw`millionco/react-doctor@v1(?![\w.])`;
18186
+ const V2_FLOATING_ACTION_REF = "millionco/react-doctor@v2";
18187
+ const readReactDoctorWorkflow = (projectRoot) => {
18188
+ const workflowPath = getReactDoctorWorkflowPath(projectRoot);
18189
+ try {
18190
+ return {
18191
+ workflowPath,
18192
+ content: fs$1.readFileSync(workflowPath, "utf8")
18193
+ };
18194
+ } catch {
18195
+ return null;
18196
+ }
18197
+ };
18198
+ const workflowUsesV1Action = (content) => new RegExp(V1_FLOATING_ACTION_REF).test(content);
18199
+ const upgradeWorkflowActionToV2 = (content) => {
18200
+ const upgraded = content.replace(new RegExp(V1_FLOATING_ACTION_REF, "g"), V2_FLOATING_ACTION_REF);
18201
+ return {
18202
+ content: upgraded,
18203
+ changed: upgraded !== content
18204
+ };
18205
+ };
18173
18206
  const installReactDoctorWorkflow = (projectRoot) => {
18174
18207
  const workflowPath = getReactDoctorWorkflowPath(projectRoot);
18175
18208
  if (fs$1.existsSync(workflowPath)) return {
@@ -18999,6 +19032,41 @@ const runInstallReactDoctor = async (options = {}) => {
18999
19032
  for (const agent of selectedAgents) recordCount(METRIC.installAgent, 1, { agent });
19000
19033
  };
19001
19034
  //#endregion
19035
+ //#region src/cli/utils/hash-project-root.ts
19036
+ const hashProjectRoot = (projectRoot) => createHash("sha256").update(path$1.resolve(projectRoot)).digest("hex");
19037
+ //#endregion
19038
+ //#region src/cli/utils/action-upgrade-prompt.ts
19039
+ const GLOBAL_CONFIG_PROJECT_NAME$1 = "react-doctor";
19040
+ const getActionUpgradeStore = (options = {}) => new Conf({
19041
+ projectName: GLOBAL_CONFIG_PROJECT_NAME$1,
19042
+ cwd: options.cwd
19043
+ });
19044
+ const hasHandledActionUpgrade = (projectRoot, storeOptions = {}) => {
19045
+ try {
19046
+ const upgrades = getActionUpgradeStore(storeOptions).get("actionUpgrades", {});
19047
+ return Boolean(upgrades[hashProjectRoot(projectRoot)]);
19048
+ } catch {
19049
+ return true;
19050
+ }
19051
+ };
19052
+ const recordActionUpgradeDecision = (projectRoot, outcome, storeOptions = {}) => {
19053
+ try {
19054
+ const store = getActionUpgradeStore(storeOptions);
19055
+ const upgrades = store.get("actionUpgrades", {});
19056
+ store.set("actionUpgrades", {
19057
+ ...upgrades,
19058
+ [hashProjectRoot(projectRoot)]: {
19059
+ rootDirectory: path$1.resolve(projectRoot),
19060
+ outcome,
19061
+ at: (/* @__PURE__ */ new Date()).toISOString()
19062
+ }
19063
+ });
19064
+ return true;
19065
+ } catch {
19066
+ return false;
19067
+ }
19068
+ };
19069
+ //#endregion
19002
19070
  //#region src/cli/utils/install-skill-for-agent.ts
19003
19071
  const installReactDoctorSkillForAgent = async (agent, projectRoot) => {
19004
19072
  const source = getSkillSourceDirectory();
@@ -19049,9 +19117,9 @@ const openUrl = (url) => {
19049
19117
  //#endregion
19050
19118
  //#region src/cli/utils/open-workflow-pull-request.ts
19051
19119
  const NEW_BRANCH_PREFIX = "react-doctor/add-github-actions";
19052
- const COMMIT_MESSAGE = "ci: add React Doctor GitHub Actions workflow";
19053
- const PR_TITLE = "Add React Doctor to GitHub Actions";
19054
- const PR_BODY = `Adds a [React Doctor](https://www.react.doctor) scan to every pull request and every push to the default branch. The workflow file is documented inline.
19120
+ const DEFAULT_COMMIT_MESSAGE = "ci: add React Doctor GitHub Actions workflow";
19121
+ const DEFAULT_PR_TITLE = "Add React Doctor to GitHub Actions";
19122
+ const DEFAULT_PR_BODY = `Adds a [React Doctor](https://www.react.doctor) scan to every pull request and every push to the default branch. The workflow file is documented inline.
19055
19123
 
19056
19124
  Docs: https://www.react.doctor/ci`;
19057
19125
  const execFileAsync = promisify(execFile);
@@ -19103,6 +19171,9 @@ const findUniqueBranchName = async (cwd) => {
19103
19171
  };
19104
19172
  const openWorkflowPullRequest = async (params) => {
19105
19173
  const workflowPath = path$1.resolve(params.workflowPath);
19174
+ const commitMessage = params.commitMessage ?? DEFAULT_COMMIT_MESSAGE;
19175
+ const prTitle = params.prTitle ?? DEFAULT_PR_TITLE;
19176
+ const prBody = params.prBody ?? DEFAULT_PR_BODY;
19106
19177
  const repoRootProbe = await run("git", ["rev-parse", "--show-toplevel"], path$1.dirname(workflowPath));
19107
19178
  if (!repoRootProbe.success) return {
19108
19179
  status: "not-attempted",
@@ -19169,7 +19240,7 @@ const openWorkflowPullRequest = async (params) => {
19169
19240
  if (!(await run("git", [
19170
19241
  "commit",
19171
19242
  "-m",
19172
- COMMIT_MESSAGE
19243
+ commitMessage
19173
19244
  ], cwd)).success) {
19174
19245
  await restoreToPreviousBranch(true);
19175
19246
  return {
@@ -19193,9 +19264,9 @@ const openWorkflowPullRequest = async (params) => {
19193
19264
  "pr",
19194
19265
  "create",
19195
19266
  "--title",
19196
- PR_TITLE,
19267
+ prTitle,
19197
19268
  "--body",
19198
- PR_BODY,
19269
+ prBody,
19199
19270
  "--base",
19200
19271
  defaultBranch,
19201
19272
  "--head",
@@ -19347,6 +19418,77 @@ const setUpGitHubActions = async (rootDirectory) => {
19347
19418
  }
19348
19419
  cliLogger.log(` Learn more: ${highlighter.info(CI_URL)}`);
19349
19420
  };
19421
+ const UPGRADE_YES_CHOICE = "upgrade-yes";
19422
+ const UPGRADE_NO_CHOICE = "upgrade-no";
19423
+ const UPGRADE_COMMIT_MESSAGE = "ci: upgrade React Doctor GitHub Action to v2";
19424
+ const UPGRADE_PR_TITLE = "Upgrade React Doctor Action to v2";
19425
+ const UPGRADE_PR_BODY = `Bumps the React Doctor GitHub Actions workflow to the action's latest major, \`millionco/react-doctor@v2\`.
19426
+
19427
+ Docs: https://www.react.doctor/ci`;
19428
+ const askUpgradeActionVersion = async () => {
19429
+ const { upgradeChoice } = await prompts({
19430
+ type: "select",
19431
+ name: "upgradeChoice",
19432
+ message: "A new major of the React Doctor Action (v2) is out. Upgrade this repo's workflow?",
19433
+ hint: " ",
19434
+ choices: [{
19435
+ title: "Yes (recommended)",
19436
+ description: "Open a PR bumping the workflow to millionco/react-doctor@v2",
19437
+ value: UPGRADE_YES_CHOICE
19438
+ }, {
19439
+ title: "No, thanks",
19440
+ description: "Keep @v1 — won't ask again for this repo",
19441
+ value: UPGRADE_NO_CHOICE
19442
+ }],
19443
+ initial: 0
19444
+ }, { onCancel: () => true });
19445
+ if (upgradeChoice === void 0) return "cancel";
19446
+ return upgradeChoice === UPGRADE_YES_CHOICE ? "yes" : "no";
19447
+ };
19448
+ const upgradeGitHubActionsWorkflow = async (workflow) => {
19449
+ const { content, changed } = upgradeWorkflowActionToV2(workflow.content);
19450
+ if (!changed) return false;
19451
+ const upgradeSpinner = spinner("Opening a pull request to upgrade React Doctor to v2...").start();
19452
+ try {
19453
+ fs$1.writeFileSync(workflow.workflowPath, content);
19454
+ } catch {
19455
+ upgradeSpinner.fail("Couldn't update the workflow file.");
19456
+ return false;
19457
+ }
19458
+ const pullRequestResult = await openWorkflowPullRequest({
19459
+ workflowPath: workflow.workflowPath,
19460
+ commitMessage: UPGRADE_COMMIT_MESSAGE,
19461
+ prTitle: UPGRADE_PR_TITLE,
19462
+ prBody: UPGRADE_PR_BODY
19463
+ });
19464
+ if (pullRequestResult.status === "pr-opened") upgradeSpinner.succeed(`Opened pull request for review: ${highlighter.info(pullRequestResult.url)}`);
19465
+ else if (pullRequestResult.status === "branch-pushed") upgradeSpinner.warn(`Pushed branch ${highlighter.bold(pullRequestResult.branch)} but couldn't open a PR. Open one with: gh pr create --head ${pullRequestResult.branch}`);
19466
+ else {
19467
+ upgradeSpinner.stop();
19468
+ try {
19469
+ fs$1.writeFileSync(workflow.workflowPath, content);
19470
+ } catch {
19471
+ cliLogger.log(" Couldn't finish the upgrade. Re-run React Doctor to try again.");
19472
+ return false;
19473
+ }
19474
+ const didStage = await stageWorkflowFile({ workflowPath: workflow.workflowPath });
19475
+ cliLogger.log(didStage ? " Updated the workflow to @v2 and staged it. Commit it to finish the upgrade." : " Updated the workflow to @v2. Commit the change to finish the upgrade.");
19476
+ }
19477
+ return true;
19478
+ };
19479
+ const maybeOfferActionUpgrade = async (projectRoot) => {
19480
+ const workflow = readReactDoctorWorkflow(projectRoot);
19481
+ if (!workflow || !workflowUsesV1Action(workflow.content)) return;
19482
+ if (hasHandledActionUpgrade(projectRoot)) return;
19483
+ const outcome = await askUpgradeActionVersion();
19484
+ if (outcome === "cancel") return;
19485
+ recordCount(METRIC.agentHandoff, 1, { outcome: outcome === "yes" ? "upgrade-accepted" : "upgrade-declined" });
19486
+ if (outcome === "no") {
19487
+ recordActionUpgradeDecision(projectRoot, "declined");
19488
+ return;
19489
+ }
19490
+ if (await upgradeGitHubActionsWorkflow(workflow)) recordActionUpgradeDecision(projectRoot, "accepted");
19491
+ };
19350
19492
  const SGR_BOLD_OFF = "\x1B[22m";
19351
19493
  const ciQuestionMessage = [
19352
19494
  "Add React Doctor to GitHub Actions?",
@@ -19394,7 +19536,8 @@ const detectLaunchableAgents = async () => {
19394
19536
  const handoffToAgent = async (input) => {
19395
19537
  if (!input.interactive || input.diagnostics.length === 0) return;
19396
19538
  cliLogger.break();
19397
- if (!isReactDoctorWorkflowInstalled(findNearestPackageDirectory(input.rootDirectory) ?? input.rootDirectory)) {
19539
+ const projectRootForCi = findNearestPackageDirectory(input.rootDirectory) ?? input.rootDirectory;
19540
+ if (!isReactDoctorWorkflowInstalled(projectRootForCi)) {
19398
19541
  const ciOutcome = await askAddToGitHubActions();
19399
19542
  recordCount(METRIC.agentHandoff, 1, {
19400
19543
  outcome: `ci-${ciOutcome}`,
@@ -19405,7 +19548,7 @@ const handoffToAgent = async (input) => {
19405
19548
  await setUpGitHubActions(input.rootDirectory);
19406
19549
  cliLogger.break();
19407
19550
  }
19408
- }
19551
+ } else await maybeOfferActionUpgrade(projectRootForCi);
19409
19552
  const { handoffTarget } = await prompts({
19410
19553
  type: "select",
19411
19554
  name: "handoffTarget",
@@ -19739,7 +19882,7 @@ const getSetupPromptStore = (options = {}) => new Conf({
19739
19882
  projectName: GLOBAL_CONFIG_PROJECT_NAME,
19740
19883
  cwd: options.cwd
19741
19884
  });
19742
- const getSetupPromptProjectKey = (projectRoot) => createHash("sha256").update(path$1.resolve(projectRoot)).digest("hex");
19885
+ const getSetupPromptProjectKey = (projectRoot) => hashProjectRoot(projectRoot);
19743
19886
  const hasDisabledSetupPrompt = (projectRoot, storeOptions = {}) => {
19744
19887
  try {
19745
19888
  return getSetupPromptStore(storeOptions).get("projects", {})[getSetupPromptProjectKey(projectRoot)]?.setupPrompt === false;
@@ -21311,4 +21454,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
21311
21454
  export {};
21312
21455
 
21313
21456
  //# sourceMappingURL=cli.js.map
21314
- //# debugId=f6c4adc9-3353-560f-a49f-c50a13c0b8a2
21457
+ //# debugId=234f49e5-7510-5a79-ba10-9366aecc015b
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]="44e73f8d-b81f-599b-a04e-22497cd72bb2")}catch(e){}}();
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]="89213cff-26e1-5f16-a3b2-135fc4f96aab")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import * as Schema from "effect/Schema";
5
5
  import * as fs$1 from "node:fs";
@@ -5343,6 +5343,7 @@ const checkReducedMotion = (rootDirectory) => {
5343
5343
  if (!hasMotionLibrary) return [];
5344
5344
  const result = spawnSync("git", [
5345
5345
  "grep",
5346
+ "--untracked",
5346
5347
  "-ql",
5347
5348
  "-E",
5348
5349
  REDUCED_MOTION_GREP_PATTERN,
@@ -7641,7 +7642,12 @@ const SANITIZED_ENV = (() => {
7641
7642
  const spawnOxlint = (args, rootDirectory, nodeBinaryPath, spawnTimeoutMs = OXLINT_SPAWN_TIMEOUT_MS, outputMaxBytes = OXLINT_OUTPUT_MAX_BYTES) => new Promise((resolve, reject) => {
7642
7643
  const child = spawn(nodeBinaryPath, args, {
7643
7644
  cwd: rootDirectory,
7644
- env: SANITIZED_ENV
7645
+ env: SANITIZED_ENV,
7646
+ stdio: [
7647
+ "ignore",
7648
+ "pipe",
7649
+ "pipe"
7650
+ ]
7645
7651
  });
7646
7652
  const timeoutHandle = setTimeout(() => {
7647
7653
  child.kill("SIGKILL");
@@ -8929,4 +8935,4 @@ const toJsonReport = (result, options) => buildJsonReport({
8929
8935
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
8930
8936
 
8931
8937
  //# sourceMappingURL=index.js.map
8932
- //# debugId=44e73f8d-b81f-599b-a04e-22497cd72bb2
8938
+ //# debugId=89213cff-26e1-5f16-a3b2-135fc4f96aab
package/dist/lsp.js CHANGED
@@ -5280,6 +5280,7 @@ const checkReducedMotion = (rootDirectory) => {
5280
5280
  if (!hasMotionLibrary) return [];
5281
5281
  const result = spawnSync("git", [
5282
5282
  "grep",
5283
+ "--untracked",
5283
5284
  "-ql",
5284
5285
  "-E",
5285
5286
  REDUCED_MOTION_GREP_PATTERN,
@@ -7578,7 +7579,12 @@ const SANITIZED_ENV = (() => {
7578
7579
  const spawnOxlint = (args, rootDirectory, nodeBinaryPath, spawnTimeoutMs = OXLINT_SPAWN_TIMEOUT_MS, outputMaxBytes = OXLINT_OUTPUT_MAX_BYTES) => new Promise((resolve, reject) => {
7579
7580
  const child = spawn(nodeBinaryPath, args, {
7580
7581
  cwd: rootDirectory,
7581
- env: SANITIZED_ENV
7582
+ env: SANITIZED_ENV,
7583
+ stdio: [
7584
+ "ignore",
7585
+ "pipe",
7586
+ "pipe"
7587
+ ]
7582
7588
  });
7583
7589
  const timeoutHandle = setTimeout(() => {
7584
7590
  child.kill("SIGKILL");
@@ -10800,5 +10806,5 @@ const startLanguageServer = () => {
10800
10806
  };
10801
10807
  //#endregion
10802
10808
  export { startLanguageServer };
10803
- !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]="367f0c6f-8633-512f-b006-f1bb7ab5a35a")}catch(e){}}();
10804
- //# debugId=367f0c6f-8633-512f-b006-f1bb7ab5a35a
10809
+ !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]="3810554d-573f-57e0-8b16-216e38ece1e2")}catch(e){}}();
10810
+ //# debugId=3810554d-573f-57e0-8b16-216e38ece1e2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.4.0-dev.6216430",
3
+ "version": "0.4.0-dev.65bab64",
4
4
  "description": "Diagnose and fix React codebases for security, performance, correctness, accessibility, bundle-size, and architecture issues",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -55,7 +55,7 @@
55
55
  "agent-install": "0.0.5",
56
56
  "conf": "^15.1.0",
57
57
  "confbox": "^0.2.4",
58
- "deslop-js": "^0.0.19",
58
+ "deslop-js": "^0.0.20",
59
59
  "effect": "4.0.0-beta.70",
60
60
  "eslint-plugin-react-hooks": "^7.1.1",
61
61
  "jiti": "^2.7.0",
@@ -66,7 +66,7 @@
66
66
  "vscode-languageserver": "^9.0.1",
67
67
  "vscode-languageserver-textdocument": "^1.0.12",
68
68
  "vscode-uri": "^3.1.0",
69
- "oxlint-plugin-react-doctor": "0.4.0-dev.6216430"
69
+ "oxlint-plugin-react-doctor": "0.4.0-dev.65bab64"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",
@@ -75,8 +75,8 @@
75
75
  "commander": "^14.0.3",
76
76
  "ora": "^9.4.0",
77
77
  "@react-doctor/api": "0.2.20",
78
- "@react-doctor/core": "0.3.0",
79
- "@react-doctor/language-server": "0.2.12"
78
+ "@react-doctor/language-server": "0.2.12",
79
+ "@react-doctor/core": "0.3.0"
80
80
  },
81
81
  "engines": {
82
82
  "node": "^20.19.0 || >=22.12.0"