react-doctor 0.6.3-dev.20d81f6 → 0.6.3-dev.8c004f0

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]="d7bda084-a223-5aa7-8605-578888bd1b33")}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]="e34cb22b-7751-5b1a-8422-6c5eb384dbef")}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";
@@ -18,7 +18,6 @@ import { fileURLToPath, pathToFileURL } from "node:url";
18
18
  import { createJiti } from "jiti";
19
19
  import * as Crypto from "node:crypto";
20
20
  import crypto, { createHash, randomUUID } from "node:crypto";
21
- import { ANALYZED_MANIFEST_FILENAMES, DEFAULT_EXTENSIONS } from "deslop-js/analyzed-inputs";
22
21
  import { gzipSync } from "node:zlib";
23
22
  import * as Sentry from "@sentry/node";
24
23
  import { performance as performance$1 } from "node:perf_hooks";
@@ -36129,7 +36128,6 @@ const SOCKET_PACKAGE_PAGE_BASE = "https://socket.dev/npm/package";
36129
36128
  const SOCKET_FREE_USER_AGENT = "react-doctor-supply-chain";
36130
36129
  const FILE_LINT_CACHE_FILENAME = "file-lint-cache.json";
36131
36130
  const FILE_LINT_CACHE_MAX_FILE_COUNT = 5e4;
36132
- const CORE_PACKAGE_VERSION = "0.6.3";
36133
36131
  const DEAD_CODE_CACHE_FILENAME = "dead-code-cache.json";
36134
36132
  const SUPPLY_CHAIN_PLUGIN = "socket";
36135
36133
  const SUPPLY_CHAIN_RULE = "low-supply-chain-score";
@@ -40583,9 +40581,38 @@ const failOpenReadJson = (filePath, fallback) => {
40583
40581
  return fallback;
40584
40582
  }
40585
40583
  };
40586
- const ANALYZED_FILE_EXTENSIONS = new Set(DEFAULT_EXTENSIONS);
40587
- const CORE_SIDE_MANIFEST_NAMES = ["knip.json", "deno.lock"];
40588
- const ANALYZED_MANIFEST_NAMES = new Set([...ANALYZED_MANIFEST_FILENAMES, ...CORE_SIDE_MANIFEST_NAMES]);
40584
+ const ANALYZED_FILE_EXTENSIONS = new Set([
40585
+ ".ts",
40586
+ ".tsx",
40587
+ ".js",
40588
+ ".jsx",
40589
+ ".mts",
40590
+ ".mjs",
40591
+ ".cts",
40592
+ ".cjs",
40593
+ ".mdx",
40594
+ ".astro",
40595
+ ".graphql",
40596
+ ".gql",
40597
+ ".css",
40598
+ ".scss",
40599
+ ".vue",
40600
+ ".svelte"
40601
+ ]);
40602
+ const ANALYZED_MANIFEST_NAMES = new Set([
40603
+ "package.json",
40604
+ "knip.json",
40605
+ "app.json",
40606
+ "pnpm-workspace.yaml",
40607
+ "lerna.json",
40608
+ "pnpm-lock.yaml",
40609
+ "package-lock.json",
40610
+ "yarn.lock",
40611
+ "bun.lock",
40612
+ "bun.lockb",
40613
+ "deno.lock",
40614
+ ".gitignore"
40615
+ ]);
40589
40616
  const isTsConfigLikeFile = (fileName) => (fileName.startsWith("tsconfig") || fileName.startsWith("jsconfig")) && fileName.endsWith(".json");
40590
40617
  const isFingerprintedFile = (fileName) => ANALYZED_FILE_EXTENSIONS.has(Path.extname(fileName).toLowerCase()) || ANALYZED_MANIFEST_NAMES.has(fileName) || isTsConfigLikeFile(fileName);
