react-doctor 0.7.7-dev.dc5c828 → 0.7.7-dev.e632f8a

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]="3de13f8e-2b7e-5141-a62e-0cce9208b352")}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]="81733cc9-f550-5459-9418-8ab3751a3ea3")}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";
@@ -9,6 +9,8 @@ import * as NFS from "node:fs";
9
9
  import fs, { mkdtempSync, rmSync } from "node:fs";
10
10
  import process$1 from "node:process";
11
11
  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";
12
+ import * as Crypto from "node:crypto";
13
+ import crypto, { createHash, randomUUID } from "node:crypto";
12
14
  import ts from "typescript";
13
15
  import * as OS from "node:os";
14
16
  import os, { tmpdir } from "node:os";
@@ -16,8 +18,6 @@ import { parseJSON5 } from "confbox";
16
18
  import * as NodeUrl from "node:url";
17
19
  import { fileURLToPath, pathToFileURL } from "node:url";
18
20
  import { createJiti } from "jiti";
19
- import * as Crypto from "node:crypto";
20
- import crypto, { createHash, randomUUID } from "node:crypto";
21
21
  import { ANALYZED_MANIFEST_FILENAMES, DEFAULT_EXTENSIONS } from "deslop-js/analyzed-inputs";
22
22
  import { gzipSync } from "node:zlib";
23
23
  import * as Sentry from "@sentry/node";
@@ -22437,12 +22437,13 @@ var JsonReportDiagnosticV3 = class extends Class("JsonReportDiagnosticV3")({
22437
22437
  fixGroupId: optional(String$1)
22438
22438
  }) {};
22439
22439
  /**
22440
- * Deterministic identity string for a diagnostic. Same diagnostic
22441
- * across two scans yields the same identity; lets baselines,
22442
- * suppression files, content-hash caches, and IDE "ignore this"
22443
- * actions all key off one shared shape.
22440
+ * Deterministic identity string for a retained diagnostic occurrence.
22441
+ * Severity and message distinguish content variants at one normalized site.
22444
22442
  */
22445
- const buildDiagnosticIdentity = (input) => `${input.filePath}::${input.line}:${input.column}::${input.plugin}/${input.rule}`;
22443
+ const buildDiagnosticIdentity = (input) => {
22444
+ const occurrenceDigest = createHash("sha256").update(JSON.stringify([input.severity, input.message])).digest("hex");
22445
+ return `${input.filePath}::${input.line}:${input.column}::${input.plugin}/${input.rule}::${occurrenceDigest}`;
22446
+ };
22446
22447
  const JsonReportMode = Literals([
22447
22448
  "full",
22448
22449
  "diff",
@@ -46510,7 +46511,9 @@ const toJsonReportDiagnostic = (diagnostic, projectRoot, reportRoot) => {
46510
46511
  line: diagnostic.line,
46511
46512
  column: diagnostic.column,
46512
46513
  plugin: diagnostic.plugin,
46513
- rule: diagnostic.rule
46514
+ rule: diagnostic.rule,
46515
+ severity: diagnostic.severity,
46516
+ message: diagnostic.message
46514
46517
  }),
46515
46518
  normalizedFilePath,
46516
46519
  category: ruleIdentity.category,
@@ -47132,7 +47135,7 @@ const makeNoopConsole = () => ({
47132
47135
  });
47133
47136
  //#endregion
47134
47137
  //#region src/cli/utils/version.ts
47135
- const VERSION = "0.7.7-dev.dc5c828";
47138
+ const VERSION = "0.7.7-dev.e632f8a";
47136
47139
  //#endregion
47137
47140
  //#region src/cli/utils/json-mode.ts
47138
47141
  let context = null;
@@ -47501,13 +47504,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
47501
47504
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
47502
47505
  * standard `SENTRY_RELEASE` override.
47503
47506
  */
47504
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.7-dev.dc5c828`;
47507
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.7-dev.e632f8a`;
47505
47508
  /**
47506
47509
  * Deployment environment shown in Sentry's environment filter. Defaults to
47507
47510
  * `production` for tagged releases and `development` for dev/unbuilt versions,
47508
47511
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
47509
47512
  */
47510
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.7-dev.dc5c828") ? "development" : "production");
47513
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.7-dev.e632f8a") ? "development" : "production");
47511
47514
  /**
47512
47515
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
47513
47516
  * (set to `0` to disable tracing) and falls back to
@@ -60024,14 +60027,25 @@ const buildOutcomeAttributes = (input) => {
60024
60027
  const largestRuleBucket = buildRuleBlastRadii(result.diagnostics)[0] ?? null;
60025
60028
  let diagnosticsInTestFiles = 0;
60026
60029
  let diagnosticsInStoryFiles = 0;
60030
+ const diagnosticSiteCounts = /* @__PURE__ */ new Map();
60027
60031
  const findingsPerFixGroup = /* @__PURE__ */ new Map();
60028
60032
  for (const diagnostic of result.diagnostics) {
60029
60033
  if (diagnostic.fileContext === "test") diagnosticsInTestFiles += 1;
60030
60034
  if (diagnostic.fileContext === "story") diagnosticsInStoryFiles += 1;
60035
+ const diagnosticSite = JSON.stringify([
60036
+ diagnostic.filePath,
60037
+ diagnostic.line,
60038
+ diagnostic.column,
60039
+ diagnostic.plugin,
60040
+ diagnostic.rule
60041
+ ]);
60042
+ diagnosticSiteCounts.set(diagnosticSite, (diagnosticSiteCounts.get(diagnosticSite) ?? 0) + 1);
60031
60043
  if (diagnostic.fixGroupId) findingsPerFixGroup.set(diagnostic.fixGroupId, (findingsPerFixGroup.get(diagnostic.fixGroupId) ?? 0) + 1);
60032
60044
  }
60033
60045
  let fixGroupedFindings = 0;
60034
60046
  for (const count of findingsPerFixGroup.values()) fixGroupedFindings += count;
60047
+ let sameSiteOccurrences = 0;
60048
+ for (const count of diagnosticSiteCounts.values()) sameSiteOccurrences += Math.max(0, count - 1);
60035
60049
  const categoryRollup = {};
60036
60050
  for (const [category, count] of countByCategory) categoryRollup[`category.${toCategoryKey(category)}`] = count;
60037
60051
  const suppressionRollup = {};
@@ -60068,6 +60082,7 @@ const buildOutcomeAttributes = (input) => {
60068
60082
  inStoryFiles: diagnosticsInStoryFiles,
60069
60083
  distinctRules: countByRule.size,
60070
60084
  topRule,
60085
+ sameSiteOccurrences,
60071
60086
  fixGroups: findingsPerFixGroup.size,
60072
60087
  fixGroupedFindings,
60073
60088
  ...categoryRollup,
@@ -65773,4 +65788,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
65773
65788
  export {};
65774
65789
 
65775
65790
  //# sourceMappingURL=cli.js.map
65776
- //# debugId=3de13f8e-2b7e-5141-a62e-0cce9208b352
65791
+ //# debugId=81733cc9-f550-5459-9418-8ab3751a3ea3
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
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]="4096a0e2-9712-5e2f-b602-5ff55d3994a3")}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]="e1826107-f3f6-59ba-81d2-062446775e01")}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";
6
+ import * as Crypto from "node:crypto";
7
+ import crypto, { createHash } from "node:crypto";
6
8
  import * as NFS from "node:fs";
