react-doctor 0.7.9-dev.51ecd7b → 0.7.9-dev.621be9b

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]="9898ed05-f0d6-5dde-8b34-6d261cecec36")}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]="5c4df375-a5c4-57d2-9076-4e54cbb8f3bd")}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";
@@ -36252,53 +36252,6 @@ const SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS = 9e4;
36252
36252
  const SUPPLY_CHAIN_CACHE_TTL_MS = 864e5;
36253
36253
  const SUPPLY_CHAIN_CACHE_SUBDIR = "supply-chain";
36254
36254
  const SUPPLY_CHAIN_IGNORED_PACKAGES = new Set(["next"]);
36255
- const lastSourceMappingUrl = (fileContent) => {
36256
- const lastReference = [...fileContent.matchAll(/\/\/# sourceMappingURL=(\S+)/g)].at(-1);
36257
- return lastReference ? lastReference[1] : null;
36258
- };
36259
- const mapTargetsSource = (mapContent, input) => {
36260
- const parsedMap = JSON.parse(mapContent);
36261
- if (typeof parsedMap !== "object" || parsedMap === null) return false;
36262
- const { file, sources } = parsedMap;
36263
- if (file !== input.expectedFile) return false;
36264
- if (!Array.isArray(sources) || sources.length !== 1 || typeof sources[0] !== "string") return false;
36265
- return Path.posix.normalize(Path.posix.join(input.mapDirectory, sources[0])) === input.sourcePath;
36266
- };
36267
- const quartetProvesEmit = (stem, sourcePath, readFileText) => {
36268
- try {
36269
- const emitBaseName = Path.posix.basename(stem);
36270
- const mapDirectory = Path.posix.dirname(stem);
36271
- return lastSourceMappingUrl(readFileText(`${stem}.js`)) === `${emitBaseName}.js.map` && lastSourceMappingUrl(readFileText(`${stem}.d.ts`)) === `${emitBaseName}.d.ts.map` && mapTargetsSource(readFileText(`${stem}.js.map`), {
36272
- expectedFile: `${emitBaseName}.js`,
36273
- mapDirectory,
36274
- sourcePath
36275
- }) && mapTargetsSource(readFileText(`${stem}.d.ts.map`), {
36276
- expectedFile: `${emitBaseName}.d.ts`,
36277
- mapDirectory,
36278
- sourcePath
36279
- });
36280
- } catch {
36281
- return false;
36282
- }
36283
- };
36284
- const collectTypeScriptEmitDuplicateJsPaths = (input) => {
36285
- const untracked = new Set(input.untrackedPaths);
36286
- const duplicateJsPaths = /* @__PURE__ */ new Set();
36287
- for (const jsPath of untracked) {
36288
- if (!jsPath.endsWith(".js")) continue;
36289
- const stem = jsPath.slice(0, -3);
36290
- if (![
36291
- jsPath,
36292
- `${stem}.js.map`,
36293
- `${stem}.d.ts`,
36294
- `${stem}.d.ts.map`
36295
- ].every((emitPath) => untracked.has(emitPath) && !input.trackedPaths.has(emitPath))) continue;
36296
- const sourcePath = [`${stem}.ts`, `${stem}.tsx`].find((candidatePath) => input.trackedPaths.has(candidatePath));
36297
- if (!sourcePath) continue;
36298
- if (quartetProvesEmit(stem, sourcePath, input.readFileText)) duplicateJsPaths.add(jsPath);
36299
- }
36300
- return duplicateJsPaths;
36301
- };
36302
36255
  const isIgnoredDirectoryName = (directoryName) => IGNORED_DIRECTORIES.has(directoryName) || directoryName.startsWith(".") && !SCANNED_DOT_DIRECTORIES.has(directoryName);
36303
36256
  const hasIgnoredPathSegment = (relativePath) => relativePath.split(/[/\\]/).slice(0, -1).some((segment) => isIgnoredDirectoryName(segment));
36304
36257
  const isLintableSourceFile = (filePath) => SOURCE_FILE_PATTERN.test(filePath) && !GENERATED_BUNDLE_FILE_PATTERN.test(filePath) && !GENERATED_SOURCE_DIRECTORY_PATTERN.test(filePath);
@@ -36366,29 +36319,20 @@ const collectSizedSourceFiles = (rootDirectory, relativePaths) => {
36366
36319
  }
36367
36320
  return entries;
36368
36321
  };
36369
- const gitLsFiles = (rootDirectory, flags) => {
36322
+ const listSourceFilesViaGit = (rootDirectory) => {
36370
36323
  const result = spawnSync("git", [
36371
36324
  "ls-files",
36372
36325
  "-z",
36373
- ...flags
36326
+ "--cached",
36327
+ "--others",
36328
+ "--exclude-standard"
36374
36329
  ], {
36375
36330
  cwd: rootDirectory,
36376
36331
  encoding: "utf-8",
36377
36332
  maxBuffer: GIT_LS_FILES_MAX_BUFFER_BYTES
36378
36333
  });
36379
36334
  if (result.error || result.status !== 0) return null;
36380
- return result.stdout.split("\0").filter((filePath) => filePath.length > 0);
36381
- };
36382
- const listSourceFilesViaGit = (rootDirectory) => {
36383
- const trackedPaths = gitLsFiles(rootDirectory, ["--cached"]);
36384
- const untrackedPaths = gitLsFiles(rootDirectory, ["--others", "--exclude-standard"]);
36385
- if (trackedPaths === null || untrackedPaths === null) return null;
36386
- const emitDuplicateJsPaths = collectTypeScriptEmitDuplicateJsPaths({
36387
- trackedPaths: new Set(trackedPaths),
36388
- untrackedPaths,
36389
- readFileText: (relativePath) => NFS.readFileSync(Path.resolve(rootDirectory, relativePath), "utf-8")
36390
- });
36391
- return [...trackedPaths, ...untrackedPaths].filter((filePath) => isLintableSourceFile(filePath) && !hasIgnoredPathSegment(filePath) && !emitDuplicateJsPaths.has(filePath));
36335
+ return result.stdout.split("\0").filter((filePath) => filePath.length > 0 && isLintableSourceFile(filePath) && !hasIgnoredPathSegment(filePath));
36392
36336
  };
36393
36337
  const listSourceFilesViaFilesystem = (rootDirectory) => {
36394
36338
  const filePaths = [];
@@ -42484,7 +42428,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
42484
42428
  }
42485
42429
  const diff = yield* runGit(input.directory, [
42486
42430
  "diff",
42487
- "--no-ext-diff",
42488
42431
  "-z",
42489
42432
  "--name-only",
42490
42433
  "--diff-filter=ACMR",
@@ -42531,7 +42474,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
42531
42474
  if (resolvedCurrentBranch !== null && resolvedCurrentBranch === baseBranch) {
42532
42475
  const uncommitted = yield* runGit(directory, [
42533
42476
  "diff",
42534
- "--no-ext-diff",
42535
42477
  "-z",
42536
42478
  "--name-only",
42537
42479
  "--diff-filter=ACMR",
@@ -42558,7 +42500,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
42558
42500
  if (mergeBaseRef === null) return null;
42559
42501
  const diff = yield* runGit(directory, [
42560
42502
  "diff",
42561
- "--no-ext-diff",
42562
42503
  "-z",
42563
42504
  "--name-only",
42564
42505
  "--diff-filter=ACMR",
@@ -42576,7 +42517,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
42576
42517
  }).pipe(withSpan("Git.diffSelection")),
42577
42518
  stagedFilePaths: (directory) => runGit(directory, [
42578
42519
  "diff",
42579
- "--no-ext-diff",
42580
42520
  "--cached",
42581
42521
  "-z",
42582
42522
  "--name-only",
@@ -42622,7 +42562,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
42622
42562
  if (baseRef !== void 0 && !isSafeGitRevision(baseRef)) return null;
42623
42563
  const result = yield* runGit(directory, [
42624
42564
  "diff",
42625
- "--no-ext-diff",
42626
42565
  "--unified=0",
42627
42566
  "--diff-filter=ACMR",
42628
42567
  "--relative",
@@ -47220,7 +47159,7 @@ const makeNoopConsole = () => ({
47220
47159
  });
47221
47160
  //#endregion
47222
47161
  //#region src/cli/utils/version.ts
47223
- const VERSION = "0.7.9-dev.51ecd7b";
47162
+ const VERSION = "0.7.9-dev.621be9b";
47224
47163
  //#endregion
47225
47164
  //#region src/cli/utils/json-mode.ts
47226
47165
  let context = null;
@@ -47572,13 +47511,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
47572
47511
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
47573
47512
  * standard `SENTRY_RELEASE` override.
47574
47513
  */
47575
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.9-dev.51ecd7b`;
47514
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.9-dev.621be9b`;
47576
47515
  /**
47577
47516
  * Deployment environment shown in Sentry's environment filter. Defaults to
47578
47517
  * `production` for tagged releases and `development` for dev/unbuilt versions,
47579
47518
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
47580
47519
  */
47581
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.9-dev.51ecd7b") ? "development" : "production");
47520
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.9-dev.621be9b") ? "development" : "production");
47582
47521
  /**
47583
47522
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
47584
47523
  * (set to `0` to disable tracing) and falls back to
@@ -65856,4 +65795,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
65856
65795
  export {};
65857
65796
 
65858
65797
  //# sourceMappingURL=cli.js.map
65859
- //# debugId=9898ed05-f0d6-5dde-8b34-6d261cecec36
65798
+ //# debugId=5c4df375-a5c4-57d2-9076-4e54cbb8f3bd
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]="9b5de5c5-ef1b-5b8a-96f4-6ba90e254e08")}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]="526cf949-6544-5cb8-bf6d-3f4d854b6678")}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 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";
@@ -33050,53 +33050,6 @@ const SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS = 9e4;
33050
33050
  const SUPPLY_CHAIN_CACHE_TTL_MS = 864e5;
33051
33051
  const SUPPLY_CHAIN_CACHE_SUBDIR = "supply-chain";
33052
33052
  const SUPPLY_CHAIN_IGNORED_PACKAGES = new Set(["next"]);
33053
- const lastSourceMappingUrl = (fileContent) => {
33054
- const lastReference = [...fileContent.matchAll(/\/\/# sourceMappingURL=(\S+)/g)].at(-1);
33055
- return lastReference ? lastReference[1] : null;
33056
- };
33057
- const mapTargetsSource = (mapContent, input) => {
33058
- const parsedMap = JSON.parse(mapContent);
33059
- if (typeof parsedMap !== "object" || parsedMap === null) return false;
33060
- const { file, sources } = parsedMap;
33061
- if (file !== input.expectedFile) return false;
33062
- if (!Array.isArray(sources) || sources.length !== 1 || typeof sources[0] !== "string") return false;
33063
- return Path.posix.normalize(Path.posix.join(input.mapDirectory, sources[0])) === input.sourcePath;
33064
- };
33065
- const quartetProvesEmit = (stem, sourcePath, readFileText) => {
33066
- try {
33067
- const emitBaseName = Path.posix.basename(stem);
33068
- const mapDirectory = Path.posix.dirname(stem);
33069
- return lastSourceMappingUrl(readFileText(`${stem}.js`)) === `${emitBaseName}.js.map` && lastSourceMappingUrl(readFileText(`${stem}.d.ts`)) === `${emitBaseName}.d.ts.map` && mapTargetsSource(readFileText(`${stem}.js.map`), {
33070
- expectedFile: `${emitBaseName}.js`,
33071
- mapDirectory,
33072
- sourcePath
33073
- }) && mapTargetsSource(readFileText(`${stem}.d.ts.map`), {
33074
- expectedFile: `${emitBaseName}.d.ts`,
33075
- mapDirectory,
33076
- sourcePath
33077
- });
33078
- } catch {
33079
- return false;
33080
- }
33081
- };
33082
- const collectTypeScriptEmitDuplicateJsPaths = (input) => {
33083
- const untracked = new Set(input.untrackedPaths);
33084
- const duplicateJsPaths = /* @__PURE__ */ new Set();
33085
- for (const jsPath of untracked) {
33086
- if (!jsPath.endsWith(".js")) continue;
33087
- const stem = jsPath.slice(0, -3);
33088
- if (![
33089
- jsPath,
33090
- `${stem}.js.map`,
33091
- `${stem}.d.ts`,
33092
- `${stem}.d.ts.map`
33093
- ].every((emitPath) => untracked.has(emitPath) && !input.trackedPaths.has(emitPath))) continue;
33094
- const sourcePath = [`${stem}.ts`, `${stem}.tsx`].find((candidatePath) => input.trackedPaths.has(candidatePath));
33095
- if (!sourcePath) continue;
33096
- if (quartetProvesEmit(stem, sourcePath, input.readFileText)) duplicateJsPaths.add(jsPath);
33097
- }
33098
- return duplicateJsPaths;
33099
- };
33100
33053
  const isIgnoredDirectoryName = (directoryName) => IGNORED_DIRECTORIES.has(directoryName) || directoryName.startsWith(".") && !SCANNED_DOT_DIRECTORIES.has(directoryName);
33101
33054
  const hasIgnoredPathSegment = (relativePath) => relativePath.split(/[/\\]/).slice(0, -1).some((segment) => isIgnoredDirectoryName(segment));
33102
33055
  const isLintableSourceFile = (filePath) => SOURCE_FILE_PATTERN.test(filePath) && !GENERATED_BUNDLE_FILE_PATTERN.test(filePath) && !GENERATED_SOURCE_DIRECTORY_PATTERN.test(filePath);
@@ -33167,29 +33120,20 @@ const collectSizedSourceFiles = (rootDirectory, relativePaths) => {
33167
33120
  }
33168
33121
  return entries;
33169
33122
  };
33170
- const gitLsFiles = (rootDirectory, flags) => {
33123
+ const listSourceFilesViaGit = (rootDirectory) => {
33171
33124
  const result = spawnSync("git", [
33172
33125
  "ls-files",
33173
33126
  "-z",
33174
- ...flags
33127
+ "--cached",
33128
+ "--others",
33129
+ "--exclude-standard"
33175
33130
  ], {
33176
33131
  cwd: rootDirectory,
33177
33132
  encoding: "utf-8",
33178
33133
  maxBuffer: GIT_LS_FILES_MAX_BUFFER_BYTES
33179
33134
  });
33180
33135
  if (result.error || result.status !== 0) return null;
33181
- return result.stdout.split("\0").filter((filePath) => filePath.length > 0);
33182
- };
33183
- const listSourceFilesViaGit = (rootDirectory) => {
33184
- const trackedPaths = gitLsFiles(rootDirectory, ["--cached"]);
33185
- const untrackedPaths = gitLsFiles(rootDirectory, ["--others", "--exclude-standard"]);
33186
- if (trackedPaths === null || untrackedPaths === null) return null;
33187
- const emitDuplicateJsPaths = collectTypeScriptEmitDuplicateJsPaths({
33188
- trackedPaths: new Set(trackedPaths),
33189
- untrackedPaths,
33190
- readFileText: (relativePath) => NFS.readFileSync(Path.resolve(rootDirectory, relativePath), "utf-8")
33191
- });
33192
- return [...trackedPaths, ...untrackedPaths].filter((filePath) => isLintableSourceFile(filePath) && !hasIgnoredPathSegment(filePath) && !emitDuplicateJsPaths.has(filePath));
33136
+ return result.stdout.split("\0").filter((filePath) => filePath.length > 0 && isLintableSourceFile(filePath) && !hasIgnoredPathSegment(filePath));
33193
33137
  };
33194
33138
  const listSourceFilesViaFilesystem = (rootDirectory) => {
33195
33139
  const filePaths = [];
@@ -39240,7 +39184,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39240
39184
  }
39241
39185
  const diff = yield* runGit(input.directory, [
39242
39186
  "diff",
39243
- "--no-ext-diff",
39244
39187
  "-z",
39245
39188
  "--name-only",
39246
39189
  "--diff-filter=ACMR",
@@ -39287,7 +39230,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39287
39230
  if (resolvedCurrentBranch !== null && resolvedCurrentBranch === baseBranch) {
39288
39231
  const uncommitted = yield* runGit(directory, [
39289
39232
  "diff",
39290
- "--no-ext-diff",
39291
39233
  "-z",
39292
39234
  "--name-only",
39293
39235
  "--diff-filter=ACMR",
@@ -39314,7 +39256,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39314
39256
  if (mergeBaseRef === null) return null;
39315
39257
  const diff = yield* runGit(directory, [
39316
39258
  "diff",
39317
- "--no-ext-diff",
39318
39259
  "-z",
39319
39260
  "--name-only",
39320
39261
  "--diff-filter=ACMR",
@@ -39332,7 +39273,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39332
39273
  }).pipe(withSpan("Git.diffSelection")),
39333
39274
  stagedFilePaths: (directory) => runGit(directory, [
39334
39275
  "diff",
39335
- "--no-ext-diff",
39336
39276
  "--cached",
39337
39277
  "-z",
39338
39278
  "--name-only",
@@ -39378,7 +39318,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39378
39318
  if (baseRef !== void 0 && !isSafeGitRevision(baseRef)) return null;
39379
39319
  const result = yield* runGit(directory, [
39380
39320
  "diff",
39381
- "--no-ext-diff",
39382
39321
  "--unified=0",
39383
39322
  "--diff-filter=ACMR",
39384
39323
  "--relative",
@@ -43724,4 +43663,4 @@ const toJsonReport = (result, options) => buildJsonReport({
43724
43663
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
43725
43664
 
43726
43665
  //# sourceMappingURL=index.js.map
43727
- //# debugId=9b5de5c5-ef1b-5b8a-96f4-6ba90e254e08
43666
+ //# debugId=526cf949-6544-5cb8-bf6d-3f4d854b6678
package/dist/lsp.js CHANGED
@@ -33102,53 +33102,6 @@ const SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS = 9e4;
33102
33102
  const SUPPLY_CHAIN_CACHE_TTL_MS = 864e5;
33103
33103
  const SUPPLY_CHAIN_CACHE_SUBDIR = "supply-chain";
33104
33104
  const SUPPLY_CHAIN_IGNORED_PACKAGES = new Set(["next"]);
33105
- const lastSourceMappingUrl = (fileContent) => {
33106
- const lastReference = [...fileContent.matchAll(/\/\/# sourceMappingURL=(\S+)/g)].at(-1);
33107
- return lastReference ? lastReference[1] : null;
33108
- };
33109
- const mapTargetsSource = (mapContent, input) => {
33110
- const parsedMap = JSON.parse(mapContent);
33111
- if (typeof parsedMap !== "object" || parsedMap === null) return false;
33112
- const { file, sources } = parsedMap;
33113
- if (file !== input.expectedFile) return false;
33114
- if (!Array.isArray(sources) || sources.length !== 1 || typeof sources[0] !== "string") return false;
33115
- return Path.posix.normalize(Path.posix.join(input.mapDirectory, sources[0])) === input.sourcePath;
33116
- };
33117
- const quartetProvesEmit = (stem, sourcePath, readFileText) => {
33118
- try {
33119
- const emitBaseName = Path.posix.basename(stem);
33120
- const mapDirectory = Path.posix.dirname(stem);
33121
- return lastSourceMappingUrl(readFileText(`${stem}.js`)) === `${emitBaseName}.js.map` && lastSourceMappingUrl(readFileText(`${stem}.d.ts`)) === `${emitBaseName}.d.ts.map` && mapTargetsSource(readFileText(`${stem}.js.map`), {
33122
- expectedFile: `${emitBaseName}.js`,
33123
- mapDirectory,
33124
- sourcePath
33125
- }) && mapTargetsSource(readFileText(`${stem}.d.ts.map`), {
33126
- expectedFile: `${emitBaseName}.d.ts`,
33127
- mapDirectory,
33128
- sourcePath
33129
- });
33130
- } catch {
33131
- return false;
33132
- }
33133
- };
33134
- const collectTypeScriptEmitDuplicateJsPaths = (input) => {
33135
- const untracked = new Set(input.untrackedPaths);
33136
- const duplicateJsPaths = /* @__PURE__ */ new Set();
33137
- for (const jsPath of untracked) {
33138
- if (!jsPath.endsWith(".js")) continue;
33139
- const stem = jsPath.slice(0, -3);
33140
- if (![
33141
- jsPath,
33142
- `${stem}.js.map`,
33143
- `${stem}.d.ts`,
33144
- `${stem}.d.ts.map`
33145
- ].every((emitPath) => untracked.has(emitPath) && !input.trackedPaths.has(emitPath))) continue;
33146
- const sourcePath = [`${stem}.ts`, `${stem}.tsx`].find((candidatePath) => input.trackedPaths.has(candidatePath));
33147
- if (!sourcePath) continue;
33148
- if (quartetProvesEmit(stem, sourcePath, input.readFileText)) duplicateJsPaths.add(jsPath);
33149
- }
33150
- return duplicateJsPaths;
33151
- };
33152
33105
  const isIgnoredDirectoryName = (directoryName) => IGNORED_DIRECTORIES.has(directoryName) || directoryName.startsWith(".") && !SCANNED_DOT_DIRECTORIES.has(directoryName);
33153
33106
  const hasIgnoredPathSegment = (relativePath) => relativePath.split(/[/\\]/).slice(0, -1).some((segment) => isIgnoredDirectoryName(segment));
33154
33107
  const isLintableSourceFile = (filePath) => SOURCE_FILE_PATTERN.test(filePath) && !GENERATED_BUNDLE_FILE_PATTERN.test(filePath) && !GENERATED_SOURCE_DIRECTORY_PATTERN.test(filePath);
@@ -33219,29 +33172,20 @@ const collectSizedSourceFiles = (rootDirectory, relativePaths) => {
33219
33172
  }
33220
33173
  return entries;
33221
33174
  };
33222
- const gitLsFiles = (rootDirectory, flags) => {
33175
+ const listSourceFilesViaGit = (rootDirectory) => {
33223
33176
  const result = spawnSync("git", [
33224
33177
  "ls-files",
33225
33178
  "-z",
33226
- ...flags
33179
+ "--cached",
33180
+ "--others",
33181
+ "--exclude-standard"
33227
33182
  ], {
33228
33183
  cwd: rootDirectory,
33229
33184
  encoding: "utf-8",
33230
33185
  maxBuffer: GIT_LS_FILES_MAX_BUFFER_BYTES
33231
33186
  });
33232
33187
  if (result.error || result.status !== 0) return null;
33233
- return result.stdout.split("\0").filter((filePath) => filePath.length > 0);
33234
- };
33235
- const listSourceFilesViaGit = (rootDirectory) => {
33236
- const trackedPaths = gitLsFiles(rootDirectory, ["--cached"]);
33237
- const untrackedPaths = gitLsFiles(rootDirectory, ["--others", "--exclude-standard"]);
33238
- if (trackedPaths === null || untrackedPaths === null) return null;
33239
- const emitDuplicateJsPaths = collectTypeScriptEmitDuplicateJsPaths({
33240
- trackedPaths: new Set(trackedPaths),
33241
- untrackedPaths,
33242
- readFileText: (relativePath) => NFS.readFileSync(Path.resolve(rootDirectory, relativePath), "utf-8")
33243
- });
33244
- return [...trackedPaths, ...untrackedPaths].filter((filePath) => isLintableSourceFile(filePath) && !hasIgnoredPathSegment(filePath) && !emitDuplicateJsPaths.has(filePath));
33188
+ return result.stdout.split("\0").filter((filePath) => filePath.length > 0 && isLintableSourceFile(filePath) && !hasIgnoredPathSegment(filePath));
33245
33189
  };
33246
33190
  const listSourceFilesViaFilesystem = (rootDirectory) => {
33247
33191
  const filePaths = [];
@@ -39218,7 +39162,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39218
39162
  }
39219
39163
  const diff = yield* runGit(input.directory, [
39220
39164
  "diff",
39221
- "--no-ext-diff",
39222
39165
  "-z",
39223
39166
  "--name-only",
39224
39167
  "--diff-filter=ACMR",
@@ -39265,7 +39208,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39265
39208
  if (resolvedCurrentBranch !== null && resolvedCurrentBranch === baseBranch) {
39266
39209
  const uncommitted = yield* runGit(directory, [
39267
39210
  "diff",
39268
- "--no-ext-diff",
39269
39211
  "-z",
39270
39212
  "--name-only",
39271
39213
  "--diff-filter=ACMR",
@@ -39292,7 +39234,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39292
39234
  if (mergeBaseRef === null) return null;
39293
39235
  const diff = yield* runGit(directory, [
39294
39236
  "diff",
39295
- "--no-ext-diff",
39296
39237
  "-z",
39297
39238
  "--name-only",
39298
39239
  "--diff-filter=ACMR",
@@ -39310,7 +39251,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39310
39251
  }).pipe(withSpan("Git.diffSelection")),
39311
39252
  stagedFilePaths: (directory) => runGit(directory, [
39312
39253
  "diff",
39313
- "--no-ext-diff",
39314
39254
  "--cached",
39315
39255
  "-z",
39316
39256
  "--name-only",
@@ -39356,7 +39296,6 @@ var Git = class Git extends Service()("react-doctor/Git") {
39356
39296
  if (baseRef !== void 0 && !isSafeGitRevision(baseRef)) return null;
39357
39297
  const result = yield* runGit(directory, [
39358
39298
  "diff",
39359
- "--no-ext-diff",
39360
39299
  "--unified=0",
39361
39300
  "--diff-filter=ACMR",
39362
39301
  "--relative",
@@ -45344,5 +45283,5 @@ const startLanguageServer = () => {
45344
45283
  };
45345
45284
  //#endregion
45346
45285
  export { startLanguageServer };
45347
- !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]="04d3db08-86f8-5f5f-a193-609932e35579")}catch(e){}}();
45348
- //# debugId=04d3db08-86f8-5f5f-a193-609932e35579
45286
+ !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]="3eb1e331-d4d9-517d-a23d-3170e3d3203f")}catch(e){}}();
45287
+ //# debugId=3eb1e331-d4d9-517d-a23d-3170e3d3203f
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.7.9-dev.51ecd7b",
3
+ "version": "0.7.9-dev.621be9b",
4
4
  "description": "Your agent writes bad React. This catches it",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -66,7 +66,7 @@
66
66
  "vscode-uri": "^3.1.0",
67
67
  "yaml": "^2.9.0",
68
68
  "deslop-js": "0.7.9",
69
- "oxlint-plugin-react-doctor": "0.7.9-dev.51ecd7b"
69
+ "oxlint-plugin-react-doctor": "0.7.9-dev.621be9b"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",
@@ -75,8 +75,8 @@
75
75
  "commander": "^14.0.3",
76
76
  "ora": "^9.4.0",
77
77
  "@react-doctor/api": "0.7.9",
78
- "@react-doctor/language-server": "0.7.9",
79
- "@react-doctor/core": "0.7.9"
78
+ "@react-doctor/core": "0.7.9",
79
+ "@react-doctor/language-server": "0.7.9"
80
80
  },
81
81
  "engines": {
82
82
  "node": "^20.19.0 || >=22.13.0"