react-doctor 0.9.17 → 0.9.18-dev.9a79847

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 (43) hide show
  1. package/README.md +16 -72
  2. package/dist/{build-section-divider-BpE5NDDX.js → build-section-divider-F18iXtxb.js} +5 -5
  3. package/dist/{ci-DNtt9X6S.js → ci-CgtjUZEp.js} +24 -14
  4. package/dist/cli.js +41 -32
  5. package/dist/constants-DNh19qg9.js +2 -2
  6. package/dist/{constants-DHn5rUeg.js → constants-_b1h6lxa.js} +7 -5
  7. package/dist/{design-u2afuNir.js → design-CtHsB1nr.js} +4 -4
  8. package/dist/duplicate-jsx-worker.js +3 -3
  9. package/dist/{exit-gracefully-DlI5QxjC.js → exit-gracefully-D1DuwwPU.js} +6 -6
  10. package/dist/{handle-error-ChH7NTTt.js → handle-error-B3AmBrIU.js} +6 -6
  11. package/dist/index.d.ts +14 -6
  12. package/dist/index.js +332 -58
  13. package/dist/{inspect-BEMrqB0D.js → inspect-BhFj2qyJ.js} +31 -23
  14. package/dist/{install-rmw4kZuQ.js → install-3nDOB3hj.js} +10 -10
  15. package/dist/{install-doctor-script-D5XbyGON.js → install-doctor-script-DHJd_h8L.js} +10 -6
  16. package/dist/{install-github-workflow-bsR3MAJ4.js → install-github-workflow-BPUJzESV.js} +22 -8
  17. package/dist/{install-react-doctor-CEZd9boZ.js → install-react-doctor-IU3RmjJs.js} +9 -9
  18. package/dist/{is-cache-globally-disabled-DDlh_f1u.js → is-cache-globally-disabled-BTTLvugj.js} +4 -4
  19. package/dist/{jsx-runtime-RhgTgCyJ.js → jsx-runtime-BpqeSsvv.js} +6 -6
  20. package/dist/{print-branded-header-DUpSxfB1.js → print-branded-header-Cabdds8M.js} +4 -4
  21. package/dist/{prompt-runtime-scan-url-ClnyA-kD.js → prompt-runtime-scan-url-DqGtnZaE.js} +5 -5
  22. package/dist/{read-object-file-BmbbCthv.js → read-object-file-OstnyYB2.js} +4 -4
  23. package/dist/{record-metric-BNXhF2A-.js → record-metric-CgebwK0K.js} +439 -84
  24. package/dist/{report-error-BaQdqDfo.js → report-error-DYLN3xZA.js} +6 -6
  25. package/dist/{report-workflow-result-keduRDKN.js → report-workflow-result-BfR_cSwa.js} +8 -7
  26. package/dist/{should-fail-scan-gate-DobEL_kS.js → resolve-scan-exit-code-CMj5rx-z.js} +38 -41
  27. package/dist/{resolve-scope-_R9av4PA.js → resolve-scope-DlV1G6NB.js} +10 -9
  28. package/dist/{rules-mbLozamL.js → rules-CCbE4U-k.js} +7 -7
  29. package/dist/{run-scan-app-yG6ELpUl.js → run-scan-app-D8hbdBvF.js} +33 -23
  30. package/dist/{runtime-scan-DNhYo683.js → runtime-scan-BINkjxmp.js} +10 -10
  31. package/dist/{sanitize-runtime-url-DM_qbPGY.js → sanitize-runtime-url-B3CaL49D.js} +4 -4
  32. package/dist/{scan-CAAixMS9.js → scan-D0JRVcBc.js} +14 -13
  33. package/dist/{should-skip-prompts-CGTEgq2F.js → should-skip-prompts-BQ6Bv8nf.js} +4 -4
  34. package/dist/{should-use-tui-DG2l-Td3.js → should-use-tui-BxO6yE3o.js} +4 -4
  35. package/dist/skills/react-doctor/SKILL.md +19 -8
  36. package/dist/skills/react-doctor/references/explain.md +5 -0
  37. package/dist/{start-scan-preamble-BPz3nzCQ.js → start-scan-preamble-BbzEgrwo.js} +5 -5
  38. package/dist/start-scan-preamble.js +3 -3
  39. package/dist/{telemetry-runtime-CUn1--rM.js → telemetry-runtime-BmL4aFx2.js} +7 -7
  40. package/dist/{version-CbFBCUY9.js → version-D2xd0HSm.js} +5 -5
  41. package/dist/{why-BIX2FUbP.js → why-CO9Za1ph.js} +4 -4
  42. package/dist/{with-run-span-BsS7dU6e.js → with-run-span-CMr4jR2i.js} +6 -6
  43. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9c3088b-03e9-58c9-85a8-461764e02e68")}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]="0eaa5205-d906-5228-bfb8-cef2337dfce5")}catch(e){}}();
