react-doctor 0.7.1-dev.5809083 → 0.7.1-dev.64452aa

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 (2) hide show
  1. package/dist/cli.js +10 -19
  2. package/package.json +2 -2
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]="69a45de3-fe65-53dc-aed2-17f9cea22159")}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]="57f4381b-7060-58c6-88a4-95b4c97d3b74")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import * as NodeChildProcess from "node:child_process";
5
5
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
@@ -45924,7 +45924,7 @@ const makeNoopConsole = () => ({
45924
45924
  });
45925
45925
  //#endregion
45926
45926
  //#region src/cli/utils/version.ts
45927
- const VERSION = "0.7.1-dev.5809083";
45927
+ const VERSION = "0.7.1-dev.64452aa";
45928
45928
  //#endregion
45929
45929
  //#region src/cli/utils/json-mode.ts
45930
45930
  let context = null;
@@ -46293,13 +46293,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
46293
46293
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
46294
46294
  * standard `SENTRY_RELEASE` override.
46295
46295
  */
46296
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.1-dev.5809083`;
46296
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.1-dev.64452aa`;
46297
46297
  /**
46298
46298
  * Deployment environment shown in Sentry's environment filter. Defaults to
46299
46299
  * `production` for tagged releases and `development` for dev/unbuilt versions,
46300
46300
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
46301
46301
  */