7
9
  import fs from "node:fs";
8
10
  import * as Path from "node:path";
@@ -16,8 +18,6 @@ import { parseJSON5 } from "confbox";
16
18
  import * as NodeUrl from "node:url";
17
19
  import { fileURLToPath } from "node:url";
18
20
  import { createJiti } from "jiti";
19
- import * as Crypto from "node:crypto";
20
- import crypto, { createHash } from "node:crypto";
21
21
  import { ANALYZED_MANIFEST_FILENAMES, DEFAULT_EXTENSIONS } from "deslop-js/analyzed-inputs";
22
22
  import { gzipSync } from "node:zlib";
23
23
  //#region ../../node_modules/.pnpm/effect@4.0.0-beta.70/node_modules/effect/dist/Pipeable.js
@@ -19336,12 +19336,13 @@ var JsonReportDiagnosticV3 = class extends Class("JsonReportDiagnosticV3")({
19336
19336
  fixGroupId: optional(String$1)
19337
19337
  }) {};
19338
19338
  /**
19339
- * Deterministic identity string for a diagnostic. Same diagnostic
19340
- * across two scans yields the same identity; lets baselines,
19341
- * suppression files, content-hash caches, and IDE "ignore this"
19342
- * actions all key off one shared shape.
19339
+ * Deterministic identity string for a retained diagnostic occurrence.
19340
+ * Severity and message distinguish content variants at one normalized site.
19343
19341
  */