3
3
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
4
- import { $ as warmReactCompilerDetection, $t as OXLINT_WORKER_JOB_END_MARKER, A as buildGitSourceListingRequest, An as TARGET_BLANK_BROWSER_SUPPORT, At as GITHUB_VIEWER_PERMISSION_TIMEOUT_MS, B as resolveGitCommand, Bt as MAINTAINABILITY_DUPLICATE_JSX_RULE, Cn as SUPPLY_CHAIN_CACHE_TTL_MS, Ct as ES_TARGET_YEAR_BY_NAME, Dn as SUPPLY_CHAIN_PLUGIN, Dt as GENERATED_BUNDLE_FILE_PATTERN, En as SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS, Et as FILE_LINT_CACHE_MAX_FILE_COUNT, F as lowerChildProcessPriority, Fn as VERCEL_NEXTJS_SECURITY_RELEASE_URL, Ft as HTML_FILE_PATTERN, G as resolvePluginPath, Gt as MINIFIED_SNIFF_BYTES, H as resolveOxlintThreadCount, It as IGNORED_DIRECTORIES, J as resolveTsConfigRelativePath, K as resolveReactDoctorCacheDir, Kt as OCCURRENCE_MATCHED_CATEGORIES, Lt as JSX_DUPLICATION_SOURCE_FILE_PATTERN, M as buildOxlintWorkerSpawnSpec, Mn as TELEMETRY_SHUTDOWN_TIMEOUT_MS, Mt as GIT_LS_FILES_MAX_BUFFER_BYTES, Nn as TSCONFIG_FILENAMES, Nt as GIT_SHOW_MAX_BUFFER_BYTES, On as SUPPLY_CHAIN_RULE, Ot as GENERATED_SOURCE_DIRECTORY_PATTERN, P as killUnadoptedOxlintWorkers, Pn as TYPESCRIPT_DECLARATION_FILE_PATTERN, Pt as GIT_SOURCE_LISTING_ARGUMENTS, Q as takeReactCompilerDetection, Qt as OXLINT_SPLIT_TOTAL_BUDGET_MS, R as readSystemConcurrencyFacts, Sn as SUPPLY_CHAIN_CACHE_SUBDIR, Tn as SUPPLY_CHAIN_IGNORED_PACKAGES, Tt as FILE_LINT_CACHE_FILENAME, U as resolveOxlintToolchainVersions, Ut as MAX_GLOB_PATTERN_LENGTH_CHARS, V as resolveOxlintBinary, Vt as MAINTAINABILITY_PLUGIN, W as resolveOxlintWorkerRuntime, Wt as MILLISECONDS_PER_SECOND, X as spawnOxlintWorkerProcess, Xt as OXLINT_OUTPUT_MAX_BYTES, Y as setChildProcessRef, Yt as OXLINT_OOM_RESCUE_BUDGET_MS, Z as takePrespawnedOxlintWorker, Zt as OXLINT_SPAWN_TIMEOUT_MS, _n as SOURCE_FILE_PATTERN, _t as DIAGNOSTIC_CATEGORY_BUCKETS, an as REACT_ROUTER_CAPABILITY_THRESHOLDS, at as AXIOM_METRICS_DATASET_HEADER, bn as SPAWN_ARGS_MAX_LENGTH_CHARS_POSIX, cn as ROOT_CAUSE_GROUPABLE_RULE_KEYS, d as METRIC_DISTRIBUTION_BOUNDARIES, dt as COMPILER_CLEANUP_BUCKET, en as PROJECT_ANALYSIS_WORKER_MAX_OLD_SPACE_MB, et as ABORT_EXIT_CODES, fn as SIDECAR_LINT_CACHE_FILENAME, ft as COMPILER_CLEANUP_RULE_KEYS, gn as SOCKET_PACKAGE_PAGE_BASE, gt as DEFAULT_BRANCH_CANDIDATES, hn as SOCKET_FREE_USER_AGENT, in as REACT_BLOG_RSC_ADVISORY_URL, j as buildOxlintChildEnv, jn as TELEMETRY_EXPORT_INTERVAL_MS, jt as GIT_CHECK_ATTR_MAX_BUFFER_BYTES, kn as TAILWIND_POSTCSS7_COMPAT_ALIAS, l as INTERNAL_ERROR_JSON_FALLBACK, ln as SCANNED_DOT_DIRECTORIES, mn as SOCKET_FREE_PURL_API_BASE, mt as CONFIG_FINGERPRINT_FILENAMES, nn as PROJECT_ANALYSIS_WORKER_TIMEOUT_CEILING_MS, nt as APP_ONLY_RULE_KEYS, on as REACT_SERVER_DOM_PACKAGES, ot as AXIOM_METRICS_PATH, pt as CONFIG_CACHE_TTL_MS, q as resolveScanConcurrency, qt as OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES, rn as PROJECT_ANALYSIS_WORKER_TIMEOUT_MS, rt as AXIOM_DATASET_HEADER, sn as RECOMMENDED_PNPM_MINIMUM_RELEASE_AGE_MINUTES, st as AXIOM_TRACES_PATH, tn as PROJECT_ANALYSIS_WORKER_MEMORY_BUDGET_BYTES, tt as ADOPTABLE_LINT_CONFIG_FILENAMES, un as SCORE_API_URL, vn as SPAWN_ARGS_MAX_LENGTH_CHARS, vt as DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS, wn as SUPPLY_CHAIN_CATEGORY, wt as FETCH_TIMEOUT_MS, xn as STAGED_FILES_PROJECT_CONFIG_FILENAMES, xt as DUPLICATE_JSX_WORKER_IDLE_TIMEOUT_MS, yn as SPAWN_ARGS_MAX_LENGTH_CHARS_DARWIN, yt as DOCS_RULES_BASE_URL, z as resolveConfiguredScanConcurrency, zt as MAINTAINABILITY_CATEGORY } from "./constants-DHn5rUeg.js";
4
+ import { $ as warmReactCompilerDetection, $t as OXLINT_WORKER_JOB_END_MARKER, A as buildGitSourceListingRequest, An as TARGET_BLANK_BROWSER_SUPPORT, At as GITHUB_VIEWER_PERMISSION_TIMEOUT_MS, B as resolveGitCommand, Bt as MAINTAINABILITY_DUPLICATE_JSX_RULE, Cn as SUPPLY_CHAIN_CACHE_TTL_MS, Ct as ES_TARGET_YEAR_BY_NAME, Dn as SUPPLY_CHAIN_PLUGIN, Dt as GENERATED_BUNDLE_FILE_PATTERN, En as SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS, Et as FILE_LINT_CACHE_MAX_FILE_COUNT, F as lowerChildProcessPriority, Fn as VERCEL_NEXTJS_SECURITY_RELEASE_URL, Ft as HTML_FILE_PATTERN, G as resolvePluginPath, Gt as MINIFIED_SNIFF_BYTES, H as resolveOxlintThreadCount, It as IGNORED_DIRECTORIES, J as resolveTsConfigRelativePath, K as resolveReactDoctorCacheDir, Kt as OCCURRENCE_MATCHED_CATEGORIES, Lt as JSX_DUPLICATION_SOURCE_FILE_PATTERN, M as buildOxlintWorkerSpawnSpec, Mn as TELEMETRY_SHUTDOWN_TIMEOUT_MS, Mt as GIT_LS_FILES_MAX_BUFFER_BYTES, Nn as TSCONFIG_FILENAMES, Nt as GIT_SHOW_MAX_BUFFER_BYTES, On as SUPPLY_CHAIN_RULE, Ot as GENERATED_SOURCE_DIRECTORY_PATTERN, P as killUnadoptedOxlintWorkers, Pn as TYPESCRIPT_DECLARATION_FILE_PATTERN, Pt as GIT_SOURCE_LISTING_ARGUMENTS, Q as takeReactCompilerDetection, Qt as OXLINT_SPLIT_TOTAL_BUDGET_MS, R as readSystemConcurrencyFacts, Sn as SUPPLY_CHAIN_CACHE_SUBDIR, Tn as SUPPLY_CHAIN_IGNORED_PACKAGES, Tt as FILE_LINT_CACHE_FILENAME, U as resolveOxlintToolchainVersions, Ut as MAX_GLOB_PATTERN_LENGTH_CHARS, V as resolveOxlintBinary, Vt as MAINTAINABILITY_PLUGIN, W as resolveOxlintWorkerRuntime, Wt as MILLISECONDS_PER_SECOND, X as spawnOxlintWorkerProcess, Xt as OXLINT_OUTPUT_MAX_BYTES, Y as setChildProcessRef, Yt as OXLINT_OOM_RESCUE_BUDGET_MS, Z as takePrespawnedOxlintWorker, Zt as OXLINT_SPAWN_TIMEOUT_MS, _n as SOURCE_FILE_PATTERN, _t as DIAGNOSTIC_CATEGORY_BUCKETS, an as REACT_ROUTER_CAPABILITY_THRESHOLDS, at as AXIOM_METRICS_DATASET_HEADER, bn as SPAWN_ARGS_MAX_LENGTH_CHARS_POSIX, cn as ROOT_CAUSE_GROUPABLE_RULE_KEYS, d as METRIC_DISTRIBUTION_BOUNDARIES, dt as COMPILER_CLEANUP_BUCKET, en as PROJECT_ANALYSIS_WORKER_MAX_OLD_SPACE_MB, et as ABORT_EXIT_CODES, fn as SIDECAR_LINT_CACHE_FILENAME, ft as COMPILER_CLEANUP_RULE_KEYS, gn as SOCKET_PACKAGE_PAGE_BASE, gt as DEFAULT_BRANCH_CANDIDATES, hn as SOCKET_FREE_USER_AGENT, in as REACT_BLOG_RSC_ADVISORY_URL, j as buildOxlintChildEnv, jn as TELEMETRY_EXPORT_INTERVAL_MS, jt as GIT_CHECK_ATTR_MAX_BUFFER_BYTES, kn as TAILWIND_POSTCSS7_COMPAT_ALIAS, l as INTERNAL_ERROR_JSON_FALLBACK, ln as SCANNED_DOT_DIRECTORIES, mn as SOCKET_FREE_PURL_API_BASE, mt as CONFIG_FINGERPRINT_FILENAMES, nn as PROJECT_ANALYSIS_WORKER_TIMEOUT_CEILING_MS, nt as APP_ONLY_RULE_KEYS, on as REACT_SERVER_DOM_PACKAGES, ot as AXIOM_METRICS_PATH, pt as CONFIG_CACHE_TTL_MS, q as resolveScanConcurrency, qt as OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES, rn as PROJECT_ANALYSIS_WORKER_TIMEOUT_MS, rt as AXIOM_DATASET_HEADER, sn as RECOMMENDED_PNPM_MINIMUM_RELEASE_AGE_MINUTES, st as AXIOM_TRACES_PATH, tn as PROJECT_ANALYSIS_WORKER_MEMORY_BUDGET_BYTES, tt as ADOPTABLE_LINT_CONFIG_FILENAMES, un as SCORE_API_URL, vn as SPAWN_ARGS_MAX_LENGTH_CHARS, vt as DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS, wn as SUPPLY_CHAIN_CATEGORY, wt as FETCH_TIMEOUT_MS, xn as STAGED_FILES_PROJECT_CONFIG_FILENAMES, xt as DUPLICATE_JSX_WORKER_IDLE_TIMEOUT_MS, yn as SPAWN_ARGS_MAX_LENGTH_CHARS_DARWIN, yt as DOCS_RULES_BASE_URL, z as resolveConfiguredScanConcurrency, zt as MAINTAINABILITY_CATEGORY } from "./constants-_b1h6lxa.js";
5
5
  import { n as require_picomatch, t as require_semver } from "./semver-BZIuy1gP.js";
6
6
  import { createRequire } from "node:module";
7
7
  import * as fs$1$2 from "node:fs";
@@ -20,7 +20,7 @@ import { Worker } from "node:worker_threads";
20
20
  import { parseSync } from "oxc-parser";
21
21
  import * as fs$1$1 from "node:fs/promises";
22
22
  import { ResolverFactory } from "oxc-resolver";
