react-doctor 0.5.6-dev.5d1347e → 0.5.6-dev.740211c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +71 -15
- package/dist/index.d.ts +10 -0
- package/dist/index.js +4 -2
- package/dist/lsp.js +3 -2
- package/package.json +4 -4
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]="
|
|
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]="f029f05b-4c71-52d3-b523-0834d67de2d4")}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";
|
|
@@ -22400,6 +22400,7 @@ var JsonReportProjectEntry = class extends Class("JsonReportProjectEntry")({
|
|
|
22400
22400
|
score: Unknown,
|
|
22401
22401
|
skippedChecks: ArraySchema(String$1),
|
|
22402
22402
|
skippedCheckReasons: optional(Record$1(String$1, String$1)),
|
|
22403
|
+
scannedFileCount: optional(Number$1),
|
|
22403
22404
|
elapsedMilliseconds: Number$1
|
|
22404
22405
|
}) {};
|
|
22405
22406
|
/**
|
|
@@ -43589,6 +43590,7 @@ const buildJsonReport = (input) => {
|
|
|
43589
43590
|
score: result.score,
|
|
43590
43591
|
skippedChecks: result.skippedChecks,
|
|
43591
43592
|
...result.skippedCheckReasons ? { skippedCheckReasons: result.skippedCheckReasons } : {},
|
|
43593
|
+
...typeof result.scannedFileCount === "number" ? { scannedFileCount: result.scannedFileCount } : {},
|
|
43592
43594
|
elapsedMilliseconds: result.elapsedMilliseconds
|
|
43593
43595
|
}));
|
|
43594
43596
|
const flattenedDiagnostics = projects.flatMap((entry) => entry.diagnostics);
|
|
@@ -43924,6 +43926,17 @@ const detectTerminalKind = (env = process.env) => {
|
|
|
43924
43926
|
return "unknown";
|
|
43925
43927
|
};
|
|
43926
43928
|
//#endregion
|
|
43929
|
+
//#region src/cli/utils/is-debug-flag.ts
|
|
43930
|
+
/**
|
|
43931
|
+
* Whether the user passed `--debug` (surface the run's Sentry trace id, and
|
|
43932
|
+
* force performance tracing on so there's a trace to surface). Read straight
|
|
43933
|
+
* from argv rather than Commander's parsed flags because `initializeSentry()`
|
|
43934
|
+
* runs before Commander parses — the same reason `shouldEnableSentry()` reads
|
|
43935
|
+
* `--no-score` from argv. Sharing this one reader keeps the init-time sampling
|
|
43936
|
+
* override and the end-of-run print in agreement.
|
|
43937
|
+
*/
|
|
43938
|
+
const isDebugFlagEnabled = (argv = process.argv) => argv.includes("--debug");
|
|
43939
|
+
//#endregion
|
|
43927
43940
|
//#region src/cli/utils/is-git-hook-environment.ts
|
|
43928
43941
|
const isGitHookEnvironment = () => Boolean(process.env.GIT_DIR);
|
|
43929
43942
|
//#endregion
|
|
@@ -44031,7 +44044,7 @@ const makeNoopConsole = () => ({
|
|
|
44031
44044
|
});
|
|
44032
44045
|
//#endregion
|
|
44033
44046
|
//#region src/cli/utils/version.ts
|
|
44034
|
-
const VERSION = "0.5.6-dev.
|
|
44047
|
+
const VERSION = "0.5.6-dev.740211c";
|
|
44035
44048
|
//#endregion
|
|
44036
44049
|
//#region src/cli/utils/json-mode.ts
|
|
44037
44050
|
let context = null;
|
|
@@ -44183,6 +44196,7 @@ const buildRunContext = () => {
|
|
|
44183
44196
|
interactive: !isNonInteractiveEnvironment(),
|
|
44184
44197
|
terminalKind: detectTerminalKind(),
|
|
44185
44198
|
jsonMode: isJsonModeActive(),
|
|
44199
|
+
debug: isDebugFlagEnabled(),
|
|
44186
44200
|
invokedVia: detectInvokedVia()
|
|
44187
44201
|
};
|
|
44188
44202
|
};
|
|
@@ -44254,6 +44268,7 @@ const buildSentryScope = (runContext = buildRunContext()) => {
|
|
|
44254
44268
|
interactive: runContext.interactive,
|
|
44255
44269
|
terminalKind: runContext.terminalKind,
|
|
44256
44270
|
jsonMode: runContext.jsonMode,
|
|
44271
|
+
debug: runContext.debug,
|
|
44257
44272
|
invokedVia: runContext.invokedVia,
|
|
44258
44273
|
nodeMajor: runContext.nodeMajor
|
|
44259
44274
|
};
|
|
@@ -44391,13 +44406,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
44391
44406
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
44392
44407
|
* standard `SENTRY_RELEASE` override.
|
|
44393
44408
|
*/
|
|
44394
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.5.6-dev.
|
|
44409
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.5.6-dev.740211c`;
|
|
44395
44410
|
/**
|
|
44396
44411
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
44397
44412
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
44398
44413
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
44399
44414
|
*/
|
|
44400
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.5.6-dev.
|
|
44415
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.5.6-dev.740211c") ? "development" : "production");
|
|
44401
44416
|
/**
|
|
44402
44417
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
44403
44418
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -44461,7 +44476,7 @@ const flushSentry = async () => {
|
|
|
44461
44476
|
const initializeSentry = () => {
|
|
44462
44477
|
if (isInitialized || !shouldEnableSentry()) return;
|
|
44463
44478
|
isInitialized = true;
|
|
44464
|
-
resolvedTracesSampleRate = resolveTracesSampleRate();
|
|
44479
|
+
resolvedTracesSampleRate = isDebugFlagEnabled() ? 1 : resolveTracesSampleRate();
|
|
44465
44480
|
const { tags, contexts } = buildSentryScope();
|
|
44466
44481
|
Sentry.init({
|
|
44467
44482
|
dsn: process.env.SENTRY_DSN || "https://f253d570240a59b8dbd77b7a548ef133@o4510226365743104.ingest.us.sentry.io/4511487817809920",
|
|
@@ -47677,6 +47692,11 @@ const setActiveRunTrace = (trace) => {
|
|
|
47677
47692
|
activeRunTrace = trace;
|
|
47678
47693
|
};
|
|
47679
47694
|
const getActiveRunTrace = () => activeRunTrace;
|
|
47695
|
+
let lastRunTraceId = null;
|
|
47696
|
+
const recordRunTraceId = (traceId) => {
|
|
47697
|
+
lastRunTraceId = traceId;
|
|
47698
|
+
};
|
|
47699
|
+
const getLastRunTraceId = () => lastRunTraceId;
|
|
47680
47700
|
//#endregion
|
|
47681
47701
|
//#region src/cli/utils/to-span-attributes.ts
|
|
47682
47702
|
/**
|
|
@@ -47739,14 +47759,13 @@ const withSentryRunSpan = (run, options = {}) => {
|
|
|
47739
47759
|
op: "cli.inspect",
|
|
47740
47760
|
attributes: toSpanAttributes(tags)
|
|
47741
47761
|
}, (rootSpan) => {
|
|
47742
|
-
|
|
47743
|
-
|
|
47744
|
-
|
|
47745
|
-
|
|
47746
|
-
|
|
47747
|
-
|
|
47748
|
-
|
|
47749
|
-
}
|
|
47762
|
+
const spanContext = rootSpan.spanContext();
|
|
47763
|
+
recordRunTraceId(spanContext.traceId);
|
|
47764
|
+
if (options.concurrentScan !== true) setActiveRunTrace({
|
|
47765
|
+
traceId: spanContext.traceId,
|
|
47766
|
+
spanId: spanContext.spanId,
|
|
47767
|
+
sampled: (spanContext.traceFlags & 1) === 1
|
|
47768
|
+
});
|
|
47750
47769
|
return run(rootSpan);
|
|
47751
47770
|
});
|
|
47752
47771
|
};
|
|
@@ -52131,6 +52150,7 @@ const reportErrorToSentry = async (error) => {
|
|
|
52131
52150
|
sampled: runTrace.sampled,
|
|
52132
52151
|
sampleRand: Math.random()
|
|
52133
52152
|
});
|
|
52153
|
+
recordRunTraceId(scope.getPropagationContext().traceId);
|
|
52134
52154
|
return Sentry.captureException(error);
|
|
52135
52155
|
});
|
|
52136
52156
|
await Sentry.flush(SENTRY_FLUSH_TIMEOUT_MS);
|
|
@@ -52745,6 +52765,10 @@ const validateModeFlags = (flags) => {
|
|
|
52745
52765
|
if (flags.staged && (flags.scope === "full" || flags.scope === "changed")) throw new CliInputError(`Cannot combine --staged with --scope ${flags.scope}; use --scope files or --scope lines, or drop --scope.`);
|
|
52746
52766
|
if (flags.score && flags.json) throw new CliInputError("Cannot combine --score and --json; pick one output mode.");
|
|
52747
52767
|
if (flags.score && flags.telemetry === false) throw new CliInputError("Cannot combine --score with --no-telemetry; --score prints the score that --no-telemetry disables.");
|
|
52768
|
+
if (flags.debug && (flags.score === false || flags.telemetry === false)) {
|
|
52769
|
+
const disablingFlag = flags.score === false ? "--no-score" : "--no-telemetry";
|
|
52770
|
+
throw new CliInputError(`Cannot combine --debug with ${disablingFlag}; ${disablingFlag} disables the Sentry reporting --debug needs to capture a trace.`);
|
|
52771
|
+
}
|
|
52748
52772
|
};
|
|
52749
52773
|
//#endregion
|
|
52750
52774
|
//#region src/cli/commands/inspect.ts
|
|
@@ -53098,6 +53122,7 @@ const inspectAction = async (directory, flags) => {
|
|
|
53098
53122
|
} catch (error) {
|
|
53099
53123
|
const isUserError = isExpectedUserError(error);
|
|
53100
53124
|
const sentryEventId = isUserError ? void 0 : await reportErrorToSentry(error);
|
|
53125
|
+
if (isDebugFlagEnabled()) await flushSentry();
|
|
53101
53126
|
if (isJsonMode) {
|
|
53102
53127
|
writeJsonErrorReport(error, sentryEventId);
|
|
53103
53128
|
process.exitCode = 1;
|
|
@@ -53820,6 +53845,33 @@ const normalizeHelpInvocation = (argv, knownCommands) => {
|
|
|
53820
53845
|
return [...nodeArguments, "--help"];
|
|
53821
53846
|
};
|
|
53822
53847
|
//#endregion
|
|
53848
|
+
//#region src/cli/utils/print-debug-trace.ts
|
|
53849
|
+
/**
|
|
53850
|
+
* The `--debug` end-of-run line, pure so it's testable without the Sentry SDK.
|
|
53851
|
+
* Mirrors the crash-reference phrasing in `handle-error.ts` ("mention this when
|
|
53852
|
+
* reporting") so users learn one habit for both paths. A `null` trace says why,
|
|
53853
|
+
* so `--debug` never silently does nothing.
|
|
53854
|
+
*/
|
|
53855
|
+
const buildDebugTraceMessage = (traceId) => traceId === null ? "Sentry trace unavailable for this run (no trace was recorded)." : `Sentry trace (mention this when reporting): ${traceId}`;
|
|
53856
|
+
/**
|
|
53857
|
+
* Prints the run's Sentry trace id to stderr at the end of a `--debug` run, so
|
|
53858
|
+
* maintainers can pull the full trace from a pasted id. Runs from the process
|
|
53859
|
+
* `exit` handler, so it's the last line on both the success path and the error
|
|
53860
|
+
* funnels (which `process.exit()` before the promise chain could resume).
|
|
53861
|
+
*
|
|
53862
|
+
* Writes straight to `process.stderr` (not `Console`) for three reasons: the
|
|
53863
|
+
* exit handler is synchronous, JSON mode patches the global console to no-ops —
|
|
53864
|
+
* a diagnostic the user explicitly asked for must survive that — and stderr
|
|
53865
|
+
* keeps `--json` / `--score` stdout machine-clean. The write is wrapped because
|
|
53866
|
+
* a diagnostic must never throw out of an exit handler.
|
|
53867
|
+
*/
|
|
53868
|
+
const printDebugTrace = () => {
|
|
53869
|
+
if (!Sentry.isInitialized()) return;
|
|
53870
|
+
try {
|
|
53871
|
+
process.stderr.write(`${highlighter.dim(buildDebugTraceMessage(getLastRunTraceId()))}\n`);
|
|
53872
|
+
} catch {}
|
|
53873
|
+
};
|
|
53874
|
+
//#endregion
|
|
53823
53875
|
//#region src/cli/utils/removed-cli-flags.ts
|
|
53824
53876
|
const REMOVED_FLAGS = new Map([
|
|
53825
53877
|
["--full", "use `--diff false` to force a full scan"],
|
|
@@ -53846,6 +53898,7 @@ const ROOT_FLAG_SPEC = {
|
|
|
53846
53898
|
longOptionsWithoutValues: new Set([
|
|
53847
53899
|
"--color",
|
|
53848
53900
|
"--dead-code",
|
|
53901
|
+
"--debug",
|
|
53849
53902
|
"--help",
|
|
53850
53903
|
"--json",
|
|
53851
53904
|
"--json-compact",
|
|
@@ -54013,6 +54066,9 @@ const stripUnknownCliFlags = (argv) => {
|
|
|
54013
54066
|
initializeSentry();
|
|
54014
54067
|
process.on("SIGINT", exitGracefully);
|
|
54015
54068
|
process.on("SIGTERM", exitGracefully);
|
|
54069
|
+
process.on("exit", () => {
|
|
54070
|
+
if (isDebugFlagEnabled()) printDebugTrace();
|
|
54071
|
+
});
|
|
54016
54072
|
unrefStdin();
|
|
54017
54073
|
guardStdin();
|
|
54018
54074
|
const formatExampleLines = (examples) => {
|
|
@@ -54057,7 +54113,7 @@ ${highlighter.dim("Learn more:")}
|
|
|
54057
54113
|
${highlighter.info(CANONICAL_GITHUB_URL)}
|
|
54058
54114
|
`;
|
|
54059
54115
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
54060
|
-
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("--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("-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("--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);
|
|
54116
|
+
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("-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("--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);
|
|
54061
54117
|
program.action(inspectAction);
|
|
54062
54118
|
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));
|
|
54063
54119
|
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);
|
|
@@ -54100,4 +54156,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
54100
54156
|
export {};
|
|
54101
54157
|
|
|
54102
54158
|
//# sourceMappingURL=cli.js.map
|
|
54103
|
-
//# debugId=
|
|
54159
|
+
//# debugId=f029f05b-4c71-52d3-b523-0834d67de2d4
|
package/dist/index.d.ts
CHANGED
|
@@ -9794,6 +9794,16 @@ interface JsonReportProjectEntry {
|
|
|
9794
9794
|
skippedChecks: string[];
|
|
9795
9795
|
/** Human-readable explanation per skipped check. See `InspectResult.skippedCheckReasons`. */
|
|
9796
9796
|
skippedCheckReasons?: Record<string, string>;
|
|
9797
|
+
/**
|
|
9798
|
+
* Number of source files this scan's linter examined. In diff / changed
|
|
9799
|
+
* mode it's the count of changed React-eligible files (`.tsx`/`.jsx` plus
|
|
9800
|
+
* framework entry files); in a full scan it's the whole source tree. `0`
|
|
9801
|
+
* in a diff scan means the changed files held nothing React Doctor lints —
|
|
9802
|
+
* the GitHub Action reads that as "nothing to report" (skips the PR comment;
|
|
9803
|
+
* the commit status says "skipped"). Optional: absent on reports from
|
|
9804
|
+
* constructors that don't track it (e.g. `toJsonReport`).
|
|
9805
|
+
*/
|
|
9806
|
+
scannedFileCount?: number;
|
|
9797
9807
|
elapsedMilliseconds: number;
|
|
9798
9808
|
}
|
|
9799
9809
|
interface JsonReportSummary {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="efaa91ed-3659-50a5-b802-51753472b2d6")}catch(e){}}();
|
|
3
3
|
import { r as __toESM$1, t as __commonJSMin$1 } from "./chunk-N93fKeF6.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as NFS from "node:fs";
|
|
@@ -19298,6 +19298,7 @@ var JsonReportProjectEntry = class extends Class("JsonReportProjectEntry")({
|
|
|
19298
19298
|
score: Unknown,
|
|
19299
19299
|
skippedChecks: ArraySchema(String$1),
|
|
19300
19300
|
skippedCheckReasons: optional(Record$1(String$1, String$1)),
|
|
19301
|
+
scannedFileCount: optional(Number$1),
|
|
19301
19302
|
elapsedMilliseconds: Number$1
|
|
19302
19303
|
}) {};
|
|
19303
19304
|
/**
|
|
@@ -40329,6 +40330,7 @@ const buildJsonReport = (input) => {
|
|
|
40329
40330
|
score: result.score,
|
|
40330
40331
|
skippedChecks: result.skippedChecks,
|
|
40331
40332
|
...result.skippedCheckReasons ? { skippedCheckReasons: result.skippedCheckReasons } : {},
|
|
40333
|
+
...typeof result.scannedFileCount === "number" ? { scannedFileCount: result.scannedFileCount } : {},
|
|
40332
40334
|
elapsedMilliseconds: result.elapsedMilliseconds
|
|
40333
40335
|
}));
|
|
40334
40336
|
const flattenedDiagnostics = projects.flatMap((entry) => entry.diagnostics);
|
|
@@ -40595,4 +40597,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
40595
40597
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
40596
40598
|
|
|
40597
40599
|
//# sourceMappingURL=index.js.map
|
|
40598
|
-
//# debugId=
|
|
40600
|
+
//# debugId=efaa91ed-3659-50a5-b802-51753472b2d6
|
package/dist/lsp.js
CHANGED
|
@@ -19335,6 +19335,7 @@ var JsonReportProjectEntry = class extends Class("JsonReportProjectEntry")({
|
|
|
19335
19335
|
score: Unknown,
|
|
19336
19336
|
skippedChecks: ArraySchema(String$1),
|
|
19337
19337
|
skippedCheckReasons: optional(Record$1(String$1, String$1)),
|
|
19338
|
+
scannedFileCount: optional(Number$1),
|
|
19338
19339
|
elapsedMilliseconds: Number$1
|
|
19339
19340
|
}) {};
|
|
19340
19341
|
/**
|
|
@@ -42377,5 +42378,5 @@ const startLanguageServer = () => {
|
|
|
42377
42378
|
};
|
|
42378
42379
|
//#endregion
|
|
42379
42380
|
export { startLanguageServer };
|
|
42380
|
-
!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]="
|
|
42381
|
-
//# debugId=
|
|
42381
|
+
!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]="657a7bbf-22e5-505b-a956-410727faec39")}catch(e){}}();
|
|
42382
|
+
//# debugId=657a7bbf-22e5-505b-a956-410727faec39
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.5.6-dev.
|
|
3
|
+
"version": "0.5.6-dev.740211c",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"vscode-languageserver": "^9.0.1",
|
|
65
65
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
66
66
|
"vscode-uri": "^3.1.0",
|
|
67
|
-
"oxlint-plugin-react-doctor": "0.5.6-dev.
|
|
67
|
+
"oxlint-plugin-react-doctor": "0.5.6-dev.740211c"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/babel__code-frame": "^7.27.0",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"commander": "^14.0.3",
|
|
74
74
|
"ora": "^9.4.0",
|
|
75
75
|
"@react-doctor/api": "0.5.6",
|
|
76
|
-
"@react-doctor/
|
|
77
|
-
"@react-doctor/
|
|
76
|
+
"@react-doctor/core": "0.5.6",
|
|
77
|
+
"@react-doctor/language-server": "0.5.6"
|
|
78
78
|
},
|
|
79
79
|
"engines": {
|
|
80
80
|
"node": "^20.19.0 || >=22.13.0"
|