react-doctor 0.7.2-dev.b97a92f → 0.7.2-dev.cb8f726

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 CHANGED
@@ -46386,7 +46386,7 @@ const makeNoopConsole = () => ({
46386
46386
  });
46387
46387
  //#endregion
46388
46388
  //#region src/cli/utils/version.ts
46389
- const VERSION = "0.7.2-dev.b97a92f";
46389
+ const VERSION = "0.7.2-dev.cb8f726";
46390
46390
  //#endregion
46391
46391
  //#region src/cli/utils/json-mode.ts
46392
46392
  let context = null;
@@ -46755,13 +46755,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
46755
46755
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
46756
46756
  * standard `SENTRY_RELEASE` override.
46757
46757
  */
46758
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.2-dev.b97a92f`;
46758
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.2-dev.cb8f726`;
46759
46759
  /**
46760
46760
  * Deployment environment shown in Sentry's environment filter. Defaults to
46761
46761
  * `production` for tagged releases and `development` for dev/unbuilt versions,
46762
46762
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
46763
46763
  */
46764
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.2-dev.b97a92f") ? "development" : "production");
46764
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.2-dev.cb8f726") ? "development" : "production");
46765
46765
  /**
46766
46766
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
46767
46767
  * (set to `0` to disable tracing) and falls back to
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]="7b7e0da8-d676-570d-b0e2-7fc3a4fe85ab")}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]="63c65851-4fa5-5cd1-9337-0f2feefe37ad")}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";
@@ -42771,17 +42771,20 @@ const warnIfAiTrainingEnvironment = () => {
42771
42771
  didWarnAiTraining = true;
42772
42772
  console.warn("[react-doctor] Use in an AI or ML pipeline requires written permission under the react-doctor license. Contact founders@million.dev to request access.");
42773
42773
  };
42774
- const buildDiagnoseLayer = (config, configOverrideTarget) => {
42775
- const configLayer = configOverrideTarget === void 0 ? Config.layerNode : Config.layerOf({
42776
- config,
42777
- resolvedDirectory: configOverrideTarget.resolvedDirectory,
42778
- configSourceDirectory: configOverrideTarget.configSourceDirectory
42774
+ const resolveShouldRunLint = (options, effectiveConfig) => options.lint ?? effectiveConfig?.lint ?? true;
42775
+ const resolveShouldRunDeadCode = (options, effectiveConfig) => options.deadCode ?? effectiveConfig?.deadCode ?? true;
42776
+ const buildDiagnoseLayer = (input) => {
42777
+ const configLayer = input.configOverrideTarget === void 0 ? Config.layerNode : Config.layerOf({
42778
+ config: input.config,
42779
+ resolvedDirectory: input.configOverrideTarget.resolvedDirectory,
42780
+ configSourceDirectory: input.configOverrideTarget.configSourceDirectory
42779
42781
  });
42780
- return mergeAll$1(Project.layerNode, configLayer, DeadCode.layerNode, Files.layerNode, Git.layerNode, Linter.layerOxlint, LintPartialFailures.layerLive, Progress.layerNoop, Reporter.layerNoop, Score.layerHttp, config?.supplyChain?.enabled !== false ? SupplyChain.layerNode : SupplyChain.layerOf([]));
42782
+ return mergeAll$1(Project.layerNode, configLayer, input.shouldRunDeadCode ? DeadCode.layerNode : DeadCode.layerOf([]), Files.layerNode, Git.layerNode, input.shouldRunLint ? Linter.layerOxlint : Linter.layerOf([]), LintPartialFailures.layerLive, Progress.layerNoop, Reporter.layerNoop, Score.layerHttp, input.config?.supplyChain?.enabled !== false ? SupplyChain.layerNode : SupplyChain.layerOf([]));
42781
42783
  };
42782
42784
  const buildInspectProgram = (scanTarget, options, configOverride) => {
42783
42785
  const effectiveConfig = configOverride ?? scanTarget.userConfig;
42784
42786
  const includePaths = options.includePaths ?? [];
42787
+ const shouldRunDeadCode = resolveShouldRunDeadCode(options, effectiveConfig);
42785
42788
  return runInspect({
42786
42789
  directory: scanTarget.resolvedDirectory,
42787
42790
  includePaths,
@@ -42790,7 +42793,7 @@ const buildInspectProgram = (scanTarget, options, configOverride) => {
42790
42793
  warnings: options.warnings ?? effectiveConfig?.warnings ?? true,
42791
42794
  adoptExistingLintConfig: effectiveConfig?.adoptExistingLintConfig ?? true,
42792
42795
  ignoredTags: new Set(effectiveConfig?.ignore?.tags ?? []),
42793
- runDeadCode: options.deadCode ?? effectiveConfig?.deadCode ?? true,
42796
+ runDeadCode: shouldRunDeadCode,
42794
42797
  isCi: false,
42795
42798
  resolveLocalGithubViewerPermission: true
42796
42799
  });
@@ -42812,7 +42815,14 @@ const diagnoseDirectory = async (directory, options) => {
42812
42815
  warnIfAiTrainingEnvironment();
42813
42816
  const startTime = globalThis.performance.now();
42814
42817
  const scanTarget = await resolveScanTarget(directory);
42815
- return outputToDiagnoseResult(await runPromise(restoreLegacyThrow(buildInspectProgram(scanTarget, options).pipe(provide(buildDiagnoseLayer(scanTarget.userConfig)), provide(layerOtlp)))), globalThis.performance.now() - startTime);
42818
+ const program = buildInspectProgram(scanTarget, options);
42819
+ const shouldRunLint = resolveShouldRunLint(options, scanTarget.userConfig);
42820
+ const shouldRunDeadCode = resolveShouldRunDeadCode(options, scanTarget.userConfig);
42821
+ return outputToDiagnoseResult(await runPromise(restoreLegacyThrow(program.pipe(provide(buildDiagnoseLayer({
42822
+ config: scanTarget.userConfig,
42823
+ shouldRunLint,
42824
+ shouldRunDeadCode
42825
+ })), provide(layerOtlp)))), globalThis.performance.now() - startTime);
42816
42826
  };
42817
42827
  const findWorstScore = (projectResults) => {
42818
42828
  let worstResult = null;
@@ -42833,15 +42843,27 @@ const diagnoseProject = async (projectDefinition, baseOptions, batchConfig) => {
42833
42843
  const { directory: _, config: projectConfig, ...perProjectOptions } = projectDefinition;
42834
42844
  const didOverrideConfig = batchConfig !== void 0 || projectConfig !== void 0;
42835
42845
  const effectiveConfig = mergeReactDoctorConfigs(mergeReactDoctorConfigs(scanTarget.userConfig, batchConfig), projectConfig);
42836
- const program = buildInspectProgram(scanTarget, {
42846
+ const mergedOptions = {
42837
42847
  ...baseOptions,
42838
42848
  ...perProjectOptions
42839
- }, effectiveConfig ?? void 0);
42849
+ };
42850
+ const shouldRunLint = resolveShouldRunLint(mergedOptions, effectiveConfig);
42851
+ const shouldRunDeadCode = resolveShouldRunDeadCode(mergedOptions, effectiveConfig);
42852
+ const program = buildInspectProgram(scanTarget, mergedOptions, effectiveConfig ?? void 0);
42840
42853
  const didOverridePlugins = batchConfig?.plugins !== void 0 || projectConfig?.plugins !== void 0;
42841
- const layer = buildDiagnoseLayer(effectiveConfig, didOverrideConfig ? {
42842
- resolvedDirectory: scanTarget.resolvedDirectory,
42843
- configSourceDirectory: didOverridePlugins ? null : scanTarget.configSourceDirectory
42844
- } : void 0);
42854
+ const layer = buildDiagnoseLayer(didOverrideConfig ? {
42855
+ config: effectiveConfig,
42856
+ shouldRunLint,
42857
+ shouldRunDeadCode,
42858
+ configOverrideTarget: {
42859
+ resolvedDirectory: scanTarget.resolvedDirectory,
42860
+ configSourceDirectory: didOverridePlugins ? null : scanTarget.configSourceDirectory
42861
+ }
42862
+ } : {
42863
+ config: effectiveConfig,
42864
+ shouldRunLint,
42865
+ shouldRunDeadCode
42866
+ });
42845
42867
  return {
42846
42868
  ok: true,
42847
42869
  ...outputToDiagnoseResult(await runPromise(restoreLegacyThrow(program.pipe(provide(layer), provide(layerOtlp)))), globalThis.performance.now() - startTime),
@@ -42903,4 +42925,4 @@ const toJsonReport = (result, options) => buildJsonReport({
42903
42925
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
42904
42926
 
42905
42927
  //# sourceMappingURL=index.js.map
42906
- //# debugId=7b7e0da8-d676-570d-b0e2-7fc3a4fe85ab
42928
+ //# debugId=63c65851-4fa5-5cd1-9337-0f2feefe37ad
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.7.2-dev.b97a92f",
3
+ "version": "0.7.2-dev.cb8f726",
4
4
  "description": "Your agent writes bad React. This catches it",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -65,8 +65,8 @@
65
65
  "vscode-languageserver-textdocument": "^1.0.12",
66
66
  "vscode-uri": "^3.1.0",
67
67
  "yaml": "^2.9.0",
68
- "deslop-js": "0.7.2",
69
- "oxlint-plugin-react-doctor": "0.7.2-dev.b97a92f"
68
+ "oxlint-plugin-react-doctor": "0.7.2-dev.cb8f726",
69
+ "deslop-js": "0.7.2"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",