react-doctor 0.2.12-dev.d40a933 → 0.2.12-dev.e8bc8b9
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 +12 -2
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -6674,7 +6674,7 @@ const resolveOxlintNodeEffect = (isLintEnabled, isQuiet) => Effect.gen(function*
|
|
|
6674
6674
|
const resolveOxlintNode = (isLintEnabled, isQuiet) => Effect.runPromise(resolveOxlintNodeEffect(isLintEnabled, isQuiet).pipe(Effect.provide(NodeResolver.layerNode)));
|
|
6675
6675
|
//#endregion
|
|
6676
6676
|
//#region src/cli/utils/version.ts
|
|
6677
|
-
const VERSION = "0.2.12-dev.
|
|
6677
|
+
const VERSION = "0.2.12-dev.e8bc8b9";
|
|
6678
6678
|
//#endregion
|
|
6679
6679
|
//#region src/inspect.ts
|
|
6680
6680
|
const silentConsole = makeNoopConsole();
|
|
@@ -8802,6 +8802,7 @@ const defaultInstallDependencyRunner = (input) => {
|
|
|
8802
8802
|
shell: process.platform === "win32"
|
|
8803
8803
|
});
|
|
8804
8804
|
};
|
|
8805
|
+
const formatInstallCommand = (input) => [input.command, ...input.args].join(" ");
|
|
8805
8806
|
const installReactDoctorDependency = async (options) => {
|
|
8806
8807
|
const packageJson = readPackageJson(options.projectRoot);
|
|
8807
8808
|
if (!isRecord(packageJson)) return {
|
|
@@ -8814,7 +8815,15 @@ const installReactDoctorDependency = async (options) => {
|
|
|
8814
8815
|
dependencyReason: "invalid-dev-dependencies"
|
|
8815
8816
|
};
|
|
8816
8817
|
const runnerInput = buildInstallCommand(options.projectRoot);
|
|
8817
|
-
|
|
8818
|
+
try {
|
|
8819
|
+
await (options.runner ?? defaultInstallDependencyRunner)(runnerInput);
|
|
8820
|
+
} catch {
|
|
8821
|
+
return {
|
|
8822
|
+
dependencyStatus: "skipped",
|
|
8823
|
+
dependencyReason: "install-command-failed",
|
|
8824
|
+
installCommand: formatInstallCommand(runnerInput)
|
|
8825
|
+
};
|
|
8826
|
+
}
|
|
8818
8827
|
return { dependencyStatus: "created" };
|
|
8819
8828
|
};
|
|
8820
8829
|
const buildManualGitHookTarget = (hookPath, projectRoot) => ({
|
|
@@ -8841,6 +8850,7 @@ const formatDependencyInstallMessage = (result) => {
|
|
|
8841
8850
|
if (result.dependencyStatus === "created") return "Installed dev dependency: react-doctor.";
|
|
8842
8851
|
if (result.dependencyStatus === "existing") return "React Doctor dependency already exists.";
|
|
8843
8852
|
if (result.dependencyReason === "invalid-dev-dependencies") return "Skipped dev dependency install: devDependencies field is not an object.";
|
|
8853
|
+
if (result.dependencyReason === "install-command-failed") return `Skipped dev dependency install: package manager command failed. Run manually: ${result.installCommand ?? `npm install --save-dev react-doctor@latest`}`;
|
|
8844
8854
|
return "Skipped dev dependency install: package.json missing or invalid.";
|
|
8845
8855
|
};
|
|
8846
8856
|
const installReactDoctorPackageSetup = async (projectRoot, dependencyRunner) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.2.12-dev.
|
|
3
|
+
"version": "0.2.12-dev.e8bc8b9",
|
|
4
4
|
"description": "Diagnose and fix React codebases for security, performance, correctness, accessibility, bundle-size, and architecture issues",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"oxlint": "^1.66.0",
|
|
59
59
|
"prompts": "^2.4.2",
|
|
60
60
|
"typescript": ">=5.0.4 <7",
|
|
61
|
-
"oxlint-plugin-react-doctor": "0.2.12-dev.
|
|
61
|
+
"oxlint-plugin-react-doctor": "0.2.12-dev.e8bc8b9"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@types/prompts": "^2.4.9",
|
|
65
65
|
"commander": "^14.0.3",
|
|
66
66
|
"ora": "^9.4.0",
|
|
67
|
-
"@react-doctor/
|
|
68
|
-
"@react-doctor/
|
|
67
|
+
"@react-doctor/api": "0.2.12",
|
|
68
|
+
"@react-doctor/core": "0.2.12"
|
|
69
69
|
},
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": "^20.19.0 || >=22.12.0"
|