46302
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.1-dev.5809083") ? "development" : "production");
46302
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.1-dev.64452aa") ? "development" : "production");
46303
46303
  /**
46304
46304
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
46305
46305
  * (set to `0` to disable tracing) and falls back to
@@ -58143,7 +58143,7 @@ const buildRuntimeLayers = (input) => {
58143
58143
  const linterLayer = input.shouldSkipLint ? Linter.layerOf([]) : Linter.layerOxlint;
58144
58144
  const deadCodeLayer = input.shouldRunDeadCode ? DeadCode.layerNode : DeadCode.layerOf([]);
58145
58145
  const scoreLayer = input.shouldComputeScore ? Score.layerHttp : Score.layerOf(null);
58146
- const supplyChainLayer = input.shouldRunSupplyChain ? SupplyChain.layerNode : SupplyChain.layerOf([]);
58146
+ const supplyChainLayer = input.userConfig?.supplyChain?.enabled === false ? SupplyChain.layerOf([]) : SupplyChain.layerNode;
58147
58147
  const projectLayer = input.projectInfoOverride === void 0 ? Project.layerNode : Project.layerOf(input.projectInfoOverride);
58148
58148
  const progressLayer = input.shouldShowProgressSpinners ? Progress.layerOra(buildSpinnerProgressHandle) : Progress.layerNoop;
58149
58149
  const baseLayers = mergeAll$1(projectLayer, input.hasConfigOverride ? Config.layerOf({
@@ -58606,7 +58606,6 @@ const buildScanResultCacheKey = (input) => {
58606
58606
  engineOptions: {
58607
58607
  lint: input.options.lint,
58608
58608
  deadCode: input.options.deadCode,
58609
- supplyChain: input.options.supplyChain,
58610
58609
  includePaths: [...input.options.includePaths].sort(),
58611
58610
  customRulesOnly: input.options.customRulesOnly,
58612
58611
  respectInlineDisables: input.options.respectInlineDisables,
@@ -58914,7 +58913,6 @@ const buildScanAttributes = (input) => {
58914
58913
  maxDurationMs: input.maxDurationMs,
58915
58914
  lint: input.lint,
58916
58915
  deadCode: input.deadCode,
58917
- supplyChain: input.supplyChain,
58918
58916
  scoreOnly: input.scoreOnly,
58919
58917
  noScore: input.noScore,
58920
58918
  respectInlineDisables: input.respectInlineDisables,
@@ -60189,7 +60187,6 @@ const buildIgnoredTags = (userConfig) => {
60189
60187
  const mergeInspectOptions = (inputOptions, userConfig) => ({
60190
60188
  lint: inputOptions.lint ?? userConfig?.lint ?? true,
60191
60189
  deadCode: inputOptions.deadCode ?? userConfig?.deadCode ?? true,
60192
- supplyChain: inputOptions.supplyChain ?? userConfig?.supplyChain?.enabled ?? true,
60193
60190
  verbose: inputOptions.verbose ?? userConfig?.verbose ?? false,
60194
60191
  outputDirectory: inputOptions.outputDirectory || null,
60195
60192
  scoreOnly: inputOptions.scoreOnly ?? false,
@@ -60229,7 +60226,6 @@ const buildRunEventConfig = (options, userConfig, hasCustomConfig, resolvedWorke
60229
60226
  maxDurationMs: options.maxDurationMs,
60230
60227
  lint: options.lint,
60231
60228
  deadCode: options.deadCode,
60232
- supplyChain: options.supplyChain,
60233
60229
  scoreOnly: options.scoreOnly,
60234
60230
  noScore: options.noScore,
60235
60231
  respectInlineDisables: options.respectInlineDisables,
@@ -60313,7 +60309,6 @@ const runBaselineComparison = async (params) => {
60313
60309
  projectInfoOverride: params.headProjectInfo,
60314
60310
  shouldSkipLint: !params.options.lint || !params.resolvedNodeBinaryPath,
60315
60311
  shouldRunDeadCode: false,
60316
- shouldRunSupplyChain: params.options.supplyChain,
60317
60312
  shouldComputeScore: false,
60318
60313
  shouldShowProgressSpinners: false,
60319
60314
  oxlintConcurrency: params.options.concurrency
@@ -60402,7 +60397,6 @@ const runInspectWithRuntime = async (directory, options, userConfig, hasConfigOv
60402
60397
  configSourceDirectory,
60403
60398
  shouldSkipLint: !options.lint || lintBindingMissing,
60404
60399
  shouldRunDeadCode: options.deadCode,
60405
- shouldRunSupplyChain: options.supplyChain,
60406
60400
  shouldComputeScore: !options.noScore,
60407
60401
  shouldShowProgressSpinners,
60408
60402
  oxlintConcurrency: options.concurrency
@@ -62688,8 +62682,8 @@ const resolveParallelFlag = (parallel) => parallel === false ? 1 : void 0;
62688
62682
  * accepts. Flag-derived fields only (`scoreOnly`, `noScore`, `silent`,
62689
62683
  * `isCi`): every `userConfig` fallback — including `noScore` — lives in
62690
62684
  * `inspect()`'s merge layer, which sees each project's module-merged
62691
- * config. The plain boolean knobs (`lint`, `deadCode`, `supplyChain`,
62692
- * `verbose`) pass through unchanged for the same reason. This resolver reads
62685
+ * config. The plain boolean knobs (`lint`, `deadCode`, `verbose`) pass
62686
+ * through unchanged for the same reason. This resolver reads
62693
62687
  * `userConfig` only to decide the `--blocking warning` gate.
62694
62688
  */
