react-doctor 0.9.1-dev.7ee59d3 → 0.9.1-dev.b1b62db

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
@@ -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]="7f26fa62-fe0c-5ae0-bc9c-97a0deb50b43")}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]="cf9aea89-a185-53f6-9e42-7af2cece64f2")}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";
@@ -65499,7 +65499,7 @@ const hasTopLevelValueBinding = (sourceFile, bindingName) => sourceFile.statemen
65499
65499
  const namedBindings = importClause?.namedBindings;
65500
65500
  return namedBindings ? ts.isNamespaceImport(namedBindings) ? namedBindings.name.text === bindingName : namedBindings.elements.some((element) => element.name.text === bindingName) : false;
65501
65501
  }
65502
- if (ts.isVariableStatement(statement)) return statement.declarationList.declarations.some((declaration) => bindingNameContainsIdentifier(declaration.name, bindingName));
65502
+ if (ts.isVariableStatement(statement)) return statement.declarationList.declarations.some((declaration) => ts.isIdentifier(declaration.name) && declaration.name.text === bindingName);
65503
65503
  return (ts.isFunctionDeclaration(statement) || ts.isClassDeclaration(statement)) && statement.name?.text === bindingName;
65504
65504
  });
65505
65505
  const getImportBinding = (sourceFile, bindingName) => {
@@ -65600,48 +65600,6 @@ const getScopedConfigBinding = (identifier) => {
65600
65600
  };
65601
65601
  };
65602
65602
  const isCompilerTransformModule = (moduleSpecifier, exportName) => moduleSpecifier === "babel-plugin-react-compiler" && exportName === "default" || moduleSpecifier === "@vitejs/plugin-react" && exportName === "reactCompilerPreset";
65603
- const NODE_MODULE_SPECIFIERS = new Set(["module", "node:module"]);
65604
- const isConstantVariableInitializer = (node) => ts.isExpression(node) && ts.isVariableDeclaration(node.parent) && ts.isVariableDeclarationList(node.parent.parent) && Boolean(node.parent.parent.flags & ts.NodeFlags.Const);
65605
- const isNodeCreateRequireCall = (node, analysis) => {
65606
- if (ts.isParenthesizedExpression(node) || ts.isAsExpression(node) || ts.isTypeAssertionExpression(node) || ts.isSatisfiesExpression(node) || ts.isNonNullExpression(node) || ts.isAwaitExpression(node)) return isNodeCreateRequireCall(node.expression, analysis);
65607
- if (!ts.isCallExpression(node)) return false;
65608
- const target = node.expression;
65609
- if (ts.isIdentifier(target)) {
65610
- if (analysis.localBindings.has(target.text) || getScopedConfigBinding(target).wasFound) return false;
65611
- const importBinding = getImportBinding(analysis.sourceFile, target.text);
65612
- return Boolean(importBinding && NODE_MODULE_SPECIFIERS.has(importBinding.moduleSpecifier) && importBinding.exportName === "createRequire");
65613
- }
65614
- if (!ts.isPropertyAccessExpression(target) && !ts.isElementAccessExpression(target)) return false;
65615
- if ((ts.isPropertyAccessExpression(target) ? target.name.text : target.argumentExpression && ts.isStringLiteralLike(target.argumentExpression) ? target.argumentExpression.text : null) !== "createRequire") return false;
65616
- const createRequireReceiver = target.expression;
65617
- if (ts.isCallExpression(createRequireReceiver)) {
65618
- const requiredModuleSpecifier = getRequireModuleSpecifier$1(createRequireReceiver);
65619
- if (requiredModuleSpecifier === null || !NODE_MODULE_SPECIFIERS.has(requiredModuleSpecifier) || !ts.isIdentifier(createRequireReceiver.expression)) return false;
65620
- const requireIdentifier = createRequireReceiver.expression;
65621
- return !analysis.localBindings.has(requireIdentifier.text) && !getScopedConfigBinding(requireIdentifier).wasFound && !hasTopLevelValueBinding(analysis.sourceFile, requireIdentifier.text);
65622
- }
65623
- if (!ts.isIdentifier(createRequireReceiver)) return false;
65624
- if (analysis.localBindings.has(createRequireReceiver.text) || getScopedConfigBinding(createRequireReceiver).wasFound) return false;
65625
- const importBinding = getImportBinding(analysis.sourceFile, createRequireReceiver.text);
65626
- return Boolean(importBinding?.isNamespace && NODE_MODULE_SPECIFIERS.has(importBinding.moduleSpecifier));
65627
- };
65628
- const getNodeRequireResolveModuleSpecifier = (callExpression, analysis) => {
65629
- const [moduleSpecifierNode] = callExpression.arguments;
65630
- if (!moduleSpecifierNode || !ts.isStringLiteralLike(moduleSpecifierNode)) return null;
65631
- const target = callExpression.expression;
65632
- if (!ts.isPropertyAccessExpression(target) && !ts.isElementAccessExpression(target)) return null;
65633
- if ((ts.isPropertyAccessExpression(target) ? target.name.text : target.argumentExpression && ts.isStringLiteralLike(target.argumentExpression) ? target.argumentExpression.text : null) !== "resolve") return null;
65634
- if (isNodeCreateRequireCall(target.expression, analysis)) return moduleSpecifierNode.text;
65635
- if (!ts.isIdentifier(target.expression)) return null;
65636
- const resolverIdentifier = target.expression;
65637
- if (analysis.localBindings.has(resolverIdentifier.text)) return null;
65638
- const scopedBinding = getScopedConfigBinding(resolverIdentifier);
65639
- const topLevelBinding = scopedBinding.wasFound ? null : getTopLevelBinding(analysis.sourceFile, resolverIdentifier.text);
65640
- const resolverInitializer = scopedBinding.wasFound ? scopedBinding.initializer : topLevelBinding;
65641
- if (resolverInitializer === null && !scopedBinding.wasFound && resolverIdentifier.text === "require" && !hasTopLevelValueBinding(analysis.sourceFile, resolverIdentifier.text) && getImportBinding(analysis.sourceFile, resolverIdentifier.text) === null) return moduleSpecifierNode.text;
65642
- if (!resolverInitializer || !isConstantVariableInitializer(resolverInitializer) || !isNodeCreateRequireCall(resolverInitializer, analysis)) return null;
65643
- return moduleSpecifierNode.text;
65644
- };
65645
65603
  const getAssignedPropertyInitializer = (identifier, propertyName) => {
65646
65604
  let bindingScope = null;
65647
65605
  let currentNode = identifier;
@@ -66017,8 +65975,6 @@ const analyzeConfigNode = (node, analysis, allowCompilerTransform, isCompilerTra
66017
65975
  });
