react-doctor 0.7.5-dev.3aef25a → 0.7.5-dev.654849
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 +5 -32
- package/dist/index.js +2 -29
- package/dist/lsp.js +2 -29
- package/package.json +2 -2
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]="72ed96f2-03b8-5285-a0e9-be502d986219")}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";
|
|
@@ -42812,23 +42812,6 @@ const resolveTsConfigRelativePath = (rootDirectory) => {
|
|
|
42812
42812
|
for (const filename of TSCONFIG_FILENAMES) if (NFS.existsSync(Path.join(rootDirectory, filename))) return `./${filename}`;
|
|
42813
42813
|
return null;
|
|
42814
42814
|
};
|
|
42815
|
-
const DERIVED_STATE_RULE_PRIORITY = new Map([
|
|
42816
|
-
["no-initialize-state", 0],
|
|
42817
|
-
["no-adjust-state-on-prop-change", 1],
|
|
42818
|
-
["no-derived-state", 2],
|
|
42819
|
-
["no-derived-state-effect", 3]
|
|
42820
|
-
]);
|
|
42821
|
-
const doDiagnosticSpansOverlap = (first, second) => {
|
|
42822
|
-
if (first.filePath !== second.filePath || first.plugin !== second.plugin) return false;
|
|
42823
|
-
if (first.offset !== void 0 && second.offset !== void 0) {
|
|
42824
|
-
const firstEnd = first.offset + Math.max(first.length ?? 1, 1);
|
|
42825
|
-
const secondEnd = second.offset + Math.max(second.length ?? 1, 1);
|
|
42826
|
-
return first.offset < secondEnd && second.offset < firstEnd;
|
|
42827
|
-
}
|
|
42828
|
-
const firstEndLine = first.endLine ?? first.line;
|
|
42829
|
-
const secondEndLine = second.endLine ?? second.line;
|
|
42830
|
-
return first.line <= secondEndLine && second.line <= firstEndLine;
|
|
42831
|
-
};
|
|
42832
42815
|
const dedupeDiagnostics = (diagnostics) => {
|
|
42833
42816
|
const seenKeys = /* @__PURE__ */ new Set();
|
|
42834
42817
|
const uniqueDiagnostics = [];
|
|
@@ -42836,16 +42819,6 @@ const dedupeDiagnostics = (diagnostics) => {
|
|
|
42836
42819
|
const key = `${diagnostic.filePath}\u0000${diagnostic.line}\u0000${diagnostic.column}\u0000${diagnostic.plugin}\u0000${diagnostic.rule}\u0000${diagnostic.severity}\u0000${diagnostic.message}`;
|
|
42837
42820
|
if (seenKeys.has(key)) continue;
|
|
42838
42821
|
seenKeys.add(key);
|
|
42839
|
-
const priority = DERIVED_STATE_RULE_PRIORITY.get(diagnostic.rule);
|
|
42840
|
-
if (priority !== void 0) {
|
|
42841
|
-
const overlappingDiagnosticIndex = uniqueDiagnostics.findIndex((candidate) => candidate.rule !== diagnostic.rule && candidate.severity === diagnostic.severity && DERIVED_STATE_RULE_PRIORITY.has(candidate.rule) && doDiagnosticSpansOverlap(candidate, diagnostic));
|
|
42842
|
-
if (overlappingDiagnosticIndex >= 0) {
|
|
42843
|
-
const existingDiagnostic = uniqueDiagnostics[overlappingDiagnosticIndex];
|
|
42844
|
-
const existingPriority = existingDiagnostic ? DERIVED_STATE_RULE_PRIORITY.get(existingDiagnostic.rule) : void 0;
|
|
42845
|
-
if (existingPriority !== void 0 && priority < existingPriority) uniqueDiagnostics[overlappingDiagnosticIndex] = diagnostic;
|
|
42846
|
-
continue;
|
|
42847
|
-
}
|
|
42848
|
-
}
|
|
42849
42822
|
uniqueDiagnostics.push(diagnostic);
|
|
42850
42823
|
}
|
|
42851
42824
|
return uniqueDiagnostics;
|
|
@@ -46665,7 +46638,7 @@ const makeNoopConsole = () => ({
|
|
|
46665
46638
|
});
|
|
46666
46639
|
//#endregion
|
|
46667
46640
|
//#region src/cli/utils/version.ts
|
|
46668
|
-
const VERSION = "0.7.5-dev.
|
|
46641
|
+
const VERSION = "0.7.5-dev.0654849";
|
|
46669
46642
|
//#endregion
|
|
46670
46643
|
//#region src/cli/utils/json-mode.ts
|
|
46671
46644
|
let context = null;
|
|
@@ -47034,13 +47007,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
47034
47007
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
47035
47008
|
* standard `SENTRY_RELEASE` override.
|
|
47036
47009
|
*/
|
|
47037
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.5-dev.
|
|
47010
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.5-dev.0654849`;
|
|
47038
47011
|
/**
|
|
47039
47012
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
47040
47013
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
47041
47014
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
47042
47015
|
*/
|
|
47043
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.5-dev.
|
|
47016
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.5-dev.0654849") ? "development" : "production");
|
|
47044
47017
|
/**
|
|
47045
47018
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
47046
47019
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -65229,4 +65202,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
65229
65202
|
export {};
|
|
65230
65203
|
|
|
65231
65204
|
//# sourceMappingURL=cli.js.map
|
|
65232
|
-
//# debugId=
|
|
65205
|
+
//# debugId=72ed96f2-03b8-5285-a0e9-be502d986219
|
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]="
|
|
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]="6430a76b-a36a-5cf5-9ca0-cc1ca8952f41")}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";
|
|
@@ -39569,23 +39569,6 @@ const resolveTsConfigRelativePath = (rootDirectory) => {
|
|
|
39569
39569
|
for (const filename of TSCONFIG_FILENAMES) if (NFS.existsSync(Path.join(rootDirectory, filename))) return `./${filename}`;
|
|
39570
39570
|
return null;
|
|
39571
39571
|
};
|
|
39572
|
-
const DERIVED_STATE_RULE_PRIORITY = new Map([
|
|
39573
|
-
["no-initialize-state", 0],
|
|
39574
|
-
["no-adjust-state-on-prop-change", 1],
|
|
39575
|
-
["no-derived-state", 2],
|
|
39576
|
-
["no-derived-state-effect", 3]
|
|
39577
|
-
]);
|
|
39578
|
-
const doDiagnosticSpansOverlap = (first, second) => {
|
|
39579
|
-
if (first.filePath !== second.filePath || first.plugin !== second.plugin) return false;
|
|
39580
|
-
if (first.offset !== void 0 && second.offset !== void 0) {
|
|
39581
|
-
const firstEnd = first.offset + Math.max(first.length ?? 1, 1);
|
|
39582
|
-
const secondEnd = second.offset + Math.max(second.length ?? 1, 1);
|
|
39583
|
-
return first.offset < secondEnd && second.offset < firstEnd;
|
|
39584
|
-
}
|
|
39585
|
-
const firstEndLine = first.endLine ?? first.line;
|
|
39586
|
-
const secondEndLine = second.endLine ?? second.line;
|
|
39587
|
-
return first.line <= secondEndLine && second.line <= firstEndLine;
|
|
39588
|
-
};
|
|
39589
39572
|
const dedupeDiagnostics = (diagnostics) => {
|
|
39590
39573
|
const seenKeys = /* @__PURE__ */ new Set();
|
|
39591
39574
|
const uniqueDiagnostics = [];
|
|
@@ -39593,16 +39576,6 @@ const dedupeDiagnostics = (diagnostics) => {
|
|
|
39593
39576
|
const key = `${diagnostic.filePath}\u0000${diagnostic.line}\u0000${diagnostic.column}\u0000${diagnostic.plugin}\u0000${diagnostic.rule}\u0000${diagnostic.severity}\u0000${diagnostic.message}`;
|
|
39594
39577
|
if (seenKeys.has(key)) continue;
|
|
39595
39578
|
seenKeys.add(key);
|
|
39596
|
-
const priority = DERIVED_STATE_RULE_PRIORITY.get(diagnostic.rule);
|
|
39597
|
-
if (priority !== void 0) {
|
|
39598
|
-
const overlappingDiagnosticIndex = uniqueDiagnostics.findIndex((candidate) => candidate.rule !== diagnostic.rule && candidate.severity === diagnostic.severity && DERIVED_STATE_RULE_PRIORITY.has(candidate.rule) && doDiagnosticSpansOverlap(candidate, diagnostic));
|
|
39599
|
-
if (overlappingDiagnosticIndex >= 0) {
|
|
39600
|
-
const existingDiagnostic = uniqueDiagnostics[overlappingDiagnosticIndex];
|
|
39601
|
-
const existingPriority = existingDiagnostic ? DERIVED_STATE_RULE_PRIORITY.get(existingDiagnostic.rule) : void 0;
|
|
39602
|
-
if (existingPriority !== void 0 && priority < existingPriority) uniqueDiagnostics[overlappingDiagnosticIndex] = diagnostic;
|
|
39603
|
-
continue;
|
|
39604
|
-
}
|
|
39605
|
-
}
|
|
39606
39579
|
uniqueDiagnostics.push(diagnostic);
|
|
39607
39580
|
}
|
|
39608
39581
|
return uniqueDiagnostics;
|
|
@@ -43208,4 +43181,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
43208
43181
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
43209
43182
|
|
|
43210
43183
|
//# sourceMappingURL=index.js.map
|
|
43211
|
-
//# debugId=
|
|
43184
|
+
//# debugId=6430a76b-a36a-5cf5-9ca0-cc1ca8952f41
|
package/dist/lsp.js
CHANGED
|
@@ -39547,23 +39547,6 @@ const resolveTsConfigRelativePath = (rootDirectory) => {
|
|
|
39547
39547
|
for (const filename of TSCONFIG_FILENAMES) if (NFS.existsSync(Path.join(rootDirectory, filename))) return `./${filename}`;
|
|
39548
39548
|
return null;
|
|
39549
39549
|
};
|
|
39550
|
-
const DERIVED_STATE_RULE_PRIORITY = new Map([
|
|
39551
|
-
["no-initialize-state", 0],
|
|
39552
|
-
["no-adjust-state-on-prop-change", 1],
|
|
39553
|
-
["no-derived-state", 2],
|
|
39554
|
-
["no-derived-state-effect", 3]
|
|
39555
|
-
]);
|
|
39556
|
-
const doDiagnosticSpansOverlap = (first, second) => {
|
|
39557
|
-
if (first.filePath !== second.filePath || first.plugin !== second.plugin) return false;
|
|
39558
|
-
if (first.offset !== void 0 && second.offset !== void 0) {
|
|
39559
|
-
const firstEnd = first.offset + Math.max(first.length ?? 1, 1);
|
|
39560
|
-
const secondEnd = second.offset + Math.max(second.length ?? 1, 1);
|
|
39561
|
-
return first.offset < secondEnd && second.offset < firstEnd;
|
|
39562
|
-
}
|
|
39563
|
-
const firstEndLine = first.endLine ?? first.line;
|
|
39564
|
-
const secondEndLine = second.endLine ?? second.line;
|
|
39565
|
-
return first.line <= secondEndLine && second.line <= firstEndLine;
|
|
39566
|
-
};
|
|
39567
39550
|
const dedupeDiagnostics = (diagnostics) => {
|
|
39568
39551
|
const seenKeys = /* @__PURE__ */ new Set();
|
|
39569
39552
|
const uniqueDiagnostics = [];
|
|
@@ -39571,16 +39554,6 @@ const dedupeDiagnostics = (diagnostics) => {
|
|
|
39571
39554
|
const key = `${diagnostic.filePath}\u0000${diagnostic.line}\u0000${diagnostic.column}\u0000${diagnostic.plugin}\u0000${diagnostic.rule}\u0000${diagnostic.severity}\u0000${diagnostic.message}`;
|
|
39572
39555
|
if (seenKeys.has(key)) continue;
|
|
39573
39556
|
seenKeys.add(key);
|
|
39574
|
-
const priority = DERIVED_STATE_RULE_PRIORITY.get(diagnostic.rule);
|
|
39575
|
-
if (priority !== void 0) {
|
|
39576
|
-
const overlappingDiagnosticIndex = uniqueDiagnostics.findIndex((candidate) => candidate.rule !== diagnostic.rule && candidate.severity === diagnostic.severity && DERIVED_STATE_RULE_PRIORITY.has(candidate.rule) && doDiagnosticSpansOverlap(candidate, diagnostic));
|
|
39577
|
-
if (overlappingDiagnosticIndex >= 0) {
|
|
39578
|
-
const existingDiagnostic = uniqueDiagnostics[overlappingDiagnosticIndex];
|
|
39579
|
-
const existingPriority = existingDiagnostic ? DERIVED_STATE_RULE_PRIORITY.get(existingDiagnostic.rule) : void 0;
|
|
39580
|
-
if (existingPriority !== void 0 && priority < existingPriority) uniqueDiagnostics[overlappingDiagnosticIndex] = diagnostic;
|
|
39581
|
-
continue;
|
|
39582
|
-
}
|
|
39583
|
-
}
|
|
39584
39557
|
uniqueDiagnostics.push(diagnostic);
|
|
39585
39558
|
}
|
|
39586
39559
|
return uniqueDiagnostics;
|
|
@@ -44852,5 +44825,5 @@ const startLanguageServer = () => {
|
|
|
44852
44825
|
};
|
|
44853
44826
|
//#endregion
|
|
44854
44827
|
export { startLanguageServer };
|
|
44855
|
-
!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]="
|
|
44856
|
-
//# debugId=
|
|
44828
|
+
!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]="7af68c1a-91df-56eb-982a-161195d345fc")}catch(e){}}();
|
|
44829
|
+
//# debugId=7af68c1a-91df-56eb-982a-161195d345fc
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.7.5-dev.
|
|
3
|
+
"version": "0.7.5-dev.0654849",
|
|
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.5",
|
|
69
|
-
"oxlint-plugin-react-doctor": "0.7.5-dev.
|
|
69
|
+
"oxlint-plugin-react-doctor": "0.7.5-dev.0654849"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/babel__code-frame": "^7.27.0",
|