40591
40618
  const collectAnalyzedFileFingerprints = (rootDirectory) => {
@@ -40611,7 +40638,6 @@ const resolveDeslopVersion = () => {
40611
40638
  };
40612
40639
  const computeDeadCodeCacheKey = (input) => crypto.createHash("sha1").update(JSON.stringify({
40613
40640
  schemaVersion: 1,
40614
- coreVersion: input.coreVersion,
40615
40641
  deslopVersion: resolveDeslopVersion(),
40616
40642
  deslopJsModuleSpecifier: input.deslopJsModuleSpecifier,
40617
40643
  entryPatterns: input.entryPatterns,
@@ -41025,8 +41051,7 @@ const checkDeadCode = async (options) => {
41025
41051
  entryPatterns,
41026
41052
  ignorePatterns,
41027
41053
  tsConfigPath,
41028
- deslopJsModuleSpecifier,
41029
- coreVersion: CORE_PACKAGE_VERSION
41054
+ deslopJsModuleSpecifier
41030
41055
  }) : null;
41031
41056
  if (cacheKey !== null) {
41032
41057
  const cachedDiagnostics = lookupDeadCodeResultCache(resolveReactDoctorCacheDir(rootDirectory), cacheKey);
@@ -45424,7 +45449,7 @@ const makeNoopConsole = () => ({
45424
45449
  });
45425
45450
  //#endregion
45426
45451
  //#region src/cli/utils/version.ts
45427
- const VERSION = "0.6.3-dev.20d81f6";
45452
+ const VERSION = "0.6.3-dev.8c004f0";
45428
45453
  //#endregion
45429
45454
  //#region src/cli/utils/json-mode.ts
45430
45455
  let context = null;
@@ -45793,13 +45818,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
45793
45818
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
45794
45819
  * standard `SENTRY_RELEASE` override.
45795
45820
  */
45796
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.6.3-dev.20d81f6`;
45821
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.6.3-dev.8c004f0`;
45797
45822
  /**
45798
45823
  * Deployment environment shown in Sentry's environment filter. Defaults to
45799
45824
  * `production` for tagged releases and `development` for dev/unbuilt versions,
45800
45825
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
45801
45826
  */
45802
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.6.3-dev.20d81f6") ? "development" : "production");
45827
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.6.3-dev.8c004f0") ? "development" : "production");
45803
45828
  /**
45804
45829
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
45805
45830
  * (set to `0` to disable tracing) and falls back to
@@ -63866,4 +63891,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
63866
63891
  export {};
63867
63892
 
63868
63893
  //# sourceMappingURL=cli.js.map
63869
- //# debugId=d7bda084-a223-5aa7-8605-578888bd1b33
63894
+ //# debugId=e34cb22b-7751-5b1a-8422-6c5eb384dbef
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]="e96374bd-b4c9-5452-8570-b81c11a2959a")}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]="367db57b-e5c7-577e-9efa-ed68817a8271")}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";
@@ -18,7 +18,6 @@ import { fileURLToPath } from "node:url";
18
18
  import { createJiti } from "jiti";
19
19
  import * as Crypto from "node:crypto";
20
20
  import crypto, { createHash } from "node:crypto";
21
- import { ANALYZED_MANIFEST_FILENAMES, DEFAULT_EXTENSIONS } from "deslop-js/analyzed-inputs";
22
21
  import { gzipSync } from "node:zlib";
23
22
  //#region ../../node_modules/.pnpm/effect@4.0.0-beta.70/node_modules/effect/dist/Pipeable.js
24
23
  /**
@@ -32928,7 +32927,6 @@ const SOCKET_PACKAGE_PAGE_BASE = "https://socket.dev/npm/package";
32928
32927
  const SOCKET_FREE_USER_AGENT = "react-doctor-supply-chain";
32929
32928
  const FILE_LINT_CACHE_FILENAME = "file-lint-cache.json";
32930
32929
  const FILE_LINT_CACHE_MAX_FILE_COUNT = 5e4;
32931
- const CORE_PACKAGE_VERSION = "0.6.3";
32932
32930
  const DEAD_CODE_CACHE_FILENAME = "dead-code-cache.json";
32933
32931
  const SUPPLY_CHAIN_PLUGIN = "socket";
32934
32932
  const SUPPLY_CHAIN_RULE = "low-supply-chain-score";
@@ -37340,9 +37338,38 @@ const failOpenReadJson = (filePath, fallback) => {
37340
37338
  return fallback;
37341
37339
  }
37342
37340
  };
37343
- const ANALYZED_FILE_EXTENSIONS = new Set(DEFAULT_EXTENSIONS);
37344
- const CORE_SIDE_MANIFEST_NAMES = ["knip.json", "deno.lock"];
37345
- const ANALYZED_MANIFEST_NAMES = new Set([...ANALYZED_MANIFEST_FILENAMES, ...CORE_SIDE_MANIFEST_NAMES]);
37341
+ const ANALYZED_FILE_EXTENSIONS = new Set([
37342
+ ".ts",
37343
+ ".tsx",
37344
+ ".js",
37345
+ ".jsx",
37346
+ ".mts",
37347
+ ".mjs",
37348
+ ".cts",
37349
+ ".cjs",
37350
+ ".mdx",
37351
+ ".astro",
37352
+ ".graphql",
37353
+ ".gql",
37354
+ ".css",
37355
+ ".scss",
37356
+ ".vue",
37357
+ ".svelte"
37358
+ ]);
37359
+ const ANALYZED_MANIFEST_NAMES = new Set([
37360
+ "package.json",
37361
+ "knip.json",
37362
+ "app.json",
37363
+ "pnpm-workspace.yaml",
37364
+ "lerna.json",
37365
+ "pnpm-lock.yaml",
37366
+ "package-lock.json",
37367
+ "yarn.lock",
37368
+ "bun.lock",
37369
+ "bun.lockb",
37370
+ "deno.lock",
37371
+ ".gitignore"
37372
+ ]);
37346
37373
  const isTsConfigLikeFile = (fileName) => (fileName.startsWith("tsconfig") || fileName.startsWith("jsconfig")) && fileName.endsWith(".json");
37347
37374
  const isFingerprintedFile = (fileName) => ANALYZED_FILE_EXTENSIONS.has(Path.extname(fileName).toLowerCase()) || ANALYZED_MANIFEST_NAMES.has(fileName) || isTsConfigLikeFile(fileName);
37348
37375
  const collectAnalyzedFileFingerprints = (rootDirectory) => {
@@ -37368,7 +37395,6 @@ const resolveDeslopVersion = () => {
37368
37395
  };
37369
37396
  const computeDeadCodeCacheKey = (input) => crypto.createHash("sha1").update(JSON.stringify({
37370
37397
  schemaVersion: 1,
37371
- coreVersion: input.coreVersion,
37372
37398
  deslopVersion: resolveDeslopVersion(),
37373
37399
  deslopJsModuleSpecifier: input.deslopJsModuleSpecifier,
37374
37400
  entryPatterns: input.entryPatterns,
@@ -37782,8 +37808,7 @@ const checkDeadCode = async (options) => {
37782
37808
  entryPatterns,
37783
37809
  ignorePatterns,
37784
37810
  tsConfigPath,
37785
- deslopJsModuleSpecifier,
37786
- coreVersion: CORE_PACKAGE_VERSION
37811
+ deslopJsModuleSpecifier
37787
37812
  }) : null;
37788
37813
  if (cacheKey !== null) {
37789
37814
  const cachedDiagnostics = lookupDeadCodeResultCache(resolveReactDoctorCacheDir(rootDirectory), cacheKey);
@@ -41949,4 +41974,4 @@ const toJsonReport = (result, options) => buildJsonReport({
41949
41974
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
41950
41975
 
41951
41976
  //# sourceMappingURL=index.js.map
41952
- //# debugId=e96374bd-b4c9-5452-8570-b81c11a2959a
41977
+ //# debugId=367db57b-e5c7-577e-9efa-ed68817a8271
package/dist/lsp.js CHANGED
@@ -15,7 +15,6 @@ import { fileURLToPath } from "node:url";
15
15
  import { createJiti } from "jiti";
16
16
  import * as Crypto from "node:crypto";
17
17
  import crypto, { createHash } from "node:crypto";
18
- import { ANALYZED_MANIFEST_FILENAMES, DEFAULT_EXTENSIONS } from "deslop-js/analyzed-inputs";
19
18
  import { gzipSync } from "node:zlib";
20
19
  import { CodeActionKind, CodeActionTriggerKind, DidChangeWatchedFilesNotification, DocumentDiagnosticReportKind, FileChangeType, TextDocumentSyncKind, TextDocuments, createConnection } from "vscode-languageserver/node.js";
21
20
  import { TextDocument } from "vscode-languageserver-textdocument";
@@ -32987,7 +32986,6 @@ const SOCKET_PACKAGE_PAGE_BASE = "https://socket.dev/npm/package";
32987
32986
  const SOCKET_FREE_USER_AGENT = "react-doctor-supply-chain";
32988
32987
  const FILE_LINT_CACHE_FILENAME = "file-lint-cache.json";
32989
32988
  const FILE_LINT_CACHE_MAX_FILE_COUNT = 5e4;
32990
- const CORE_PACKAGE_VERSION = "0.6.3";
32991
32989
  const DEAD_CODE_CACHE_FILENAME = "dead-code-cache.json";
32992
32990
  const SUPPLY_CHAIN_PLUGIN = "socket";
32993
32991
  const SUPPLY_CHAIN_RULE = "low-supply-chain-score";
@@ -37325,9 +37323,38 @@ const failOpenReadJson = (filePath, fallback) => {
37325
37323
  return fallback;
37326
37324
  }
37327
37325
  };
37328
- const ANALYZED_FILE_EXTENSIONS = new Set(DEFAULT_EXTENSIONS);
37329
- const CORE_SIDE_MANIFEST_NAMES = ["knip.json", "deno.lock"];
37330
- const ANALYZED_MANIFEST_NAMES = new Set([...ANALYZED_MANIFEST_FILENAMES, ...CORE_SIDE_MANIFEST_NAMES]);
37326
+ const ANALYZED_FILE_EXTENSIONS = new Set([
37327
+ ".ts",
37328
+ ".tsx",
37329
+ ".js",
37330
+ ".jsx",
37331
+ ".mts",
37332
+ ".mjs",
37333
+ ".cts",
37334
+ ".cjs",
37335
+ ".mdx",
37336
+ ".astro",
37337
+ ".graphql",
37338
+ ".gql",
37339
+ ".css",
37340
+ ".scss",
37341
+ ".vue",
37342
+ ".svelte"
37343
+ ]);
37344
+ const ANALYZED_MANIFEST_NAMES = new Set([
37345
+ "package.json",
37346
+ "knip.json",
37347
+ "app.json",
37348
+ "pnpm-workspace.yaml",
37349
+ "lerna.json",
37350
+ "pnpm-lock.yaml",
37351
+ "package-lock.json",
37352
+ "yarn.lock",
37353
+ "bun.lock",
37354
+ "bun.lockb",
37355
+ "deno.lock",
37356
+ ".gitignore"
37357
+ ]);
37331
37358
  const isTsConfigLikeFile = (fileName) => (fileName.startsWith("tsconfig") || fileName.startsWith("jsconfig")) && fileName.endsWith(".json");
37332
37359
  const isFingerprintedFile = (fileName) => ANALYZED_FILE_EXTENSIONS.has(Path.extname(fileName).toLowerCase()) || ANALYZED_MANIFEST_NAMES.has(fileName) || isTsConfigLikeFile(fileName);
37333
37360
  const collectAnalyzedFileFingerprints = (rootDirectory) => {
@@ -37353,7 +37380,6 @@ const resolveDeslopVersion = () => {
37353
37380
  };
37354
37381
  const computeDeadCodeCacheKey = (input) => crypto.createHash("sha1").update(JSON.stringify({
37355
37382
  schemaVersion: 1,
37356
- coreVersion: input.coreVersion,
37357
37383
  deslopVersion: resolveDeslopVersion(),
37358
37384
  deslopJsModuleSpecifier: input.deslopJsModuleSpecifier,
37359
37385
  entryPatterns: input.entryPatterns,
@@ -37767,8 +37793,7 @@ const checkDeadCode = async (options) => {
37767
37793
  entryPatterns,
37768
37794
  ignorePatterns,
37769
37795
  tsConfigPath,
37770
- deslopJsModuleSpecifier,
37771
- coreVersion: CORE_PACKAGE_VERSION
37796
+ deslopJsModuleSpecifier
37772
37797
  }) : null;
37773
37798
  if (cacheKey !== null) {
37774
37799
  const cachedDiagnostics = lookupDeadCodeResultCache(resolveReactDoctorCacheDir(rootDirectory), cacheKey);
@@ -43673,5 +43698,5 @@ const startLanguageServer = () => {
43673
43698
  };
43674
43699
  //#endregion
43675
43700
  export { startLanguageServer };
43676
- !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]="440ae812-d58d-5654-b3ad-1087b4aa2060")}catch(e){}}();
43677
- //# debugId=440ae812-d58d-5654-b3ad-1087b4aa2060
43701
+ !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]="46e851cc-7b86-5c73-afb0-e09296beab28")}catch(e){}}();
43702
+ //# debugId=46e851cc-7b86-5c73-afb0-e09296beab28
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.6.3-dev.20d81f6",
3
+ "version": "0.6.3-dev.8c004f0",
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.6.3",
69
- "oxlint-plugin-react-doctor": "0.6.3-dev.20d81f6"
69
+ "oxlint-plugin-react-doctor": "0.6.3-dev.8c004f0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",