19344
- const buildDiagnosticIdentity = (input) => `${input.filePath}::${input.line}:${input.column}::${input.plugin}/${input.rule}`;
19342
+ const buildDiagnosticIdentity = (input) => {
19343
+ const occurrenceDigest = createHash("sha256").update(JSON.stringify([input.severity, input.message])).digest("hex");
19344
+ return `${input.filePath}::${input.line}:${input.column}::${input.plugin}/${input.rule}::${occurrenceDigest}`;
19345
+ };
19345
19346
  const JsonReportMode = Literals([
19346
19347
  "full",
19347
19348
  "diff",
@@ -43242,7 +43243,9 @@ const toJsonReportDiagnostic = (diagnostic, projectRoot, reportRoot) => {
43242
43243
  line: diagnostic.line,
43243
43244
  column: diagnostic.column,
43244
43245
  plugin: diagnostic.plugin,
43245
- rule: diagnostic.rule
43246
+ rule: diagnostic.rule,
43247
+ severity: diagnostic.severity,
43248
+ message: diagnostic.message
43246
43249
  }),
43247
43250
  normalizedFilePath,
43248
43251
  category: ruleIdentity.category,
@@ -43636,4 +43639,4 @@ const toJsonReport = (result, options) => buildJsonReport({
43636
43639
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
43637
43640
 
43638
43641
  //# sourceMappingURL=index.js.map
43639
- //# debugId=4096a0e2-9712-5e2f-b602-5ff55d3994a3
43642
+ //# debugId=e1826107-f3f6-59ba-81d2-062446775e01
package/dist/lsp.js CHANGED
@@ -6,6 +6,8 @@ import os from "node:os";
6
6
  import * as Path from "node:path";
7
7
  import path from "node:path";
8
8
  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";
9
+ import * as Crypto from "node:crypto";
10
+ import crypto, { createHash } from "node:crypto";
9
11
  import * as NodeChildProcess from "node:child_process";
10
12
  import { execFileSync, spawn, spawnSync } from "node:child_process";
11
13
  import ts from "typescript";
@@ -13,8 +15,6 @@ import { parseJSON5 } from "confbox";
13
15
  import * as NodeUrl from "node:url";
14
16
  import { fileURLToPath } from "node:url";
15
17
  import { createJiti } from "jiti";
16
- import * as Crypto from "node:crypto";
17
- import crypto, { createHash } from "node:crypto";
18
18
  import { ANALYZED_MANIFEST_FILENAMES, DEFAULT_EXTENSIONS } from "deslop-js/analyzed-inputs";
19
19
  import { gzipSync } from "node:zlib";
20
20
  import { CodeActionKind, CodeActionTriggerKind, DidChangeWatchedFilesNotification, DocumentDiagnosticReportKind, FileChangeType, TextDocumentSyncKind, TextDocuments, createConnection } from "vscode-languageserver/node.js";
@@ -19365,12 +19365,13 @@ var JsonReportDiagnosticV3 = class extends Class("JsonReportDiagnosticV3")({
19365
19365
  fixGroupId: optional(String$1)
19366
19366
  }) {};
19367
19367
  /**
19368
- * Deterministic identity string for a diagnostic. Same diagnostic
19369
- * across two scans yields the same identity; lets baselines,
19370
- * suppression files, content-hash caches, and IDE "ignore this"
19371
- * actions all key off one shared shape.
19368
+ * Deterministic identity string for a retained diagnostic occurrence.
19369
+ * Severity and message distinguish content variants at one normalized site.
19372
19370
  */
19373
- const buildDiagnosticIdentity = (input) => `${input.filePath}::${input.line}:${input.column}::${input.plugin}/${input.rule}`;
19371
+ const buildDiagnosticIdentity = (input) => {
19372
+ const occurrenceDigest = createHash("sha256").update(JSON.stringify([input.severity, input.message])).digest("hex");
19373
+ return `${input.filePath}::${input.line}:${input.column}::${input.plugin}/${input.rule}::${occurrenceDigest}`;
19374
+ };
19374
19375
  const JsonReportMode = Literals([
19375
19376
  "full",
19376
19377
  "diff",
@@ -43431,7 +43432,9 @@ const toLspDiagnostic = (input) => {
43431
43432
  line: diagnostic.line,
43432
43433
  column: diagnostic.column,
43433
43434
  plugin: diagnostic.plugin,
43434
- rule: diagnostic.rule
43435
+ rule: diagnostic.rule,
43436
+ severity: diagnostic.severity,
43437
+ message: diagnostic.message
43435
43438
  }),
43436
43439
  plugin: diagnostic.plugin,
43437
43440
  rule: diagnostic.rule,
@@ -45273,5 +45276,5 @@ const startLanguageServer = () => {
45273
45276
  };
45274
45277
  //#endregion
45275
45278
  export { startLanguageServer };
45276
- !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]="9428cea1-cc36-547a-941f-20487b0140fc")}catch(e){}}();
45277
- //# debugId=9428cea1-cc36-547a-941f-20487b0140fc
45279
+ !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]="249156e6-4373-541f-bda8-032ea9394ea7")}catch(e){}}();
45280
+ //# debugId=249156e6-4373-541f-bda8-032ea9394ea7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.7.7-dev.dc5c828",
3
+ "version": "0.7.7-dev.e632f8a",
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.7",
69
- "oxlint-plugin-react-doctor": "0.7.7-dev.dc5c828"
69
+ "oxlint-plugin-react-doctor": "0.7.7-dev.e632f8a"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",
@@ -74,9 +74,9 @@
74
74
  "@xterm/headless": "^6.0.0",
75
75
  "commander": "^14.0.3",
76
76
  "ora": "^9.4.0",
77
- "@react-doctor/api": "0.7.7",
78
77
  "@react-doctor/core": "0.7.7",
79
- "@react-doctor/language-server": "0.7.7"
78
+ "@react-doctor/language-server": "0.7.7",
79
+ "@react-doctor/api": "0.7.7"
80
80
  },
81
81
  "engines": {
82
82
  "node": "^20.19.0 || >=22.13.0"