react-doctor 0.9.2-dev.b31fd85 → 0.9.2-dev.bf470d5
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/README.md +2 -2
- package/dist/cli.js +1007 -222
- package/dist/index.d.ts +9 -3
- package/dist/index.js +718 -123
- package/dist/lsp.js +699 -118
- package/dist/{run-scan-app-C9MJnVwv.js → run-scan-app-DHRvqfkX.js} +11 -10
- package/package.json +5 -4
|
@@ -1,6 +1,6 @@
|
|
|
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]="
|
|
3
|
-
import { A as toForwardSlashes, B as getCategoryImpact, C as buildRulePriorityMap, D as resolveBlockingLevel, E as formatLearnMoreLine, F as TUI_REPORT_DETAIL_WIDTH_FRACTION, G as runPromise, H as mapWithConcurrency, I as isCiEnvironment, J as succeed, K as sync, L as DIAGNOSTIC_CATEGORY_BUCKETS, M as isUnicodeSupported, N as METRIC, O as isReactDoctorWorkflowInstalled, P as TUI_REPORT_COMPACT_MAX_ROWS, R as Progress, S as hasLintHardFailure, T as formatFixRecipeLine, U as mergeReactDoctorConfigs, V as highlighter, W as resolveScanTarget, _ as canAnimateOnboarding, a as resolveCliInspectOptions, b as buildCodeFrame, c as detectLaunchableAgents, d as launchCliAgent, f as isShareOptedOut, g as doctorFace, h as easeOutCubic, i as selectProjects, j as findNearestPackageDirectory, k as recordCount, l as CLI_AGENT_BINARIES, m as printFooter, n as shouldFailScanGate, o as countUniqueScannedFiles, p as
|
|
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]="898bdb3e-afed-5fca-92a2-f14d1e8ca6fb")}catch(e){}}();
|
|
3
|
+
import { A as toForwardSlashes, B as getCategoryImpact, C as buildRulePriorityMap, D as resolveBlockingLevel, E as formatLearnMoreLine, F as TUI_REPORT_DETAIL_WIDTH_FRACTION, G as runPromise, H as mapWithConcurrency, I as isCiEnvironment, J as succeed, K as sync, L as DIAGNOSTIC_CATEGORY_BUCKETS, M as isUnicodeSupported, N as METRIC, O as isReactDoctorWorkflowInstalled, P as TUI_REPORT_COMPACT_MAX_ROWS, R as Progress, S as hasLintHardFailure, T as formatFixRecipeLine, U as mergeReactDoctorConfigs, V as highlighter, W as resolveScanTarget, _ as canAnimateOnboarding, a as resolveCliInspectOptions, b as buildCodeFrame, c as detectLaunchableAgents, d as launchCliAgent, f as isShareOptedOut, g as doctorFace, h as easeOutCubic, i as selectProjects, j as findNearestPackageDirectory, k as recordCount, l as CLI_AGENT_BINARIES, m as printFooter, n as shouldFailScanGate, o as countUniqueScannedFiles, p as createInvocationInspect, q as void_, r as discoverWorkspacePackages, s as setUpGitHubActions, t as exitGracefully, u as copyToClipboard, v as computeProjectedScore, w as buildSortedRuleGroups, x as buildNoScoreMessage, y as formatElapsedTime, z as Reporter } from "./cli.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { performance } from "node:perf_hooks";
|
|
6
6
|
import { getSkillAgentConfig } from "agent-install";
|
|
@@ -1610,11 +1610,11 @@ const runMountedScan = async (rootDirectory, presentation, blockingLevel, execut
|
|
|
1610
1610
|
throw error;
|
|
1611
1611
|
}
|
|
1612
1612
|
};
|
|
1613
|
-
const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, blockingLevel) => {
|
|
1613
|
+
const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, blockingLevel, inspectProject) => {
|
|
1614
1614
|
const projectScan = await resolveProjectScan(rootScanTarget, projectDirectory);
|
|
1615
1615
|
const presentation = resolveScanPresentation(input, [projectScan]);
|
|
1616
1616
|
return runMountedScan(projectScan.directory, presentation, blockingLevel, async (context) => {
|
|
1617
|
-
const result = await
|
|
1617
|
+
const result = await inspectProject(projectScan.directory, {
|
|
1618
1618
|
...resolveTuiInspectOptions(input, projectScan.config),
|
|
1619
1619
|
isCi: isCiEnvironment(),
|
|
1620
1620
|
configOverride: projectScan.config,
|
|
@@ -1645,7 +1645,7 @@ const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, blo
|
|
|
1645
1645
|
};
|
|
1646
1646
|
});
|
|
1647
1647
|
};
|
|
1648
|
-
const runMultiProjectScan = async (rootScanTarget, directories, input, blockingLevel) => {
|
|
1648
|
+
const runMultiProjectScan = async (rootScanTarget, directories, input, blockingLevel, inspectProject) => {
|
|
1649
1649
|
const rootDirectory = rootScanTarget.resolvedDirectory;
|
|
1650
1650
|
const projectScans = await mapWithConcurrency([...directories], 4, (projectDirectory) => resolveProjectScan(rootScanTarget, projectDirectory));
|
|
1651
1651
|
return runMountedScan(rootDirectory, resolveScanPresentation(input, projectScans), blockingLevel, async (context) => {
|
|
@@ -1653,7 +1653,7 @@ const runMultiProjectScan = async (rootScanTarget, directories, input, blockingL
|
|
|
1653
1653
|
let finishedCount = 0;
|
|
1654
1654
|
context.store.setProgress(`Scanning ${directories.length} projects…`);
|
|
1655
1655
|
const results = await mapWithConcurrency(projectScans, 4, async (projectScan) => {
|
|
1656
|
-
const result = await
|
|
1656
|
+
const result = await inspectProject(projectScan.directory, {
|
|
1657
1657
|
...resolveTuiInspectOptions(input, projectScan.config),
|
|
1658
1658
|
isCi: isCiEnvironment(),
|
|
1659
1659
|
configOverride: projectScan.config,
|
|
@@ -1720,13 +1720,14 @@ const runScanApp = async (input) => {
|
|
|
1720
1720
|
share: input.share ?? scanTarget.userConfig?.share ?? true
|
|
1721
1721
|
};
|
|
1722
1722
|
const selectedDirectories = await resolveSelectedDirectories(rootDirectory, resolvedInput);
|
|
1723
|
+
const inspectProject = createInvocationInspect(input.options?.concurrency);
|
|
1723
1724
|
const blockingLevel = resolveBlockingLevel({ blocking: resolvedInput.blocking }, scanTarget.userConfig);
|
|
1724
1725
|
if (selectedDirectories.length === 0) return { shouldFail: false };
|
|
1725
|
-
if (selectedDirectories.length === 1) return runSingleProjectScan(scanTarget, selectedDirectories[0], resolvedInput, blockingLevel);
|
|
1726
|
-
return runMultiProjectScan(scanTarget, selectedDirectories, resolvedInput, blockingLevel);
|
|
1726
|
+
if (selectedDirectories.length === 1) return runSingleProjectScan(scanTarget, selectedDirectories[0], resolvedInput, blockingLevel, inspectProject);
|
|
1727
|
+
return runMultiProjectScan(scanTarget, selectedDirectories, resolvedInput, blockingLevel, inspectProject);
|
|
1727
1728
|
};
|
|
1728
1729
|
//#endregion
|
|
1729
1730
|
export { runScanApp };
|
|
1730
1731
|
|
|
1731
|
-
//# sourceMappingURL=run-scan-app-
|
|
1732
|
-
//# debugId=
|
|
1732
|
+
//# sourceMappingURL=run-scan-app-DHRvqfkX.js.map
|
|
1733
|
+
//# debugId=898bdb3e-afed-5fca-92a2-f14d1e8ca6fb
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.9.2-dev.
|
|
3
|
+
"version": "0.9.2-dev.bf470d5",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
+
"@astrojs/compiler": "^4.0.0",
|
|
53
54
|
"@babel/code-frame": "^7.29.0",
|
|
54
55
|
"@sentry/node": "^10.54.0",
|
|
55
56
|
"agent-install": "0.0.5",
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
"jiti": "^2.7.0",
|
|
63
64
|
"magicast": "^0.5.3",
|
|
64
65
|
"oxc-resolver": "^11.24.2",
|
|
65
|
-
"oxlint": ">=1.
|
|
66
|
+
"oxlint": ">=1.76.0 <1.77.0",
|
|
66
67
|
"prompts": "^2.4.2",
|
|
67
68
|
"react": "19.2.5",
|
|
68
69
|
"typescript": ">=5.0.4 <6",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"vscode-uri": "^3.1.0",
|
|
72
73
|
"yaml": "^2.9.0",
|
|
73
74
|
"deslop-js": "0.9.2",
|
|
74
|
-
"oxlint-plugin-react-doctor": "0.9.2-dev.
|
|
75
|
+
"oxlint-plugin-react-doctor": "0.9.2-dev.bf470d5"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
77
78
|
"@types/babel__code-frame": "^7.27.0",
|
|
@@ -81,8 +82,8 @@
|
|
|
81
82
|
"commander": "^14.0.3",
|
|
82
83
|
"ink-testing-library": "^4.0.0",
|
|
83
84
|
"ora": "^9.4.0",
|
|
84
|
-
"@react-doctor/core": "0.9.2",
|
|
85
85
|
"@react-doctor/api": "0.9.2",
|
|
86
|
+
"@react-doctor/core": "0.9.2",
|
|
86
87
|
"@react-doctor/language-server": "0.9.2"
|
|
87
88
|
},
|
|
88
89
|
"engines": {
|