66018
65976
  }
66019
65977
  if (ts.isCallExpression(node)) {
66020
- const resolvedModuleSpecifier = getNodeRequireResolveModuleSpecifier(node, analysis);
66021
- if (resolvedModuleSpecifier !== null) return allowCompilerTransform && isCompilerTransformModule(resolvedModuleSpecifier, "default");
66022
65978
  const callTargetResult = analyzeConfigCallTarget(node, analysis, allowCompilerTransform);
66023
65979
  if (callTargetResult !== null) return callTargetResult;
66024
65980
  const directModuleSpecifier = getRequireModuleSpecifier$1(node);
@@ -78320,7 +78276,7 @@ const makeNoopConsole = () => ({
78320
78276
  });
78321
78277
  //#endregion
78322
78278
  //#region src/cli/utils/version.ts
78323
- const VERSION = "0.9.1-dev.7ee59d3";
78279
+ const VERSION = "0.9.1-dev.b1b62db";
78324
78280
  //#endregion
78325
78281
  //#region src/cli/utils/json-mode.ts
78326
78282
  let context = null;
@@ -78678,13 +78634,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
78678
78634
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
78679
78635
  * standard `SENTRY_RELEASE` override.
78680
78636
  */
78681
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.1-dev.7ee59d3`;
78637
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.1-dev.b1b62db`;
78682
78638
  /**
78683
78639
  * Deployment environment shown in Sentry's environment filter. Defaults to
78684
78640
  * `production` for tagged releases and `development` for dev/unbuilt versions,
78685
78641
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
78686
78642
  */
78687
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.1-dev.7ee59d3") ? "development" : "production");
78643
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.1-dev.b1b62db") ? "development" : "production");
78688
78644
  /**
78689
78645
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
78690
78646
  * (set to `0` to disable tracing) and falls back to
@@ -97483,4 +97439,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
97483
97439
  export { toForwardSlashes as A, highlighter as B, buildRulePriorityMap as C, resolveBlockingLevel as D, formatLearnMoreLine as E, isCiEnvironment as F, sync as G, mergeReactDoctorConfigs as H, DIAGNOSTIC_CATEGORY_BUCKETS as I, void_ as K, Progress as L, isUnicodeSupported as M, METRIC as N, isReactDoctorWorkflowInstalled as O, TUI_REPORT_DETAIL_WIDTH_FRACTION as P, Reporter as R, hasLintHardFailure as S, formatFixRecipeLine as T, resolveScanTarget as U, mapWithConcurrency as V, runPromise as W, canAnimateOnboarding as _, resolveCliInspectOptions as a, buildCodeFrame as b, detectLaunchableAgents as c, launchCliAgent as d, isShareOptedOut as f, doctorFace as g, easeOutCubic as h, selectProjects as i, findNearestPackageDirectory as j, recordCount as k, CLI_AGENT_BINARIES as l, printFooter as m, shouldFailScanGate as n, countUniqueScannedFiles as o, inspect as p, succeed$3 as q, discoverWorkspacePackages as r, setUpGitHubActions as s, exitGracefully as t, copyToClipboard as u, computeProjectedScore as v, buildSortedRuleGroups as w, buildNoScoreMessage as x, formatElapsedTime as y, getCategoryImpact as z };
97484
97440
 
97485
97441
  //# sourceMappingURL=cli.js.map
97486
- //# debugId=7f26fa62-fe0c-5ae0-bc9c-97a0deb50b43
97442
+ //# debugId=cf9aea89-a185-53f6-9e42-7af2cece64f2
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]="5ad39650-1163-5117-aad5-472963ee3867")}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]="e6d636d4-ff95-5229-92f8-47807b2a44c4")}catch(e){}}();
3
3
  import { i as __toESM$1, r as __require, t as __commonJSMin$1 } from "./chunk-ChKA3wi6.js";
4
4
  import { createRequire } from "node:module";
5
5
  import reactDoctorPlugin, { 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_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor";
@@ -62302,7 +62302,7 @@ const hasTopLevelValueBinding = (sourceFile, bindingName) => sourceFile.statemen
62302
62302
  const namedBindings = importClause?.namedBindings;
62303
62303
  return namedBindings ? ts.isNamespaceImport(namedBindings) ? namedBindings.name.text === bindingName : namedBindings.elements.some((element) => element.name.text === bindingName) : false;
62304
62304
  }
62305
- if (ts.isVariableStatement(statement)) return statement.declarationList.declarations.some((declaration) => bindingNameContainsIdentifier(declaration.name, bindingName));
62305
+ if (ts.isVariableStatement(statement)) return statement.declarationList.declarations.some((declaration) => ts.isIdentifier(declaration.name) && declaration.name.text === bindingName);
62306
62306
  return (ts.isFunctionDeclaration(statement) || ts.isClassDeclaration(statement)) && statement.name?.text === bindingName;
62307
62307
  });
62308
62308
  const getImportBinding = (sourceFile, bindingName) => {
@@ -62403,48 +62403,6 @@ const getScopedConfigBinding = (identifier) => {
62403
62403
  };
62404
62404
  };
62405
62405
  const isCompilerTransformModule = (moduleSpecifier, exportName) => moduleSpecifier === "babel-plugin-react-compiler" && exportName === "default" || moduleSpecifier === "@vitejs/plugin-react" && exportName === "reactCompilerPreset";
62406
- const NODE_MODULE_SPECIFIERS = new Set(["module", "node:module"]);
62407
- const isConstantVariableInitializer = (node) => ts.isExpression(node) && ts.isVariableDeclaration(node.parent) && ts.isVariableDeclarationList(node.parent.parent) && Boolean(node.parent.parent.flags & ts.NodeFlags.Const);
62408
- const isNodeCreateRequireCall = (node, analysis) => {
62409
- if (ts.isParenthesizedExpression(node) || ts.isAsExpression(node) || ts.isTypeAssertionExpression(node) || ts.isSatisfiesExpression(node) || ts.isNonNullExpression(node) || ts.isAwaitExpression(node)) return isNodeCreateRequireCall(node.expression, analysis);
62410
- if (!ts.isCallExpression(node)) return false;
62411
- const target = node.expression;
62412
- if (ts.isIdentifier(target)) {
62413
- if (analysis.localBindings.has(target.text) || getScopedConfigBinding(target).wasFound) return false;
62414
- const importBinding = getImportBinding(analysis.sourceFile, target.text);
62415
- return Boolean(importBinding && NODE_MODULE_SPECIFIERS.has(importBinding.moduleSpecifier) && importBinding.exportName === "createRequire");
62416
- }
62417
- if (!ts.isPropertyAccessExpression(target) && !ts.isElementAccessExpression(target)) return false;
62418
- if ((ts.isPropertyAccessExpression(target) ? target.name.text : target.argumentExpression && ts.isStringLiteralLike(target.argumentExpression) ? target.argumentExpression.text : null) !== "createRequire") return false;
62419
- const createRequireReceiver = target.expression;
62420
- if (ts.isCallExpression(createRequireReceiver)) {
62421
- const requiredModuleSpecifier = getRequireModuleSpecifier$1(createRequireReceiver);
62422
- if (requiredModuleSpecifier === null || !NODE_MODULE_SPECIFIERS.has(requiredModuleSpecifier) || !ts.isIdentifier(createRequireReceiver.expression)) return false;
62423
- const requireIdentifier = createRequireReceiver.expression;
62424
- return !analysis.localBindings.has(requireIdentifier.text) && !getScopedConfigBinding(requireIdentifier).wasFound && !hasTopLevelValueBinding(analysis.sourceFile, requireIdentifier.text);
62425
- }
62426
- if (!ts.isIdentifier(createRequireReceiver)) return false;
62427
- if (analysis.localBindings.has(createRequireReceiver.text) || getScopedConfigBinding(createRequireReceiver).wasFound) return false;
62428
- const importBinding = getImportBinding(analysis.sourceFile, createRequireReceiver.text);
62429
- return Boolean(importBinding?.isNamespace && NODE_MODULE_SPECIFIERS.has(importBinding.moduleSpecifier));
62430
- };
62431
- const getNodeRequireResolveModuleSpecifier = (callExpression, analysis) => {
62432
- const [moduleSpecifierNode] = callExpression.arguments;
62433
- if (!moduleSpecifierNode || !ts.isStringLiteralLike(moduleSpecifierNode)) return null;
62434
- const target = callExpression.expression;
62435
- if (!ts.isPropertyAccessExpression(target) && !ts.isElementAccessExpression(target)) return null;
62436
- if ((ts.isPropertyAccessExpression(target) ? target.name.text : target.argumentExpression && ts.isStringLiteralLike(target.argumentExpression) ? target.argumentExpression.text : null) !== "resolve") return null;
62437
- if (isNodeCreateRequireCall(target.expression, analysis)) return moduleSpecifierNode.text;
62438
- if (!ts.isIdentifier(target.expression)) return null;
62439
- const resolverIdentifier = target.expression;
62440
- if (analysis.localBindings.has(resolverIdentifier.text)) return null;
62441
- const scopedBinding = getScopedConfigBinding(resolverIdentifier);
62442
- const topLevelBinding = scopedBinding.wasFound ? null : getTopLevelBinding(analysis.sourceFile, resolverIdentifier.text);
62443
- const resolverInitializer = scopedBinding.wasFound ? scopedBinding.initializer : topLevelBinding;
62444
- if (resolverInitializer === null && !scopedBinding.wasFound && resolverIdentifier.text === "require" && !hasTopLevelValueBinding(analysis.sourceFile, resolverIdentifier.text) && getImportBinding(analysis.sourceFile, resolverIdentifier.text) === null) return moduleSpecifierNode.text;
62445
- if (!resolverInitializer || !isConstantVariableInitializer(resolverInitializer) || !isNodeCreateRequireCall(resolverInitializer, analysis)) return null;
62446
- return moduleSpecifierNode.text;
62447
- };
62448
62406
  const getAssignedPropertyInitializer = (identifier, propertyName) => {
62449
62407
  let bindingScope = null;
62450
62408
  let currentNode = identifier;
@@ -62820,8 +62778,6 @@ const analyzeConfigNode = (node, analysis, allowCompilerTransform, isCompilerTra
62820
62778
  });
62821
62779
  }
62822
62780
  if (ts.isCallExpression(node)) {
62823
- const resolvedModuleSpecifier = getNodeRequireResolveModuleSpecifier(node, analysis);
62824
- if (resolvedModuleSpecifier !== null) return allowCompilerTransform && isCompilerTransformModule(resolvedModuleSpecifier, "default");
62825
62781
  const callTargetResult = analyzeConfigCallTarget(node, analysis, allowCompilerTransform);
62826
62782
  if (callTargetResult !== null) return callTargetResult;
62827
62783
  const directModuleSpecifier = getRequireModuleSpecifier$1(node);
@@ -74794,4 +74750,4 @@ const toJsonReport = (result, options) => buildJsonReport({
74794
74750
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
74795
74751
 
74796
74752
  //# sourceMappingURL=index.js.map
74797
- //# debugId=5ad39650-1163-5117-aad5-472963ee3867
74753
+ //# debugId=e6d636d4-ff95-5229-92f8-47807b2a44c4
package/dist/lsp.js CHANGED
@@ -62355,7 +62355,7 @@ const hasTopLevelValueBinding = (sourceFile, bindingName) => sourceFile.statemen
62355
62355
  const namedBindings = importClause?.namedBindings;
62356
62356
  return namedBindings ? ts.isNamespaceImport(namedBindings) ? namedBindings.name.text === bindingName : namedBindings.elements.some((element) => element.name.text === bindingName) : false;
62357
62357
  }
62358
- if (ts.isVariableStatement(statement)) return statement.declarationList.declarations.some((declaration) => bindingNameContainsIdentifier(declaration.name, bindingName));
62358
+ if (ts.isVariableStatement(statement)) return statement.declarationList.declarations.some((declaration) => ts.isIdentifier(declaration.name) && declaration.name.text === bindingName);
62359
62359
  return (ts.isFunctionDeclaration(statement) || ts.isClassDeclaration(statement)) && statement.name?.text === bindingName;
62360
62360
  });
62361
62361
  const getImportBinding = (sourceFile, bindingName) => {
@@ -62456,48 +62456,6 @@ const getScopedConfigBinding = (identifier) => {
62456
62456
  };
62457
62457
  };
62458
62458
  const isCompilerTransformModule = (moduleSpecifier, exportName) => moduleSpecifier === "babel-plugin-react-compiler" && exportName === "default" || moduleSpecifier === "@vitejs/plugin-react" && exportName === "reactCompilerPreset";
62459
- const NODE_MODULE_SPECIFIERS = new Set(["module", "node:module"]);
62460
- const isConstantVariableInitializer = (node) => ts.isExpression(node) && ts.isVariableDeclaration(node.parent) && ts.isVariableDeclarationList(node.parent.parent) && Boolean(node.parent.parent.flags & ts.NodeFlags.Const);
62461
- const isNodeCreateRequireCall = (node, analysis) => {
62462
- if (ts.isParenthesizedExpression(node) || ts.isAsExpression(node) || ts.isTypeAssertionExpression(node) || ts.isSatisfiesExpression(node) || ts.isNonNullExpression(node) || ts.isAwaitExpression(node)) return isNodeCreateRequireCall(node.expression, analysis);
62463
- if (!ts.isCallExpression(node)) return false;
62464
- const target = node.expression;
62465
- if (ts.isIdentifier(target)) {
62466
- if (analysis.localBindings.has(target.text) || getScopedConfigBinding(target).wasFound) return false;
62467
- const importBinding = getImportBinding(analysis.sourceFile, target.text);
62468
- return Boolean(importBinding && NODE_MODULE_SPECIFIERS.has(importBinding.moduleSpecifier) && importBinding.exportName === "createRequire");
62469
- }
62470
- if (!ts.isPropertyAccessExpression(target) && !ts.isElementAccessExpression(target)) return false;
62471
- if ((ts.isPropertyAccessExpression(target) ? target.name.text : target.argumentExpression && ts.isStringLiteralLike(target.argumentExpression) ? target.argumentExpression.text : null) !== "createRequire") return false;
62472
- const createRequireReceiver = target.expression;
62473
- if (ts.isCallExpression(createRequireReceiver)) {
62474
- const requiredModuleSpecifier = getRequireModuleSpecifier$1(createRequireReceiver);
62475
- if (requiredModuleSpecifier === null || !NODE_MODULE_SPECIFIERS.has(requiredModuleSpecifier) || !ts.isIdentifier(createRequireReceiver.expression)) return false;
62476
- const requireIdentifier = createRequireReceiver.expression;
62477
- return !analysis.localBindings.has(requireIdentifier.text) && !getScopedConfigBinding(requireIdentifier).wasFound && !hasTopLevelValueBinding(analysis.sourceFile, requireIdentifier.text);
62478
- }
62479
- if (!ts.isIdentifier(createRequireReceiver)) return false;
62480
- if (analysis.localBindings.has(createRequireReceiver.text) || getScopedConfigBinding(createRequireReceiver).wasFound) return false;
62481
- const importBinding = getImportBinding(analysis.sourceFile, createRequireReceiver.text);
62482
- return Boolean(importBinding?.isNamespace && NODE_MODULE_SPECIFIERS.has(importBinding.moduleSpecifier));
62483
- };
62484
- const getNodeRequireResolveModuleSpecifier = (callExpression, analysis) => {
62485
- const [moduleSpecifierNode] = callExpression.arguments;
62486
- if (!moduleSpecifierNode || !ts.isStringLiteralLike(moduleSpecifierNode)) return null;
62487
- const target = callExpression.expression;
62488
- if (!ts.isPropertyAccessExpression(target) && !ts.isElementAccessExpression(target)) return null;
62489
- if ((ts.isPropertyAccessExpression(target) ? target.name.text : target.argumentExpression && ts.isStringLiteralLike(target.argumentExpression) ? target.argumentExpression.text : null) !== "resolve") return null;
62490
- if (isNodeCreateRequireCall(target.expression, analysis)) return moduleSpecifierNode.text;
62491
- if (!ts.isIdentifier(target.expression)) return null;
62492
- const resolverIdentifier = target.expression;
62493
- if (analysis.localBindings.has(resolverIdentifier.text)) return null;
62494
- const scopedBinding = getScopedConfigBinding(resolverIdentifier);
62495
- const topLevelBinding = scopedBinding.wasFound ? null : getTopLevelBinding(analysis.sourceFile, resolverIdentifier.text);
62496
- const resolverInitializer = scopedBinding.wasFound ? scopedBinding.initializer : topLevelBinding;
62497
- if (resolverInitializer === null && !scopedBinding.wasFound && resolverIdentifier.text === "require" && !hasTopLevelValueBinding(analysis.sourceFile, resolverIdentifier.text) && getImportBinding(analysis.sourceFile, resolverIdentifier.text) === null) return moduleSpecifierNode.text;
62498
- if (!resolverInitializer || !isConstantVariableInitializer(resolverInitializer) || !isNodeCreateRequireCall(resolverInitializer, analysis)) return null;
62499
- return moduleSpecifierNode.text;
62500
- };
62501
62459
  const getAssignedPropertyInitializer = (identifier, propertyName) => {
62502
62460
  let bindingScope = null;
62503
62461
  let currentNode = identifier;
@@ -62873,8 +62831,6 @@ const analyzeConfigNode = (node, analysis, allowCompilerTransform, isCompilerTra
62873
62831
  });
62874
62832
  }
62875
62833
  if (ts.isCallExpression(node)) {
62876
- const resolvedModuleSpecifier = getNodeRequireResolveModuleSpecifier(node, analysis);
62877
- if (resolvedModuleSpecifier !== null) return allowCompilerTransform && isCompilerTransformModule(resolvedModuleSpecifier, "default");
62878
62834
  const callTargetResult = analyzeConfigCallTarget(node, analysis, allowCompilerTransform);
62879
62835
  if (callTargetResult !== null) return callTargetResult;
62880
62836
  const directModuleSpecifier = getRequireModuleSpecifier$1(node);
@@ -76416,5 +76372,5 @@ const startLanguageServer = () => {
76416
76372
  };
76417
76373
  //#endregion
76418
76374
  export { startLanguageServer };
76419
- !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]="6a2a246a-da30-59c5-aa97-af8188206b96")}catch(e){}}();
76420
- //# debugId=6a2a246a-da30-59c5-aa97-af8188206b96
76375
+ !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]="60b26f08-3459-56b1-938b-6a9bcdea7253")}catch(e){}}();
76376
+ //# debugId=60b26f08-3459-56b1-938b-6a9bcdea7253
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.9.1-dev.7ee59d3",
3
+ "version": "0.9.1-dev.b1b62db",
4
4
  "description": "Your agent writes bad React. This catches it",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -70,7 +70,7 @@
70
70
  "vscode-uri": "^3.1.0",
71
71
  "yaml": "^2.9.0",
72
72
  "deslop-js": "0.9.1",
73
- "oxlint-plugin-react-doctor": "0.9.1-dev.7ee59d3"
73
+ "oxlint-plugin-react-doctor": "0.9.1-dev.b1b62db"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/babel__code-frame": "^7.27.0",
@@ -81,8 +81,8 @@
81
81
  "ink-testing-library": "^4.0.0",
82
82
  "ora": "^9.4.0",
83
83
  "@react-doctor/api": "0.9.1",
84
- "@react-doctor/core": "0.9.1",
85
- "@react-doctor/language-server": "0.9.1"
84
+ "@react-doctor/language-server": "0.9.1",
85
+ "@react-doctor/core": "0.9.1"
86
86
  },
87
87
  "engines": {
88
88
  "node": "^20.19.0 || >=22.13.0"