react-doctor 0.4.2-dev.571ca9c → 0.4.2-dev.5b06a86
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 +16 -9
- package/dist/index.js +4 -4
- package/dist/lsp.js +4 -4
- package/package.json +4 -4
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]="59fe9fce-f831-56a0-b6b2-b014bd09d533")}catch(e){}}();
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
@@ -9032,8 +9032,8 @@ const checkDeadCode = async (options) => {
|
|
|
9032
9032
|
plugin: DEAD_CODE_PLUGIN,
|
|
9033
9033
|
rule: unusedDependency.isDevDependency ? "unused-dev-dependency" : "unused-dependency",
|
|
9034
9034
|
severity: "warning",
|
|
9035
|
-
message: `Unused ${label}: \`${unusedDependency.name}
|
|
9036
|
-
help:
|
|
9035
|
+
message: `Unused ${label}: \`${unusedDependency.name}\``,
|
|
9036
|
+
help: `An unused ${label} adds install time and supply-chain surface without being used; remove it from package.json if it is genuinely unused.`,
|
|
9037
9037
|
line: 0,
|
|
9038
9038
|
column: 0,
|
|
9039
9039
|
category: DEAD_CODE_CATEGORY
|
|
@@ -12287,7 +12287,7 @@ const makeNoopConsole = () => ({
|
|
|
12287
12287
|
});
|
|
12288
12288
|
//#endregion
|
|
12289
12289
|
//#region src/cli/utils/version.ts
|
|
12290
|
-
const VERSION = "0.4.2-dev.
|
|
12290
|
+
const VERSION = "0.4.2-dev.5b06a86";
|
|
12291
12291
|
//#endregion
|
|
12292
12292
|
//#region src/cli/utils/json-mode.ts
|
|
12293
12293
|
let context = null;
|
|
@@ -12645,13 +12645,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
12645
12645
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
12646
12646
|
* standard `SENTRY_RELEASE` override.
|
|
12647
12647
|
*/
|
|
12648
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.4.2-dev.
|
|
12648
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.4.2-dev.5b06a86`;
|
|
12649
12649
|
/**
|
|
12650
12650
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
12651
12651
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
12652
12652
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
12653
12653
|
*/
|
|
12654
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.4.2-dev.
|
|
12654
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.4.2-dev.5b06a86") ? "development" : "production");
|
|
12655
12655
|
/**
|
|
12656
12656
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
12657
12657
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -16647,6 +16647,11 @@ const printCategoryCountUp = (tallies) => Effect.gen(function* () {
|
|
|
16647
16647
|
});
|
|
16648
16648
|
const TOP_ERROR_DETAIL_INDENT = " ";
|
|
16649
16649
|
const pickRepresentativeDiagnostic = (ruleDiagnostics) => ruleDiagnostics.find((diagnostic) => diagnostic.line > 0) ?? ruleDiagnostics[0];
|
|
16650
|
+
const hasIndistinctSiteLocations = (ruleDiagnostics) => {
|
|
16651
|
+
const firstDiagnostic = ruleDiagnostics[0];
|
|
16652
|
+
if (firstDiagnostic === void 0) return false;
|
|
16653
|
+
return ruleDiagnostics.every((diagnostic) => diagnostic.line <= 0 && diagnostic.filePath === firstDiagnostic.filePath);
|
|
16654
|
+
};
|
|
16650
16655
|
const FRAME_CONTEXT_REACH_LINES = 3;
|
|
16651
16656
|
const clusterNearbyDiagnostics = (diagnostics) => {
|
|
16652
16657
|
const byFile = groupBy(diagnostics, (diagnostic) => diagnostic.filePath);
|
|
@@ -16710,7 +16715,9 @@ const buildRuleDetailBlock = (ruleKey, ruleDiagnostics, resolveSourceRoot, rende
|
|
|
16710
16715
|
const learnMoreLine = formatLearnMoreLine(representative);
|
|
16711
16716
|
if (learnMoreLine) lines.push(`${TOP_ERROR_DETAIL_INDENT}${highlighter.info(learnMoreLine)}`);
|
|
16712
16717
|
}
|
|
16713
|
-
|
|
16718
|
+
const isCollapsedWarningGroup = severity === "warning" && hasIndistinctSiteLocations(ruleDiagnostics);
|
|
16719
|
+
const impactMessages = isCollapsedWarningGroup ? [...new Set(ruleDiagnostics.map((diagnostic) => diagnostic.message))] : [representative.message];
|
|
16720
|
+
for (const impactMessage of impactMessages) for (const explanationLine of wrapTextToWidth(impactMessage, resolveMeasureWidth(4), { breakLongWords: false })) lines.push(`${TOP_ERROR_DETAIL_INDENT}${explanationLine}`);
|
|
16714
16721
|
if (representative.help) for (const fixLine of wrapTextToWidth(`→ ${representative.help}`, resolveMeasureWidth(4), { breakLongWords: false })) lines.push(highlighter.dim(`${TOP_ERROR_DETAIL_INDENT}${fixLine}`));
|
|
16715
16722
|
if (renderEverySite && isAgentEnvironment) {
|
|
16716
16723
|
const fixRecipeLine = formatFixRecipeLine(representative);
|
|
@@ -16718,7 +16725,7 @@ const buildRuleDetailBlock = (ruleKey, ruleDiagnostics, resolveSourceRoot, rende
|
|
|
16718
16725
|
}
|
|
16719
16726
|
const renderCodeFrame = severity === "error";
|
|
16720
16727
|
const sites = renderEverySite ? ruleDiagnostics : [representative];
|
|
16721
|
-
for (const cluster of clusterNearbyDiagnostics(sites)) lines.push(...buildDiagnosticClusterLines(cluster, resolveSourceRoot, renderCodeFrame));
|
|
16728
|
+
if (!(isCollapsedWarningGroup && representative.help.includes(representative.filePath))) for (const cluster of clusterNearbyDiagnostics(sites)) lines.push(...buildDiagnosticClusterLines(cluster, resolveSourceRoot, renderCodeFrame));
|
|
16722
16729
|
return lines;
|
|
16723
16730
|
};
|
|
16724
16731
|
const selectErrorRuleGroups = (diagnostics, rulePriority) => buildSortedRuleGroups(diagnostics.filter((diagnostic) => diagnostic.severity === "error"), rulePriority);
|
|
@@ -21944,4 +21951,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
21944
21951
|
export {};
|
|
21945
21952
|
|
|
21946
21953
|
//# sourceMappingURL=cli.js.map
|
|
21947
|
-
//# debugId=
|
|
21954
|
+
//# debugId=59fe9fce-f831-56a0-b6b2-b014bd09d533
|
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]="e1b6f028-4e9b-5414-b7ff-8f9f22286152")}catch(e){}}();
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import * as Schema from "effect/Schema";
|
|
5
5
|
import * as fs$1 from "node:fs";
|
|
@@ -5939,8 +5939,8 @@ const checkDeadCode = async (options) => {
|
|
|
5939
5939
|
plugin: DEAD_CODE_PLUGIN,
|
|
5940
5940
|
rule: unusedDependency.isDevDependency ? "unused-dev-dependency" : "unused-dependency",
|
|
5941
5941
|
severity: "warning",
|
|
5942
|
-
message: `Unused ${label}: \`${unusedDependency.name}
|
|
5943
|
-
help:
|
|
5942
|
+
message: `Unused ${label}: \`${unusedDependency.name}\``,
|
|
5943
|
+
help: `An unused ${label} adds install time and supply-chain surface without being used; remove it from package.json if it is genuinely unused.`,
|
|
5944
5944
|
line: 0,
|
|
5945
5945
|
column: 0,
|
|
5946
5946
|
category: DEAD_CODE_CATEGORY
|
|
@@ -8990,4 +8990,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
8990
8990
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
8991
8991
|
|
|
8992
8992
|
//# sourceMappingURL=index.js.map
|
|
8993
|
-
//# debugId=
|
|
8993
|
+
//# debugId=e1b6f028-4e9b-5414-b7ff-8f9f22286152
|
package/dist/lsp.js
CHANGED
|
@@ -5899,8 +5899,8 @@ const checkDeadCode = async (options) => {
|
|
|
5899
5899
|
plugin: DEAD_CODE_PLUGIN,
|
|
5900
5900
|
rule: unusedDependency.isDevDependency ? "unused-dev-dependency" : "unused-dependency",
|
|
5901
5901
|
severity: "warning",
|
|
5902
|
-
message: `Unused ${label}: \`${unusedDependency.name}
|
|
5903
|
-
help:
|
|
5902
|
+
message: `Unused ${label}: \`${unusedDependency.name}\``,
|
|
5903
|
+
help: `An unused ${label} adds install time and supply-chain surface without being used; remove it from package.json if it is genuinely unused.`,
|
|
5904
5904
|
line: 0,
|
|
5905
5905
|
column: 0,
|
|
5906
5906
|
category: DEAD_CODE_CATEGORY
|
|
@@ -10850,5 +10850,5 @@ const startLanguageServer = () => {
|
|
|
10850
10850
|
};
|
|
10851
10851
|
//#endregion
|
|
10852
10852
|
export { startLanguageServer };
|
|
10853
|
-
!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]="
|
|
10854
|
-
//# debugId=
|
|
10853
|
+
!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]="7b21caf8-7f02-589b-9cd6-fdf1f4de24ba")}catch(e){}}();
|
|
10854
|
+
//# debugId=7b21caf8-7f02-589b-9cd6-fdf1f4de24ba
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.4.2-dev.
|
|
3
|
+
"version": "0.4.2-dev.5b06a86",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vscode-languageserver": "^9.0.1",
|
|
67
67
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
68
68
|
"vscode-uri": "^3.1.0",
|
|
69
|
-
"oxlint-plugin-react-doctor": "0.4.2-dev.
|
|
69
|
+
"oxlint-plugin-react-doctor": "0.4.2-dev.5b06a86"
|
|
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.4.2",
|
|
78
77
|
"@react-doctor/core": "0.4.2",
|
|
79
|
-
"@react-doctor/language-server": "0.4.2"
|
|
78
|
+
"@react-doctor/language-server": "0.4.2",
|
|
79
|
+
"@react-doctor/api": "0.4.2"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": "^20.19.0 || >=22.12.0"
|