62695
62689
  const resolveCliInspectOptions = (flags, userConfig) => {
@@ -62697,7 +62691,6 @@ const resolveCliInspectOptions = (flags, userConfig) => {
62697
62691
  return {
62698
62692
  lint: flags.lint,
62699
62693
  deadCode: flags.deadCode,
62700
- supplyChain: flags.supplyChain,
62701
62694
  verbose: flags.verbose,
62702
62695
  outputDirectory: flags.outputDir,
62703
62696
  respectInlineDisables: flags.respectInlineDisables === false ? false : void 0,
@@ -63248,7 +63241,7 @@ const inspectAction = async (directory, flags) => {
63248
63241
  const scanDirectory = projectScanTarget.resolvedDirectory;
63249
63242
  const projectConfig = projectDirectory === resolvedDirectory ? userConfig : mergeReactDoctorConfigs(userConfig, projectScanTarget.userConfig ?? void 0);
63250
63243
  const projectConfigSourceDirectory = projectScanTarget.userConfig?.plugins === void 0 ? scanTarget.configSourceDirectory : projectScanTarget.configSourceDirectory;
63251
- const supplyChainEnabled = flags.supplyChain ?? projectConfig?.supplyChain?.enabled !== false;
63244
+ const supplyChainEnabled = projectConfig?.supplyChain?.enabled !== false;
63252
63245
  let includePaths;
63253
63246
  let supplyChainManifestChanged = false;
63254
63247
  if (isDiffMode) {
@@ -64168,12 +64161,10 @@ const ROOT_FLAG_SPEC = {
64168
64161
  "--no-parallel",
64169
64162
  "--no-respect-inline-disables",
64170
64163
  "--no-score",
64171
- "--no-supply-chain",
64172
64164
  "--no-telemetry",
64173
64165
  "--no-warnings",
64174
64166
  "--score",
64175
64167
  "--staged",
64176
- "--supply-chain",
64177
64168
  "--verbose",
64178
64169
  "--version",
64179
64170
  "--warnings",
@@ -64422,7 +64413,7 @@ ${highlighter.dim("Learn more:")}
64422
64413
  ${highlighter.info(CI_URL)}
64423
64414
  `;
64424
64415
  const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
64425
- const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[directory]", "project directory to scan", ".").option("--lint", "enable linting").option("--no-lint", "skip linting").option("--dead-code", "enable dead-code analysis (default)").option("--no-dead-code", "skip dead-code analysis (unused files / exports / dependencies, circular imports)").option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much to scan/report: full (default), files, changed (only new issues vs base), or lines (only changed lines)").option("--base <ref>", "base git ref for files/changed/lines scope (auto-detected when omitted)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks").option("--max-duration <seconds>", "scan time budget for the whole run, shared across workspace projects: past it, remaining lint batches and dead-code are skipped and partial results are reported (skipped files are listed in the JSON report)").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
64416
+ const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[directory]", "project directory to scan", ".").option("--lint", "enable linting").option("--no-lint", "skip linting").option("--dead-code", "enable dead-code analysis (default)").option("--no-dead-code", "skip dead-code analysis (unused files / exports / dependencies, circular imports)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much to scan/report: full (default), files, changed (only new issues vs base), or lines (only changed lines)").option("--base <ref>", "base git ref for files/changed/lines scope (auto-detected when omitted)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks").option("--max-duration <seconds>", "scan time budget for the whole run, shared across workspace projects: past it, remaining lint batches and dead-code are skipped and partial results are reported (skipped files are listed in the JSON report)").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
64426
64417
  program.action(inspectAction);
64427
64418
  program.command("why <location>").description("Explain why a rule fired (or why a suppression didn't apply) at a file:line").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple)").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action((location, options) => whyAction(location, options));
64428
64419
  program.command("install").alias("setup").description("Install the react-doctor skill into your coding agents and optional git hook").option("-y, --yes", "skip prompts, install for all detected agents").option("--dry-run", "show what would be installed without writing files").option("--agent-hooks", "install native non-blocking agent hooks for Claude Code and Cursor").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderInstallHelpEpilog).action(installAction);
@@ -64472,4 +64463,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
64472
64463
  export {};
64473
64464
 
64474
64465
  //# sourceMappingURL=cli.js.map
64475
- //# debugId=69a45de3-fe65-53dc-aed2-17f9cea22159
64466
+ //# debugId=57f4381b-7060-58c6-88a4-95b4c97d3b74
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.7.1-dev.5809083",
3
+ "version": "0.7.1-dev.64452aa",
4
4
  "description": "Your agent writes bad React. This catches it",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -66,7 +66,7 @@
66
66
  "vscode-uri": "^3.1.0",
67
67
  "yaml": "^2.9.0",
68
68
  "deslop-js": "0.7.1",
69
- "oxlint-plugin-react-doctor": "0.7.1-dev.5809083"
69
+ "oxlint-plugin-react-doctor": "0.7.1-dev.64452aa"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",