23
- import { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, REACT_DOCTOR_SCAN_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor/core";
23
+ import { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, REACT_DOCTOR_SCAN_RULES, atomicWriteFile, classifySecurityScanFile, collectCrossFileDependencyProbes, getDiagnosticContextPath, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor/core";
24
24
  import { parseJSON5, parseJSONC } from "confbox";
25
25
  import { createJiti } from "jiti";
26
26
  import { PassThrough } from "node:stream";
@@ -88,7 +88,7 @@ const unwrapTypescriptExpression = (expression) => {
88
88
  return currentExpression;
89
89
  };
90
90
  //#endregion
91
- //#region ../core/dist/collect-unplugin-auto-import-global-scopes-D2Skzhl1.js
91
+ //#region ../core/dist/collect-unplugin-auto-import-global-scopes-BhuBw8nC.js
92
92
  var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
93
93
  const LINGUIST_ATTRIBUTES = ["linguist-generated", "linguist-vendored"];
94
94
  const DISABLED_ATTRIBUTE_VALUES = new Set([
@@ -526,14 +526,14 @@ const collectUnpluginAutoImportGlobalScopes = ({ rootDirectory, candidateFiles }
526
526
  return scopes.some((scope) => scope.names.length > 0) ? scopes : [];
527
527
  };
528
528
  //#endregion
529
- //#region ../core/dist/detect-duplicate-jsx-subtrees-CzQouU4i.js
529
+ //#region ../core/dist/detect-duplicate-jsx-subtrees-DcK8lwow.js
530
530
  const yieldToEventLoop = () => new Promise((resolve) => {
531
531
  setImmediate(resolve);
532
532
  });
533
533
  const getTypescriptScriptKind = (fileName) => {
534
534
  if (fileName.endsWith(".tsx")) return typescriptBinding.ScriptKind.TSX;
535
535
  if (fileName.endsWith(".jsx")) return typescriptBinding.ScriptKind.JSX;
536
- if (fileName.endsWith(".ts")) return typescriptBinding.ScriptKind.TS;
536
+ if (/\.[cm]?ts$/.test(fileName)) return typescriptBinding.ScriptKind.TS;
537
537
  return typescriptBinding.ScriptKind.JS;
538
538
  };
539
539
  const resolveBoundedSourceReadBytes = (maximumLengthChars, sizeBytes) => Math.min(sizeBytes, maximumLengthChars * 3 + 1);
@@ -1083,7 +1083,7 @@ const detectDuplicateJsxSubtreesCooperative = async (sourceReader, options = {})
1083
1083
  });
1084
1084
  };
1085
1085
  //#endregion
1086
- //#region ../core/dist/detect-react-compiler-DIKiMJ1N.js
1086
+ //#region ../core/dist/detect-react-compiler-DDLkt9mH.js
1087
1087
  const NEXT_CONFIG_FILENAMES = [
1088
1088
  "next.config.js",
1089
1089
  "next.config.mjs",
@@ -5202,6 +5202,37 @@ const mapInput = /* @__PURE__ */ dual(2, (self, f) => make$37((b1, b2) => self(f
5202
5202
  */
5203
5203
  const isGreaterThan$1 = (O) => dual(2, (self, that) => O(self, that) === 1);
5204
5204
  /**
5205
+ * Checks whether one value is greater than or equal to another according to the given order.
5206
+ *
5207
+ * **When to use**
5208
+ *
5209
+ * Use when you need a boolean greater-than-or-equal predicate using an
5210
+ * `Order`.
5211
+ *
5212
+ * **Details**
5213
+ *
5214
+ * Returns `true` if the order returns `1` or `0`, and returns `false` only if
5215
+ * the order returns `-1`.
5216
+ *
5217
+ * **Example** (Checking greater-than-or-equal comparisons)
5218
+ *
5219
+ * ```ts
5220
+ * import { Order } from "effect"
5221
+ *
5222
+ * const isGreaterThanOrEqualToNumber = Order.isGreaterThanOrEqualTo(Order.Number)
5223
+ *
5224
+ * console.log(isGreaterThanOrEqualToNumber(2, 1)) // true
5225
+ * console.log(isGreaterThanOrEqualToNumber(1, 1)) // true
5226
+ * console.log(isGreaterThanOrEqualToNumber(1, 2)) // false
5227
+ * ```
5228
+ *
5229
+ * @see {@link isGreaterThan} for strict greater than
5230
+ * @see {@link isLessThanOrEqualTo} for less than or equal
5231
+ * @category predicates
5232
+ * @since 4.0.0
5233
+ */
5234
+ const isGreaterThanOrEqualTo$1 = (O) => dual(2, (self, that) => O(self, that) !== -1);
5235
+ /**
5205
5236
  * Returns the maximum of two values according to the given order. If they are equal, returns the first argument.
5206
5237
  *
5207
5238
  * **When to use**
@@ -22707,6 +22738,203 @@ function link$1() {
22707
22738
  };
22708
22739
  }
22709
22740
  /**
22741
+ * Creates a custom validation filter from a predicate function.
22742
+ *
22743
+ * **Details**
22744
+ *
22745
+ * The predicate receives the decoded input value, the schema AST, and parse
22746
+ * options, and returns a `FilterOutput`. Non-success outputs are normalized into
22747
+ * schema issues. The `annotations` parameter annotates the filter itself; with
22748
+ * the default formatter, failures use `message` first, `expected` second, and
22749
+ * `<filter>` when neither is provided.
22750
+ *
22751
+ * When `abort` is `true`, parsing stops after this filter fails instead of
22752
+ * collecting later check failures.
22753
+ *
22754
+ * **Example** (Reporting failure at a nested path)
22755
+ *
22756
+ * ```ts
22757
+ * import { Schema } from "effect"
22758
+ *
22759
+ * const schema = Schema.Struct({ password: Schema.String, confirmPassword: Schema.String }).check(
22760
+ * Schema.makeFilter((o) =>
22761
+ * o.password === o.confirmPassword
22762
+ * ? undefined
22763
+ * : { path: ["password"], issue: "password and confirmPassword must match" }
22764
+ * )
22765
+ * )
22766
+ *
22767
+ * console.log(String(Schema.decodeUnknownExit(schema)({ password: "123456", confirmPassword: "1234567" })))
22768
+ * // Failure(Cause([Fail(SchemaError: password and confirmPassword must match
22769
+ * // at ["password"])]))
22770
+ * ```
22771
+ *
22772
+ * **Example** (Reporting multiple failures at once)
22773
+ *
22774
+ * ```ts
22775
+ * import { Schema } from "effect"
22776
+ *
22777
+ * const schema = Schema.Struct({ a: Schema.Finite, b: Schema.Finite, c: Schema.Finite }).check(
22778
+ * Schema.makeFilter((o) => {
22779
+ * const issues: Array<Schema.FilterIssue> = []
22780
+ * if (o.a > 0) {
22781
+ * if (o.b <= 0) issues.push({ path: ["b"], issue: "b must be greater than 0" })
22782
+ * if (o.c <= 0) issues.push({ path: ["c"], issue: "c must be greater than 0" })
22783
+ * }
22784
+ * return issues
22785
+ * })
22786
+ * )
22787
+ *
22788
+ * console.log(String(Schema.decodeUnknownExit(schema)({ a: 1, b: 0, c: 0 })))
22789
+ * // Failure(Cause([Fail(SchemaError: b must be greater than 0
22790
+ * // at ["b"]
22791
+ * // c must be greater than 0
22792
+ * // at ["c"])]))
22793
+ * ```
22794
+ *
22795
+ * @category constructors
22796
+ * @since 4.0.0
22797
+ */
22798
+ const makeFilter = makeFilter$1;
22799
+ /**
22800
+ * Creates a greater-than (`>`) check for any ordered type from an
22801
+ * `Order.Order` instance.
22802
+ *
22803
+ * @category Order checks
22804
+ * @since 4.0.0
22805
+ */
22806
+ function makeIsGreaterThan(options) {
22807
+ const gt = isGreaterThan$1(options.order);
22808
+ const formatter = options.formatter ?? format$1;
22809
+ return (exclusiveMinimum, annotations) => {
22810
+ return makeFilter((input) => gt(input, exclusiveMinimum), {
22811
+ expected: `a value greater than ${formatter(exclusiveMinimum)}`,
22812
+ arbitrary: { constraint: { ordered: {
22813
+ order: options.order,
22814
+ minimum: exclusiveMinimum,
22815
+ exclusiveMinimum: true
22816
+ } } },
22817
+ ...options.annotate?.(exclusiveMinimum),
22818
+ ...annotations
22819
+ });
22820
+ };
22821
+ }
22822
+ /**
22823
+ * Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
22824
+ * `Order.Order` instance.
22825
+ *
22826
+ * @category Order checks
22827
+ * @since 4.0.0
22828
+ */
22829
+ function makeIsGreaterThanOrEqualTo(options) {
22830
+ const gte = isGreaterThanOrEqualTo$1(options.order);
22831
+ const formatter = options.formatter ?? format$1;
22832
+ return (minimum, annotations) => {
22833
+ return makeFilter((input) => gte(input, minimum), {
22834
+ expected: `a value greater than or equal to ${formatter(minimum)}`,
22835
+ arbitrary: { constraint: { ordered: {
22836
+ order: options.order,
22837
+ minimum
22838
+ } } },
22839
+ ...options.annotate?.(minimum),
22840
+ ...annotations
22841
+ });
22842
+ };
22843
+ }
22844
+ function encodeNumberPayload(number) {
22845
+ if (!globalThis.Number.isFinite(number)) throw new globalThis.RangeError(`Expected a finite number, got ${format$1(number)}`);
22846
+ return number;
22847
+ }
22848
+ /**
22849
+ * Validates that a number is greater than the specified value (exclusive).
22850
+ *
22851
+ * **Details**
22852
+ *
22853
+ * JSON Schema:
22854
+ *
22855
+ * This check corresponds to the `exclusiveMinimum` constraint in JSON Schema.
22856
+ *
22857
+ * Arbitrary:
22858
+ *
22859
+ * When generating test data with fast-check, this applies an
22860
+ * `exclusiveMinimum` constraint to ensure generated numbers are greater than
22861
+ * the specified value.
22862
+ *
22863
+ * @category Number checks
22864
+ * @since 4.0.0
22865
+ */
22866
+ const isGreaterThan = /* @__PURE__ */ makeIsGreaterThan({
22867
+ order: Number$5,
22868
+ annotate: (exclusiveMinimum) => ({
22869
+ representation: {
22870
+ id: "effect/schema/isGreaterThan",
22871
+ payload: { exclusiveMinimum: encodeNumberPayload(exclusiveMinimum) }
22872
+ },
22873
+ toJsonSchema: () => ({ exclusiveMinimum }),
22874
+ toCode: () => ({ runtime: `Schema.isGreaterThan(${format$1(exclusiveMinimum)})` })
22875
+ })
22876
+ });
22877
+ /**
22878
+ * Validates that a number is greater than or equal to the specified value
22879
+ * (inclusive).
22880
+ *
22881
+ * **Details**
22882
+ *
22883
+ * JSON Schema:
22884
+ *
22885
+ * This check corresponds to the `minimum` constraint in JSON Schema.
22886
+ *
22887
+ * Arbitrary:
22888
+ *
22889
+ * When generating test data with fast-check, this applies a `minimum` constraint
22890
+ * to ensure generated numbers are greater than or equal to the specified value.
22891
+ *
22892
+ * @category Number checks
22893
+ * @since 4.0.0
22894
+ */
22895
+ const isGreaterThanOrEqualTo = /* @__PURE__ */ makeIsGreaterThanOrEqualTo({
22896
+ order: Number$5,
22897
+ annotate: (minimum) => ({
22898
+ representation: {
22899
+ id: "effect/schema/isGreaterThanOrEqualTo",
22900
+ payload: { minimum: encodeNumberPayload(minimum) }
22901
+ },
22902
+ toJsonSchema: () => ({ minimum }),
22903
+ toCode: () => ({ runtime: `Schema.isGreaterThanOrEqualTo(${format$1(minimum)})` })
22904
+ })
22905
+ });
22906
+ /**
22907
+ * Validates that a number is a safe integer (within the safe integer range
22908
+ * that can be exactly represented in JavaScript).
22909
+ *
22910
+ * **Details**
22911
+ *
22912
+ * JSON Schema:
22913
+ *
22914
+ * This check corresponds to the `type: "integer"` constraint in JSON Schema.
22915
+ *
22916
+ * Arbitrary:
22917
+ *
22918
+ * When generating test data with fast-check, this applies an `integer: true`
22919
+ * constraint to ensure generated numbers are integers.
22920
+ *
22921
+ * @category Integer checks
22922
+ * @since 4.0.0
22923
+ */
22924
+ function isInt(annotations) {
22925
+ return makeFilter((n) => globalThis.Number.isSafeInteger(n), {
22926
+ expected: "an integer",
22927
+ representation: {
22928
+ id: "effect/schema/isInt",
22929
+ payload: null
22930
+ },
22931
+ toJsonSchema: () => ({ type: "integer" }),
22932
+ toCode: () => ({ runtime: "Schema.isInt()" }),
22933
+ arbitrary: { constraint: { integer: true } },
22934
+ ...annotations
22935
+ });
22936
+ }
22937
+ /**
22710
22938
  * Schema for values that hide sensitive information from error output and
22711
22939
  * inspection.
22712
22940
  *
@@ -70751,39 +70979,46 @@ var Files = class Files extends Service()("react-doctor/Files") {
70751
70979
  };
70752
70980
  };
70753
70981
  const HUNK_HEADER_PATTERN = /^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@/;
70754
- /**
70755
- * Parses a `git diff --unified=0` patch into the inclusive 1-based line ranges
70756
- * each file added or modified on the new side. Files are keyed by the path in
70757
- * the `+++ b/<path>` header (with `--relative`, relative to the diff's cwd).
70758
- * Added/renamed/modified files appear; pure deletions (`+++ /dev/null`) are
70759
- * skipped because they have no new-side line to report on.
70760
- */
70761
- const parseChangedLineRanges = (patch) => {
70762
- const rangesByFile = /* @__PURE__ */ new Map();
70763
- let currentRanges = null;
70982
+ const parseChangedLineRanges = (patch, includeDeletions = false) => {
70983
+ const changesByFile = /* @__PURE__ */ new Map();
70984
+ let currentChanges = null;
70764
70985
  for (const line of patch.split("\n")) {
70986
+ if (includeDeletions && line.startsWith("rename to ")) {
70987
+ const file = line.slice(10);
70988
+ changesByFile.set(file, {
70989
+ file,
70990
+ ranges: [],
70991
+ deletionLines: []
70992
+ });
70993
+ }
70765
70994
  if (line.startsWith("+++ ")) {
70766
70995
  const target = line.slice(4).trim();
70767
70996
  if (target === "/dev/null") {
70768
- currentRanges = null;
70997
+ currentChanges = null;
70769
70998
  continue;
70770
70999
  }
70771
71000
  const file = target.startsWith("b/") ? target.slice(2) : target;
70772
- currentRanges = rangesByFile.get(file) ?? [];
70773
- rangesByFile.set(file, currentRanges);
71001
+ currentChanges = changesByFile.get(file) ?? {
71002
+ file,
71003
+ ranges: [],
71004
+ deletionLines: []
71005
+ };
71006
+ changesByFile.set(file, currentChanges);
70774
71007
  continue;
70775
71008
  }
70776
- if (currentRanges === null) continue;
71009
+ if (currentChanges === null) continue;
70777
71010
  const hunk = HUNK_HEADER_PATTERN.exec(line);
70778
71011
  if (hunk === null) continue;
70779
71012
  const start = Number(hunk[1]);
70780
71013
  const lineCount = hunk[2] === void 0 ? 1 : Number(hunk[2]);
70781
- if (lineCount <= 0) continue;
70782
- currentRanges.push([start, start + lineCount - 1]);
71014
+ if (lineCount === 0) {
71015
+ if (includeDeletions) currentChanges.deletionLines.push(start);
71016
+ } else currentChanges.ranges.push([start, start + lineCount - 1]);
70783
71017
  }
70784
- return [...rangesByFile].filter(([, ranges]) => ranges.length > 0).map(([file, ranges]) => ({
71018
+ return [...changesByFile.values()].filter((entry) => entry.ranges.length > 0 || includeDeletions).map(({ file, ranges, deletionLines }) => ({
70785
71019
  file,
70786
- ranges
71020
+ ranges,
71021
+ ...deletionLines.length > 0 ? { deletionLines } : {}
70787
71022
  }));
70788
71023
  };
70789
71024
  const trimOrNull = (value) => {
@@ -71268,7 +71503,7 @@ var Git = class Git extends Service()("react-doctor/Git") {
71268
71503
  stdout: result.stdout
71269
71504
  };
71270
71505
  }).pipe(withSpan("Git.grep")),
71271
- changedLineRanges: ({ directory, baseRef, cached, files, includeUntracked = false }) => gen(function* () {
71506
+ changedLineRanges: ({ directory, baseRef, cached, files, includeUntracked = false, includeDeletions = false }) => gen(function* () {
71272
71507
  if (files.length === 0) return [];
71273
71508
  if (baseRef !== void 0 && !isSafeGitRevision(baseRef)) return null;
71274
71509
  const result = yield* runGit(directory, [
@@ -71283,7 +71518,7 @@ var Git = class Git extends Service()("react-doctor/Git") {
71283
71518
  ...files
71284
71519
  ]);
71285
71520
  if (result.status !== 0) return null;
71286
- const changedLineRanges = parseChangedLineRanges(result.stdout);
71521
+ const changedLineRanges = parseChangedLineRanges(result.stdout, includeDeletions);
71287
71522
  if (cached || !includeUntracked) return changedLineRanges;
71288
71523
  const untrackedFilePaths = yield* listUntrackedFilePaths(directory, files);
71289
71524
  if (untrackedFilePaths === null) return changedLineRanges;
@@ -71723,6 +71958,7 @@ const normalizeConfigForHash = (config) => {
71723
71958
  const clone = JSON.parse(JSON.stringify(config));
71724
71959
  if (clone?.settings?.["react-doctor"]) {
71725
71960
  const reactDoctorSettings = clone.settings["react-doctor"];
71961
+ delete reactDoctorSettings.diagnosticContextDirectory;
71726
71962
  reactDoctorSettings.rootDirectory = ROOT_DIRECTORY_PLACEHOLDER;
71727
71963
  if (Array.isArray(reactDoctorSettings.unpluginAutoImportRootDirectories)) reactDoctorSettings.unpluginAutoImportRootDirectories = [ROOT_DIRECTORY_PLACEHOLDER];
71728
71964
  }
@@ -71884,7 +72120,7 @@ const buildUserPluginRules = (userPlugin, severityControls) => {
71884
72120
  }
71885
72121
  return enabled;
71886
72122
  };
71887
- const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, extendsPaths = [], ignoredTags = /* @__PURE__ */ new Set(), includedTags = /* @__PURE__ */ new Set(), includeTagDefaults = false, runtimeGlobals, unpluginAutoImportGlobalScopes, serverAuthFunctionNames, projectIndexModuleSources, severityControls, adoptedSettings = {}, userPlugins = [], disableReactHooksJsPlugin = false, ruleSelection, sidecarRuleIdFilter }) => {
72123
+ const createOxlintConfig = ({ pluginPath, diagnosticContextDirectory, project, customRulesOnly = false, extendsPaths = [], ignoredTags = /* @__PURE__ */ new Set(), includedTags = /* @__PURE__ */ new Set(), includeTagDefaults = false, runtimeGlobals, unpluginAutoImportGlobalScopes, serverAuthFunctionNames, projectIndexModuleSources, severityControls, adoptedSettings = {}, userPlugins = [], disableReactHooksJsPlugin = false, ruleSelection, sidecarRuleIdFilter }) => {
71888
72124
  const hasIncludedTags = includedTags.size > 0;
71889
72125
  const reactHooksJsPlugin = disableReactHooksJsPlugin || ruleSelection === "sidecar" || hasIncludedTags ? null : resolveReactHooksJsPlugin(project.hasReactCompiler || project.hasReactCompilerLintPlugin === true, customRulesOnly);
71890
72126
  const reactCompilerRules = reactHooksJsPlugin ? applyRuleSeverityControls(filterRulesToAvailable(REACT_COMPILER_RULES, "react-hooks-js", reactHooksJsPlugin.availableRuleNames), severityControls) : {};
@@ -71904,10 +72140,10 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
71904
72140
  if (ruleSelection === "sidecar" && sidecarRuleIdFilter !== void 0 && !sidecarRuleIdFilter.has(registryEntry.id)) continue;
71905
72141
  if (rule.isScanRule || rule.isProjectRule === true) continue;
71906
72142
  if (registryEntry.id === "no-multi-component-file" && shouldUseExplicitNoMultiCompPolicy) continue;
71907
- if (customRulesOnly && registryEntry.originallyExternal) continue;
71908
72143
  if (rule.framework !== "global" && !rule.requires) continue;
71909
72144
  if (!shouldEnableRule(rule.requires, rule.tags, capabilities, ignoredTags, rule.disabledWhen, includedTags)) continue;
71910
72145
  const explicitRuleOverride = resolveRuleSeverityOverride({ ruleKey: registryEntry.key }, severityControls);
72146
+ if (customRulesOnly && registryEntry.originallyExternal && (explicitRuleOverride === void 0 || explicitRuleOverride === "off")) continue;
71911
72147
  if (!shouldEnableRuleByDefaultStatus({
71912
72148
  defaultEnabled: rule.defaultEnabled,
71913
72149
  includeTagDefaults,
@@ -71944,6 +72180,7 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
71944
72180
  ...adoptedSettings,
71945
72181
  "react-doctor": {
71946
72182
  portedRuleMode: "curated",
72183
+ ...diagnosticContextDirectory ? { diagnosticContextDirectory } : {},
71947
72184
  framework: project.framework,
71948
72185
  rootDirectory: settingsRootDirectory,
71949
72186
  capabilities: [...capabilities].sort(),
@@ -72617,22 +72854,14 @@ const runOxlintProbeJob = async (input) => {
72617
72854
  if (!isProbeResult(parsed) || parsed.traces.length !== input.probeRequest.files.length) throw new Error("oxlint worker returned a malformed probe result");
72618
72855
  return parsed;
72619
72856
  };
72620
- const atomicWriteFile = (filePath, contents) => {
72621
- let temporaryPath = null;
72622
- try {
72623
- fs$1$2.mkdirSync(path$1$1.dirname(filePath), { recursive: true });
72624
- temporaryPath = `${filePath}.${process.pid}.${randomUUID()}.tmp`;
72625
- fs$1$2.writeFileSync(temporaryPath, contents);
72626
- fs$1$2.renameSync(temporaryPath, filePath);
72627
- temporaryPath = null;
72628
- } catch {
72629
- return;
72630
- } finally {
72631
- if (temporaryPath !== null) try {
72632
- fs$1$2.rmSync(temporaryPath, { force: true });
72633
- } catch {}
72634
- }
72635
- };
72857
+ var DiagnosticContextRangeSchema = class extends Class("DiagnosticContextRange")({
72858
+ offset: Number$1.check(isInt(), isGreaterThanOrEqualTo(0)),
72859
+ length: Number$1.check(isInt(), isGreaterThan(0))
72860
+ }) {};
72861
+ var CachedDiagnostic = class extends Class("CachedDiagnostic")({
72862
+ ...Diagnostic.fields,
72863
+ contextRanges: optional(ArraySchema(DiagnosticContextRangeSchema))
72864
+ }) {};
72636
72865
  const atomicWriteJson = (filePath, value) => {
72637
72866
  try {
72638
72867
  atomicWriteFile(filePath, JSON.stringify(value));
@@ -72640,7 +72869,7 @@ const atomicWriteJson = (filePath, value) => {
72640
72869
  return;
72641
72870
  }
72642
72871
  };
72643
- const validateDiagnostic$1 = decodeUnknownSync(Diagnostic);
72872
+ const validateDiagnostic$1 = decodeUnknownSync(CachedDiagnostic);
72644
72873
  const decodeDiagnostic = (raw) => {
72645
72874
  const diagnostic = validateDiagnostic$1(raw);
72646
72875
  return {
@@ -72760,7 +72989,7 @@ const createSidecarProbeAnswerResolver = (input) => {
72760
72989
  toRelativePath
72761
72990
  };
72762
72991
  };
72763
- const validateDiagnostic = decodeUnknownSync(Diagnostic);
72992
+ const validateDiagnostic = decodeUnknownSync(CachedDiagnostic);
72764
72993
  const isProbeKind = (value) => value === "content" || value === "exists";
72765
72994
  const isProbeIdArray = (value, probeCount) => Array.isArray(value) && value.every((probeId) => typeof probeId === "number" && Number.isInteger(probeId) && probeId >= 0 && probeId < probeCount);
72766
72995
  const createProbeTable = () => {
@@ -73002,6 +73231,29 @@ const columnOfUtf8Offset = (sourceBuffer, utf8Offset) => {
73002
73231
  while (lineStartOffset > 0 && sourceBuffer[lineStartOffset - 1] !== 10) lineStartOffset--;
73003
73232
  return sourceBuffer.subarray(lineStartOffset, boundedOffset).toString("utf8").length + 1;
73004
73233
  };
73234
+ const decodeRanges = decodeUnknownSync(ArraySchema(DiagnosticContextRangeSchema));
73235
+ const createDiagnosticContextReader = (directory) => {
73236
+ const recordedRules = /* @__PURE__ */ new Set();
73237
+ if (directory) try {
73238
+ for (const filename of fs$1$2.readdirSync(directory)) {
73239
+ if (!filename.endsWith(".json")) continue;
73240
+ recordedRules.add(filename.slice(0, filename.lastIndexOf("-")));
73241
+ }
73242
+ } catch {
73243
+ recordedRules.clear();
73244
+ }
73245
+ return (identity) => {
73246
+ if (!directory || !recordedRules.has(encodeURIComponent(identity.rule))) return [];
73247
+ try {
73248
+ return decodeRanges(failOpenReadJson(getDiagnosticContextPath({
73249
+ ...identity,
73250
+ directory
73251
+ }), []));
73252
+ } catch {
73253
+ return [];
73254
+ }
73255
+ };
73256
+ };
73005
73257
  const utf8OffsetFromSourcePosition = (sourceBuffer, lineNumber, zeroBasedColumn) => {
73006
73258
  if (lineNumber < 1 || zeroBasedColumn < 0) return null;
73007
73259
  const sourceLines = sourceBuffer.toString("utf8").split("\n");
@@ -73643,7 +73895,7 @@ const isOxlintOutput = (value) => isRecord(value) && Array.isArray(value.diagnos
73643
73895
  * to the first `{`. Raises `OxlintOutputUnparseable` when the
73644
73896
  * stdout isn't valid JSON or doesn't carry a `diagnostics` array.
73645
73897
  */
73646
- const parseOxlintOutput = (stdout, project, rootDirectory, sourcePathByLintPath, sourceMapByLintPath) => {
73898
+ const parseOxlintOutput = (stdout, project, rootDirectory, sourcePathByLintPath, sourceMapByLintPath, diagnosticContextDirectory) => {
73647
73899
  if (!stdout) return [];
73648
73900
  const jsonStart = stdout.indexOf("{");
73649
73901
  const sanitizedStdout = jsonStart > 0 ? stdout.slice(jsonStart) : stdout;
@@ -73693,19 +73945,33 @@ const parseOxlintOutput = (stdout, project, rootDirectory, sourcePathByLintPath,
73693
73945
  minifiedFileCache.set(absolutePath, minified);
73694
73946
  return minified;
73695
73947
  };
73696
- return suppressMemoizationInBailedOutFunctions(parsed.diagnostics.flatMap((diagnostic) => {
73948
+ const readContextRanges = createDiagnosticContextReader(diagnosticContextDirectory);
73949
+ return suppressMemoizationInBailedOutFunctions(parsed.diagnostics.flatMap((rawDiagnostic) => {
73950
+ if (!isMappableOxlintDiagnostic(rawDiagnostic)) return [];
73951
+ const { plugin, rule } = parseRuleCode(rawDiagnostic.code);
73952
+ const primarySpan = rawDiagnostic.labels[0]?.span;
73953
+ const contextRanges = diagnosticContextDirectory && plugin === "react-doctor" && primarySpan ? readContextRanges({
73954
+ filename: resolveAbsolutePath(rawDiagnostic.filename),
73955
+ rule,
73956
+ offset: primarySpan.offset,
73957
+ message: rawDiagnostic.message
73958
+ }) : [];
73959
+ const diagnostic = {
73960
+ ...rawDiagnostic,
73961
+ contextRanges
73962
+ };
73697
73963
  const preparedSourceMap = resolvePreparedSourceMap(diagnostic.filename);
73698
73964
  if (preparedSourceMap === void 0) return [diagnostic];
73699
- const { plugin, rule } = parseRuleCode(diagnostic.code);
73700
73965
  if (plugin !== "react-doctor" || !REACT_DOCTOR_RULE_REGISTRY[rule]?.tags?.includes("design")) return [];
73701
73966
  const labels = mapPreparedSourceLabels(diagnostic.labels, preparedSourceMap);
73702
73967
  const sourceFilename = resolveMappedSourceFilename(diagnostic.filename);
73703
73968
  return labels === null || sourceFilename === void 0 ? [] : [{
73704
73969
  ...diagnostic,
73705
73970
  filename: sourceFilename,
73706
- labels
73971
+ labels,
73972
+ contextRanges: []
73707
73973
  }];
73708
- }).filter((diagnostic) => isMappableOxlintDiagnostic(diagnostic) && isLintableSourceFile(resolveSourceFilename(diagnostic.filename)) && !(TYPESCRIPT_DECLARATION_FILE_PATTERN.test(diagnostic.filename) && OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES.has(diagnostic.code)) && !isMinifiedDiagnosticFile(diagnostic.filename) && !shouldSuppressLocalUseHookDiagnostic(diagnostic, rootDirectory) && !shouldSuppressCompilerFindingInWorklet(diagnostic, project, rootDirectory)).map((diagnostic) => {
73974
+ }).filter((diagnostic) => isLintableSourceFile(resolveSourceFilename(diagnostic.filename)) && !(TYPESCRIPT_DECLARATION_FILE_PATTERN.test(diagnostic.filename) && OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES.has(diagnostic.code)) && !isMinifiedDiagnosticFile(diagnostic.filename) && !shouldSuppressLocalUseHookDiagnostic(diagnostic, rootDirectory) && !shouldSuppressCompilerFindingInWorklet(diagnostic, project, rootDirectory)).map((diagnostic) => {
73709
73975
  const { plugin, rule } = parseRuleCode(diagnostic.code);
73710
73976
  const primaryLabel = diagnostic.labels[0];
73711
73977
  const cleaned = cleanDiagnosticMessage(diagnostic.message, diagnostic.help, plugin, rule, project);
@@ -73742,6 +74008,7 @@ const parseOxlintOutput = (stdout, project, rootDirectory, sourcePathByLintPath,
73742
74008
  ...primarySpanEndLine !== void 0 ? { endLine: primarySpanEndLine } : {}
73743
74009
  } : {},
73744
74010
  category,
74011
+ ...diagnostic.contextRanges.length > 0 ? { contextRanges: diagnostic.contextRanges } : {},
73745
74012
  ...matchByOccurrence ? { matchByOccurrence: true } : {},
73746
74013
  ...relatedLocations.length > 0 ? { relatedLocations } : {}
73747
74014
  };
@@ -73854,7 +74121,7 @@ const spawnLintBatches = async (input) => {
73854
74121
  };
73855
74122
  const stdout = input.spawnSlots === void 0 ? await spawnBatch() : await input.spawnSlots.run(spawnBatch, signal);
73856
74123
  if (stdout === null) return [];
73857
- return parseOxlintOutput(stdout, project, rootDirectory, sourcePathByLintPath, sourceMapByLintPath);
74124
+ return parseOxlintOutput(stdout, project, rootDirectory, sourcePathByLintPath, sourceMapByLintPath, input.diagnosticContextDirectory);
73858
74125
  } catch (error) {
73859
74126
  if (!isSplittableReactDoctorError(error)) throw error;
73860
74127
  if (isPastDeadline()) {
@@ -74583,6 +74850,8 @@ const runOxlint = async (options) => {
74583
74850
  const configDirectory = fs$1$2.mkdtempSync(path$1$1.join(os.tmpdir(), "react-doctor-oxlintrc-"));
74584
74851
  const configPath = path$1$1.join(configDirectory, "oxlintrc.json");
74585
74852
  try {
74853
+ const diagnosticContextDirectory = path$1$1.join(configDirectory, "contexts");
74854
+ fs$1$2.mkdirSync(diagnosticContextDirectory);
74586
74855
  const oxlintBinary = resolveOxlintBinary();
74587
74856
  const sharedArgs = [];
74588
74857
  let tsconfigContent = null;
@@ -74631,6 +74900,7 @@ const runOxlint = async (options) => {
74631
74900
  } : project;
74632
74901
  const buildConfig = (overrides) => createOxlintConfig({
74633
74902
  pluginPath,
74903
+ diagnosticContextDirectory,
74634
74904
  project: lintProject,
74635
74905
  customRulesOnly,
74636
74906
  extendsPaths: overrides.extendsPaths,
@@ -74682,6 +74952,7 @@ const runOxlint = async (options) => {
74682
74952
  project: lintProject,
74683
74953
  sourcePathByLintPath: preparedLintSources.sourcePathByLintPath,
74684
74954
  sourceMapByLintPath: preparedLintSources.sourceMapByLintPath,
74955
+ diagnosticContextDirectory,
74685
74956
  onPartialFailure: reportPartialFailure,
74686
74957
  onAnalyzedFiles: (filePaths) => {
74687
74958
  analyzedFiles = filePaths;
@@ -74909,6 +75180,7 @@ const runOxlint = async (options) => {
74909
75180
  project: lintProject,
74910
75181
  sourcePathByLintPath: preparedLintSources.sourcePathByLintPath,
74911
75182
  sourceMapByLintPath: preparedLintSources.sourceMapByLintPath,
75183
+ diagnosticContextDirectory,
74912
75184
  onPartialFailure,
74913
75185
  onAnalyzedFiles: (filePaths) => {
74914
75186
  analyzedFiles = filePaths;
@@ -75205,7 +75477,7 @@ const ScoreApiResponseSchema = Struct({
75205
75477
  });
75206
75478
  const EMPTY_SCORE_REQUEST_METADATA = {};
75207
75479
  const parseScoreResult = (value) => getOrNull(decodeUnknownOption(ScoreApiResponseSchema)(value));
75208
- const sanitizeScoreDiagnostics = (diagnostics) => diagnostics.map(({ filePath, fileContext: _fileContext, fixGroupId: _fixGroupId, ...rest }) => ({
75480
+ const sanitizeScoreDiagnostics = (diagnostics) => diagnostics.map(({ filePath, fileContext: _fileContext, fixGroupId: _fixGroupId, contextRanges: _contextRanges, ...rest }) => ({
75209
75481
  ...rest,
75210
75482
  filePath: redactSensitiveText(scrubSensitivePaths(filePath))
75211
75483
  }));
@@ -76485,12 +76757,13 @@ const findWorstScoredProject = (projects) => {
76485
76757
  return worst;
76486
76758
  };
76487
76759
  const toJsonReportDiagnostic = (diagnostic, projectRoot, reportRoot) => {
76760
+ const { contextRanges: _contextRanges, ...publicDiagnostic } = diagnostic;
76488
76761
  const resolvedFilePath = resolveCandidateReadPath(projectRoot, diagnostic.filePath);
76489
76762
  const normalizedFilePath = toNormalizedRelativePath(resolvedFilePath, projectRoot);
76490
76763
  const reportRelativeFilePath = toNormalizedRelativePath(resolvedFilePath, reportRoot);
76491
76764
  const ruleIdentity = getDiagnosticRuleIdentity(diagnostic);
76492
76765
  return {
76493
- ...diagnostic,
76766
+ ...publicDiagnostic,
76494
76767
  id: buildDiagnosticIdentity({
76495
76768
  filePath: reportRelativeFilePath,
76496
76769
  line: diagnostic.line,
@@ -76630,7 +76903,7 @@ const getBaselineDiffPlan = (directory, ref) => runPromise(gen(function* () {
76630
76903
  });
76631
76904
  }).pipe(provide(Git.layerNode)));
76632
76905
  /**
76633
- * Programmatic façade over `Git.changedLineRanges` (the `lines` scope). Diffs
76906
+ * Programmatic façade over `Git.changedLineRanges` (the `lines` / `contextual` scopes). Diffs
76634
76907
  * `files` with `--unified=0` against `baseRef` (or the index when `cached`),
76635
76908
  * returning per-file changed line ranges relative to `directory`. Returns
76636
76909
  * `null` when the ranges can't be computed (git unavailable / unsafe ref /
@@ -76639,11 +76912,112 @@ const getBaselineDiffPlan = (directory, ref) => runPromise(gen(function* () {
76639
76912
  */
76640
76913
  const getChangedLineRanges = (input) => runPromise(gen(function* () {
76641
76914
  const ranges = yield* (yield* Git).changedLineRanges(input);
76642
- return ranges === null ? null : ranges.map((entry) => ({
76643
- file: entry.file,
76644
- ranges: entry.ranges
76645
- }));
76915
+ return ranges === null ? null : ranges.map((entry) => ({ ...entry }));
76646
76916
  }).pipe(provide(Git.layerNode)));
76917
+ const lookupOwnRule = (rule) => Object.hasOwn(REACT_DOCTOR_RULE_REGISTRY, rule) ? REACT_DOCTOR_RULE_REGISTRY[rule] : void 0;
76918
+ /**
76919
+ * Returns presentation metadata for `<plugin>/<rule>`, or `null` when the
76920
+ * rule is not part of the bundled react-doctor plugin (e.g. an adopted
76921
+ * `eslint` / `unicorn` rule folded in via the user's lint config — those
76922
+ * carry their own help/url on the diagnostic instead).
76923
+ */
76924
+ const getRuleMetadata = (plugin, rule) => {
76925
+ if (plugin !== "react-doctor") return null;
76926
+ const definition = lookupOwnRule(rule);
76927
+ if (!definition) return null;
76928
+ return {
76929
+ diffScope: definition.diffScope ?? "line",
76930
+ id: rule,
76931
+ plugin,
76932
+ category: definition.category ?? null,
76933
+ recommendation: definition.recommendation ?? null,
76934
+ tags: definition.tags ?? [],
76935
+ defaultEnabled: definition.defaultEnabled ?? true
76936
+ };
76937
+ };
76938
+ const doesContextIntersectChanges = ({ contexts, changes }) => contexts.some(({ range: [startLine, endLine], excludedRanges = [] }) => {
76939
+ for (const [changedStart, changedEnd] of changes.ranges) {
76940
+ let remainingStart = Math.max(startLine, changedStart);
76941
+ const remainingEnd = Math.min(endLine, changedEnd);
76942
+ for (const [childStart, childEnd] of excludedRanges) {
76943
+ if (childEnd < remainingStart) continue;
76944
+ if (childStart > remainingEnd) break;
76945
+ if (childStart > remainingStart) return true;
76946
+ remainingStart = Math.max(remainingStart, childEnd + 1);
76947
+ }
76948
+ if (remainingStart <= remainingEnd) return true;
76949
+ }
76950
+ return (changes.deletionLines ?? []).some((deletionLine) => deletionLine >= startLine && deletionLine < endLine && !excludedRanges.some(([childStart, childEnd]) => deletionLine >= childStart && deletionLine < childEnd));
76951
+ });
76952
+ const diagnosticIntersectsLineRanges = (diagnostic, lineRanges) => {
76953
+ const diagnosticEndLine = Math.max(diagnostic.line, diagnostic.endLine ?? diagnostic.line);
76954
+ return lineRanges.some(([rangeStartLine, rangeEndLine]) => diagnostic.line <= rangeEndLine && diagnosticEndLine >= rangeStartLine);
76955
+ };
76956
+ const getOwnedContext = ({ sourceFile, owner, isBoundary }) => {
76957
+ const excludedRanges = [];
76958
+ const collectChildren = (node) => {
76959
+ if (isBoundary(node)) {
76960
+ excludedRanges.push([sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line + 1, sourceFile.getLineAndCharacterOfPosition(node.getEnd() - 1).line + 1]);
76961
+ return;
76962
+ }
76963
+ typescriptBinding.forEachChild(node, collectChildren);
76964
+ };
76965
+ typescriptBinding.forEachChild(owner, collectChildren);
76966
+ return {
76967
+ range: [sourceFile.getLineAndCharacterOfPosition(owner.getStart(sourceFile)).line + 1, sourceFile.getLineAndCharacterOfPosition(owner.getEnd() - 1).line + 1],
76968
+ excludedRanges
76969
+ };
76970
+ };
76971
+ const createChangedLineMatcher = ({ directory, changedLineRanges, contextual = false }) => {
76972
+ const changesByFile = new Map(changedLineRanges.map((entry) => [path$1$1.resolve(directory, entry.file.replaceAll("\\", "/")), entry]));
76973
+ const sourceFiles = /* @__PURE__ */ new Map();
76974
+ return (diagnostic) => {
76975
+ const filePath = path$1$1.resolve(directory, diagnostic.filePath.replaceAll("\\", "/"));
76976
+ const changes = changesByFile.get(filePath);
76977
+ if (!changes) return false;
76978
+ if (diagnosticIntersectsLineRanges(diagnostic, changes.ranges)) return true;
76979
+ if (!contextual) return false;
76980
+ const ruleMetadata = getRuleMetadata(diagnostic.plugin, diagnostic.rule);
76981
+ const scope = ruleMetadata?.diffScope ?? "line";
76982
+ const explicitContextRanges = ruleMetadata ? diagnostic.contextRanges : void 0;
76983
+ if (!explicitContextRanges && scope === "file") return true;
76984
+ if (!explicitContextRanges && scope === "line" || !/\.[cm]?[jt]sx?$/i.test(filePath)) return false;
76985
+ if (!sourceFiles.has(filePath)) try {
76986
+ const sourceFile = typescriptBinding.createSourceFile(filePath, fs$1$2.readFileSync(filePath, "utf8"), typescriptBinding.ScriptTarget.Latest, true, getTypescriptScriptKind(filePath));
76987
+ const hasParseErrors = "parseDiagnostics" in sourceFile && Array.isArray(sourceFile.parseDiagnostics) && sourceFile.parseDiagnostics.length > 0;
76988
+ sourceFiles.set(filePath, hasParseErrors ? null : sourceFile);
76989
+ } catch {
76990
+ sourceFiles.set(filePath, null);
76991
+ }
76992
+ const sourceFile = sourceFiles.get(filePath);
76993
+ if (!sourceFile) return false;
76994
+ const sourceBuffer = Buffer.from(sourceFile.text);
76995
+ if (explicitContextRanges) return doesContextIntersectChanges({
76996
+ contexts: explicitContextRanges.filter(({ offset, length }) => Number.isSafeInteger(offset) && Number.isSafeInteger(length) && offset >= 0 && length > 0 && offset + length <= sourceBuffer.length).map(({ offset, length }) => ({ range: [lineOfUtf8Offset(sourceBuffer, offset), lineOfUtf8Offset(sourceBuffer, offset + length - 1)] })),
76997
+ changes
76998
+ });
76999
+ const byteOffset = diagnostic.offset ?? utf8OffsetFromSourcePosition(sourceBuffer, diagnostic.line, diagnostic.column - 1);
77000
+ if (byteOffset === null || byteOffset < 0 || byteOffset >= sourceBuffer.length) return false;
77001
+ const position = sourceBuffer.subarray(0, byteOffset).toString("utf8").length;
77002
+ const isBoundary = (node) => scope === "function" ? typescriptBinding.isFunctionLike(node) : typescriptBinding.isJsxElement(node) || typescriptBinding.isJsxSelfClosingElement(node) || typescriptBinding.isJsxFragment(node);
77003
+ let owner = null;
77004
+ const findOwner = (node) => {
77005
+ if (position < node.getStart(sourceFile) || position >= node.getEnd()) return;
77006
+ if (isBoundary(node)) owner = node;
77007
+ typescriptBinding.forEachChild(node, findOwner);
77008
+ };
77009
+ findOwner(sourceFile);
77010
+ if (!owner) return false;
77011
+ return doesContextIntersectChanges({
77012
+ contexts: [getOwnedContext({
77013
+ sourceFile,
77014
+ owner,
77015
+ isBoundary
77016
+ })],
77017
+ changes
77018
+ });
77019
+ };
77020
+ };
76647
77021
  /**
76648
77022
  * Array-shaped wrapper over `buildDiagnosticPipeline` for legacy
76649
77023
  * callers and tests. Production code uses the streaming pipeline
@@ -76665,26 +77039,6 @@ const mergeAndFilterDiagnostics = (mergedDiagnostics, directory, userConfig, rea
76665
77039
  }
76666
77040
  return dedupeRelatedDiagnostics(result);
76667
77041
  };
76668
- const lookupOwnRule = (rule) => Object.hasOwn(REACT_DOCTOR_RULE_REGISTRY, rule) ? REACT_DOCTOR_RULE_REGISTRY[rule] : void 0;
76669
- /**
76670
- * Returns presentation metadata for `<plugin>/<rule>`, or `null` when the
76671
- * rule is not part of the bundled react-doctor plugin (e.g. an adopted
76672
- * `eslint` / `unicorn` rule folded in via the user's lint config — those
76673
- * carry their own help/url on the diagnostic instead).
76674
- */
76675
- const getRuleMetadata = (plugin, rule) => {
76676
- if (plugin !== "react-doctor") return null;
76677
- const definition = lookupOwnRule(rule);
76678
- if (!definition) return null;
76679
- return {
76680
- id: rule,
76681
- plugin,
76682
- category: definition.category ?? null,
76683
- recommendation: definition.recommendation ?? null,
76684
- tags: definition.tags ?? [],
76685
- defaultEnabled: definition.defaultEnabled ?? true
76686
- };
76687
- };
76688
77042
  /**
76689
77043
  * Canonical URL for a rule's documentation page — its reviewer-tested fix
76690
77044
  * recipe rendered for humans — served at
@@ -76919,6 +77273,7 @@ const GITHUB_ACTION_MARKER_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_GITHUB_ACTION";
76919
77273
  const ACTION_INPUT_ENVIRONMENT_VARIABLES = {
76920
77274
  blocking: "REACT_DOCTOR_ACTION_BLOCKING",
76921
77275
  comment: "REACT_DOCTOR_ACTION_COMMENT",
77276
+ commentOnClean: "REACT_DOCTOR_ACTION_COMMENT_ON_CLEAN",
76922
77277
  reviewComments: "REACT_DOCTOR_ACTION_REVIEW_COMMENTS",
76923
77278
  version: "REACT_DOCTOR_ACTION_VERSION"
76924
77279
  };
@@ -77094,7 +77449,7 @@ const makeNoopConsole = () => ({
77094
77449
  });
77095
77450
  //#endregion
77096
77451
  //#region src/cli/utils/version.ts
77097
- const VERSION = "0.9.17";
77452
+ const VERSION = "0.9.18-dev.9a79847";
77098
77453
  //#endregion
77099
77454
  //#region src/cli/utils/json-mode.ts
77100
77455
  let context = null;
@@ -77436,7 +77791,7 @@ const recordDistribution = (name, value, options = {}) => {
77436
77791
  } catch {}
77437
77792
  };
77438
77793
  //#endregion
77439
- export { buildRuleSeverityControls as $, shouldUseMaintainabilityLayer as $t, Files as A, succeed$3 as An, highlighter as At, PerFileLintCacheEnabled as B, isDirectory as Bn, loadConfigWithSource as Bt, ACTION_INPUT_ENVIRONMENT_VARIABLES as C, runSync as Cn, getDiffInfo as Ct, isCodingAgentEnvironment as D, buildWithScope as Dn, hasPublishedFixRecipe as Dt, isCiOrCodingAgentEnvironment as E, void_ as En, groupBy as Et, Linter as F, ParentSpan as Fn, isScanComplete as Ft, SidecarLintCacheEnabled as G, remainingDeadlineBudgetMs as Gt, Project as H, isFile as Hn, materializeSourceTree as Ht, Maintainability as I, isMonorepoRoot as In, layerObservability as It, anonymizeInPlace as J, resolveScanTarget as Jt, StagedFiles as K, resolveGithubActionsScoreMetadata as Kt, NodeResolver as L, yieldToEventLoop as Ln, listSourceFiles as Lt, InvocationCaches as M, makeUnsafe$5 as Mn, isProjectDiscoveryError as Mt, LEGACY_CONFIG_FILENAME as N, fail$5 as Nn, isReactDoctorError as Nt, Config as O, mergeAll$1 as On, hasSupportedFrameworkOrLibrary as Ot, LintPartialFailures as P, void_$1 as Pn, isSameRuleKey as Pt, buildRuleDocsUrl as Q, setColorEnabled as Qt, OxlintConcurrency as R, messageFromUnknown as Rn, listSourceFilesCooperative as Rt, isDebugFlagEnabled as S, runPromise as Sn, getDiagnosticRuleIdentity as St, isCiEnvironment as T, try_ as Tn, getRuleMetadata as Tt, Reporter as U, isPlainObject as Un, mergeAndFilterDiagnostics as Ut, Progress as V, isErrnoException as Vn, mapWithConcurrency as Vt, Score as W, mergeReactDoctorConfigs as Wt, atomicWriteJson as X, runInspect as Xt, anonymizeText as Y, restoreLegacyThrow as Yt, buildJsonReport as Z, scrubSensitivePaths as Zt, VERSION as _, orElseSucceed as _n, fingerprintDiagnosticEvidence as _t, isEnvFlagEnabled as a, Console as an, collectSourceFilesByDirectory as at, isNonInteractiveEnvironment as b, provideContext as bn, getBaselineDiffPlan as bt, setSentryProjectInfo as c, log as cn, countOptInProjectRuleSelections as ct, isJsonModeActive as d, JsonReport as dn, detectAiTrainingEnvironment as dt, summarizeDiagnostics as en, buildSkippedChecks as et, setJsonReportDirectory as f, decodeUnknownSync as fn, discoverSupportedSubprojects as ft, writeJsonReport as g, map$3 as gn, findLegacyConfig as gt, writeJsonErrorReport as h, makeSpan$1 as hn, filterSourceFiles as ht, isTelemetryEnabled as i, warmOxlintWorkerPool as in, clearConfigCache as it, Git as j, close as jn, isPathInsideDirectory as jt, DIAGNOSTIC_DELTA_IDENTITY as k, provide$2 as kn, hashFileContents as kt, getRunId as l, warn$1 as ln, createInvocationCaches as lt, writeJsonCancellationReport as m, gen as mn, filterPathsOutsideDirectories as mt, recordDistribution as n, validateConfigTypes as nn, canonicalizeUserRuleKey as nt, buildSentryScope as o, error as on, computeConfigFingerprint as ot, setJsonReportMode as p, make$30 as pn, filterDiagnosticsForSurface as pt, SupplyChain as q, resolveLintBatchOrdering as qt, toSpanAttributes as r, warmDuplicateJsxWorker as rn, classifyFileContext as rt, buildSentryProjectContext as s, info as sn, computeDiagnosticDelta as st, recordCount as t, toRelativePath as tn, calculateScore as tt, enableJsonMode as u, Diagnostic as un, createOxlintSpawnSlots as ut, makeNoopConsole as v, promise as vn, formatErrorChain as vt, detectRunnerOs as w, sync as wn, getEquivalentRuleKeys as wt, isGitHookEnvironment as x, provideService as xn, getChangedLineRanges as xt, CliInputError as y, provide as yn, formatReactDoctorError as yt, OxlintSpawnSlots as z, toCanonicalPath as zn, listWorkspacePackages as zt };
77794
+ export { buildRuleSeverityControls as $, scrubSensitivePaths as $t, Files as A, mergeAll$1 as An, hasSupportedFrameworkOrLibrary as At, PerFileLintCacheEnabled as B, messageFromUnknown as Bn, listSourceFilesCooperative as Bt, ACTION_INPUT_ENVIRONMENT_VARIABLES as C, provideService as Cn, getChangedLineRanges as Ct, isCodingAgentEnvironment as D, try_ as Dn, getRuleMetadata as Dt, isCiOrCodingAgentEnvironment as E, sync as En, getEquivalentRuleKeys as Et, Linter as F, fail$5 as Fn, isReactDoctorError as Ft, SidecarLintCacheEnabled as G, isPlainObject as Gn, mergeAndFilterDiagnostics as Gt, Project as H, isDirectory as Hn, loadConfigWithSource as Ht, Maintainability as I, void_$1 as In, isSameRuleKey as It, anonymizeInPlace as J, resolveGithubActionsScoreMetadata as Jt, StagedFiles as K, mergeReactDoctorConfigs as Kt, NodeResolver as L, ParentSpan as Ln, isScanComplete as Lt, InvocationCaches as M, succeed$3 as Mn, highlighter as Mt, LEGACY_CONFIG_FILENAME as N, close as Nn, isPathInsideDirectory as Nt, Config as O, void_ as On, groupBy as Ot, LintPartialFailures as P, makeUnsafe$5 as Pn, isProjectDiscoveryError as Pt, buildRuleDocsUrl as Q, runInspect as Qt, OxlintConcurrency as R, isMonorepoRoot as Rn, layerObservability as Rt, isDebugFlagEnabled as S, provideContext as Sn, getBaselineDiffPlan as St, isCiEnvironment as T, runSync as Tn, getDiffInfo as Tt, Reporter as U, isErrnoException as Un, mapWithConcurrency as Ut, Progress as V, toCanonicalPath as Vn, listWorkspacePackages as Vt, Score as W, isFile as Wn, materializeSourceTree as Wt, atomicWriteJson as X, resolveScanTarget as Xt, anonymizeText as Y, resolveLintBatchOrdering as Yt, buildJsonReport as Z, restoreLegacyThrow as Zt, VERSION as _, makeSpan$1 as _n, findGitRepositoryRoot as _t, isEnvFlagEnabled as a, warmDuplicateJsxWorker as an, collectSourceFilesByDirectory as at, isNonInteractiveEnvironment as b, promise as bn, formatErrorChain as bt, setSentryProjectInfo as c, error as cn, countOptInProjectRuleSelections as ct, isJsonModeActive as d, warn$1 as dn, createOxlintSpawnSlots as dt, setColorEnabled as en, buildSkippedChecks as et, setJsonReportDirectory as f, Diagnostic as fn, detectAiTrainingEnvironment as ft, writeJsonReport as g, gen as gn, filterSourceFiles as gt, writeJsonErrorReport as h, make$30 as hn, filterPathsOutsideDirectories as ht, isTelemetryEnabled as i, validateConfigTypes as in, clearConfigCache as it, Git as j, provide$2 as jn, hashFileContents as jt, DIAGNOSTIC_DELTA_IDENTITY as k, buildWithScope as kn, hasPublishedFixRecipe as kt, getRunId as l, info as ln, createChangedLineMatcher as lt, writeJsonCancellationReport as m, decodeUnknownSync as mn, filterDiagnosticsForSurface as mt, recordDistribution as n, summarizeDiagnostics as nn, canonicalizeUserRuleKey as nt, buildSentryScope as o, warmOxlintWorkerPool as on, computeConfigFingerprint as ot, setJsonReportMode as p, JsonReport as pn, discoverSupportedSubprojects as pt, SupplyChain as q, remainingDeadlineBudgetMs as qt, toSpanAttributes as r, toRelativePath as rn, classifyFileContext as rt, buildSentryProjectContext as s, Console as sn, computeDiagnosticDelta as st, recordCount as t, shouldUseMaintainabilityLayer as tn, calculateScore as tt, enableJsonMode as u, log as un, createInvocationCaches as ut, makeNoopConsole as v, map$3 as vn, findLegacyConfig as vt, detectRunnerOs as w, runPromise as wn, getDiagnosticRuleIdentity as wt, isGitHookEnvironment as x, provide as xn, formatReactDoctorError as xt, CliInputError as y, orElseSucceed as yn, fingerprintDiagnosticEvidence as yt, OxlintSpawnSlots as z, yieldToEventLoop as zn, listSourceFiles as zt };
77440
77795
 
77441
- //# sourceMappingURL=record-metric-BNXhF2A-.js.map
77442
- //# debugId=f9c3088b-03e9-58c9-85a8-461764e02e68
77796
+ //# sourceMappingURL=record-metric-CgebwK0K.js.map
77797
+ //# debugId=0eaa5205-d906-5228-bfb8-cef2337dfce5