react-doctor 0.7.7-dev.760a3b0 → 0.7.7-dev.79abd71
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 +13 -28
- package/dist/index.js +10 -13
- package/dist/lsp.js +10 -13
- package/package.json +3 -3
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]="
|
|
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){}}();
|
|
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,8 +9,6 @@ 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";
|
|
14
12
|
import ts from "typescript";
|
|
15
13
|
import * as OS from "node:os";
|
|
16
14
|
import os, { tmpdir } from "node:os";
|
|
@@ -18,6 +16,8 @@ import { parseJSON5 } from "confbox";
|
|
|
18
16
|
import * as NodeUrl from "node:url";
|
|
19
17
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
20
18
|
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,13 +22437,12 @@ var JsonReportDiagnosticV3 = class extends Class("JsonReportDiagnosticV3")({
|
|
|
22437
22437
|
fixGroupId: optional(String$1)
|
|
22438
22438
|
}) {};
|
|
22439
22439
|
/**
|
|
22440
|
-
* Deterministic identity string for a
|
|
22441
|
-
*
|
|
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.
|
|
22442
22444
|
*/
|
|
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
|
-
};
|
|
22445
|
+
const buildDiagnosticIdentity = (input) => `${input.filePath}::${input.line}:${input.column}::${input.plugin}/${input.rule}`;
|
|
22447
22446
|
const JsonReportMode = Literals([
|
|
22448
22447
|
"full",
|
|
22449
22448
|
"diff",
|
|
@@ -46511,9 +46510,7 @@ const toJsonReportDiagnostic = (diagnostic, projectRoot, reportRoot) => {
|
|
|
46511
46510
|
line: diagnostic.line,
|
|
46512
46511
|
column: diagnostic.column,
|
|
46513
46512
|
plugin: diagnostic.plugin,
|
|
46514
|
-
rule: diagnostic.rule
|
|
46515
|
-
severity: diagnostic.severity,
|
|
46516
|
-
message: diagnostic.message
|
|
46513
|
+
rule: diagnostic.rule
|
|
46517
46514
|
}),
|
|
46518
46515
|
normalizedFilePath,
|
|
46519
46516
|
category: ruleIdentity.category,
|
|
@@ -47135,7 +47132,7 @@ const makeNoopConsole = () => ({
|
|
|
47135
47132
|
});
|
|
47136
47133
|
//#endregion
|
|
47137
47134
|
//#region src/cli/utils/version.ts
|
|
47138
|
-
const VERSION = "0.7.7-dev.
|
|
47135
|
+
const VERSION = "0.7.7-dev.79abd71";
|
|
47139
47136
|
//#endregion
|
|
47140
47137
|
//#region src/cli/utils/json-mode.ts
|
|
47141
47138
|
let context = null;
|
|
@@ -47504,13 +47501,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
47504
47501
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
47505
47502
|
* standard `SENTRY_RELEASE` override.
|
|
47506
47503
|
*/
|
|
47507
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.7-dev.
|
|
47504
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.7-dev.79abd71`;
|
|
47508
47505
|
/**
|
|
47509
47506
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
47510
47507
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
47511
47508
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
47512
47509
|
*/
|
|
47513
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.7-dev.
|
|
47510
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.7-dev.79abd71") ? "development" : "production");
|
|
47514
47511
|
/**
|
|
47515
47512
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
47516
47513
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -60027,25 +60024,14 @@ const buildOutcomeAttributes = (input) => {
|
|
|
60027
60024
|
const largestRuleBucket = buildRuleBlastRadii(result.diagnostics)[0] ?? null;
|
|
60028
60025
|
let diagnosticsInTestFiles = 0;
|
|
60029
60026
|
let diagnosticsInStoryFiles = 0;
|
|
60030
|
-
const diagnosticSiteCounts = /* @__PURE__ */ new Map();
|
|
60031
60027
|
const findingsPerFixGroup = /* @__PURE__ */ new Map();
|
|
60032
60028
|
for (const diagnostic of result.diagnostics) {
|
|
60033
60029
|
if (diagnostic.fileContext === "test") diagnosticsInTestFiles += 1;
|
|
60034
60030
|
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);
|
|
60043
60031
|
if (diagnostic.fixGroupId) findingsPerFixGroup.set(diagnostic.fixGroupId, (findingsPerFixGroup.get(diagnostic.fixGroupId) ?? 0) + 1);
|
|
60044
60032
|
}
|
|
60045
60033
|
let fixGroupedFindings = 0;
|
|
60046
60034
|
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);
|
|
60049
60035
|
const categoryRollup = {};
|
|
60050
60036
|
for (const [category, count] of countByCategory) categoryRollup[`category.${toCategoryKey(category)}`] = count;
|
|
60051
60037
|
const suppressionRollup = {};
|
|
@@ -60082,7 +60068,6 @@ const buildOutcomeAttributes = (input) => {
|
|
|
60082
60068
|
inStoryFiles: diagnosticsInStoryFiles,
|
|
60083
60069
|
distinctRules: countByRule.size,
|
|
60084
60070
|
topRule,
|
|
60085
|
-
sameSiteOccurrences,
|
|
60086
60071
|
fixGroups: findingsPerFixGroup.size,
|
|
60087
60072
|
fixGroupedFindings,
|
|
60088
60073
|
...categoryRollup,
|
|
@@ -65788,4 +65773,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
65788
65773
|
export {};
|
|
65789
65774
|
|
|
65790
65775
|
//# sourceMappingURL=cli.js.map
|
|
65791
|
-
//# debugId=
|
|
65776
|
+
//# debugId=3de13f8e-2b7e-5141-a62e-0cce9208b352
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
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]="
|
|
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){}}();
|
|
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";
|
|
8
6
|
import * as NFS from "node:fs";
|
|
9
7
|
import fs from "node:fs";
|
|
10
8
|
import * as Path from "node:path";
|
|
@@ -18,6 +16,8 @@ import { parseJSON5 } from "confbox";
|
|
|
18
16
|
import * as NodeUrl from "node:url";
|
|
19
17
|
import { fileURLToPath } from "node:url";
|
|
20
18
|
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,13 +19336,12 @@ var JsonReportDiagnosticV3 = class extends Class("JsonReportDiagnosticV3")({
|
|
|
19336
19336
|
fixGroupId: optional(String$1)
|
|
19337
19337
|
}) {};
|
|
19338
19338
|
/**
|
|
19339
|
-
* Deterministic identity string for a
|
|
19340
|
-
*
|
|
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.
|
|
19341
19343
|
*/
|
|
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
|
-
};
|
|
19344
|
+
const buildDiagnosticIdentity = (input) => `${input.filePath}::${input.line}:${input.column}::${input.plugin}/${input.rule}`;
|
|
19346
19345
|
const JsonReportMode = Literals([
|
|
19347
19346
|
"full",
|
|
19348
19347
|
"diff",
|
|
@@ -43243,9 +43242,7 @@ const toJsonReportDiagnostic = (diagnostic, projectRoot, reportRoot) => {
|
|
|
43243
43242
|
line: diagnostic.line,
|
|
43244
43243
|
column: diagnostic.column,
|
|
43245
43244
|
plugin: diagnostic.plugin,
|
|
43246
|
-
rule: diagnostic.rule
|
|
43247
|
-
severity: diagnostic.severity,
|
|
43248
|
-
message: diagnostic.message
|
|
43245
|
+
rule: diagnostic.rule
|
|
43249
43246
|
}),
|
|
43250
43247
|
normalizedFilePath,
|
|
43251
43248
|
category: ruleIdentity.category,
|
|
@@ -43639,4 +43636,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
43639
43636
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
43640
43637
|
|
|
43641
43638
|
//# sourceMappingURL=index.js.map
|
|
43642
|
-
//# debugId=
|
|
43639
|
+
//# debugId=4096a0e2-9712-5e2f-b602-5ff55d3994a3
|
package/dist/lsp.js
CHANGED
|
@@ -6,8 +6,6 @@ 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";
|
|
11
9
|
import * as NodeChildProcess from "node:child_process";
|
|
12
10
|
import { execFileSync, spawn, spawnSync } from "node:child_process";
|
|
13
11
|
import ts from "typescript";
|
|
@@ -15,6 +13,8 @@ import { parseJSON5 } from "confbox";
|
|
|
15
13
|
import * as NodeUrl from "node:url";
|
|
16
14
|
import { fileURLToPath } from "node:url";
|
|
17
15
|
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,13 +19365,12 @@ var JsonReportDiagnosticV3 = class extends Class("JsonReportDiagnosticV3")({
|
|
|
19365
19365
|
fixGroupId: optional(String$1)
|
|
19366
19366
|
}) {};
|
|
19367
19367
|
/**
|
|
19368
|
-
* Deterministic identity string for a
|
|
19369
|
-
*
|
|
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.
|
|
19370
19372
|
*/
|
|
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
|
-
};
|
|
19373
|
+
const buildDiagnosticIdentity = (input) => `${input.filePath}::${input.line}:${input.column}::${input.plugin}/${input.rule}`;
|
|
19375
19374
|
const JsonReportMode = Literals([
|
|
19376
19375
|
"full",
|
|
19377
19376
|
"diff",
|
|
@@ -43432,9 +43431,7 @@ const toLspDiagnostic = (input) => {
|
|
|
43432
43431
|
line: diagnostic.line,
|
|
43433
43432
|
column: diagnostic.column,
|
|
43434
43433
|
plugin: diagnostic.plugin,
|
|
43435
|
-
rule: diagnostic.rule
|
|
43436
|
-
severity: diagnostic.severity,
|
|
43437
|
-
message: diagnostic.message
|
|
43434
|
+
rule: diagnostic.rule
|
|
43438
43435
|
}),
|
|
43439
43436
|
plugin: diagnostic.plugin,
|
|
43440
43437
|
rule: diagnostic.rule,
|
|
@@ -45276,5 +45273,5 @@ const startLanguageServer = () => {
|
|
|
45276
45273
|
};
|
|
45277
45274
|
//#endregion
|
|
45278
45275
|
export { startLanguageServer };
|
|
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]="
|
|
45280
|
-
//# debugId=
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.7.7-dev.
|
|
3
|
+
"version": "0.7.7-dev.79abd71",
|
|
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
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"oxlint-plugin-react-doctor": "0.7.7-dev.79abd71",
|
|
69
|
+
"deslop-js": "0.7.7"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/babel__code-frame": "^7.27.0",
|