react-doctor 0.2.12-dev.9d20182 → 0.2.12-dev.d40a933
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 +9 -19
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -6578,11 +6578,6 @@ const shouldSelectAllChoices = (choiceStates) => {
|
|
|
6578
6578
|
return choiceStates.filter((choiceState) => !choiceState.disabled).some((choiceState) => choiceState.selected !== true);
|
|
6579
6579
|
};
|
|
6580
6580
|
//#endregion
|
|
6581
|
-
//#region src/cli/utils/unref-stdin.ts
|
|
6582
|
-
const unrefStdin = () => {
|
|
6583
|
-
process.stdin.unref?.();
|
|
6584
|
-
};
|
|
6585
|
-
//#endregion
|
|
6586
6581
|
//#region src/cli/utils/prompts.ts
|
|
6587
6582
|
const require$1 = createRequire(import.meta.url);
|
|
6588
6583
|
const PROMPTS_MULTISELECT_MODULE_PATH = "prompts/lib/elements/multiselect";
|
|
@@ -6625,7 +6620,7 @@ const patchMultiselectSubmit = () => {
|
|
|
6625
6620
|
const prompts = (questions, options = {}) => {
|
|
6626
6621
|
patchMultiselectToggleAll();
|
|
6627
6622
|
patchMultiselectSubmit();
|
|
6628
|
-
return basePrompts(questions, { onCancel: options.onCancel ?? onCancel })
|
|
6623
|
+
return basePrompts(questions, { onCancel: options.onCancel ?? onCancel });
|
|
6629
6624
|
};
|
|
6630
6625
|
//#endregion
|
|
6631
6626
|
//#region src/cli/utils/resolve-oxlint-node.ts
|
|
@@ -6679,7 +6674,7 @@ const resolveOxlintNodeEffect = (isLintEnabled, isQuiet) => Effect.gen(function*
|
|
|
6679
6674
|
const resolveOxlintNode = (isLintEnabled, isQuiet) => Effect.runPromise(resolveOxlintNodeEffect(isLintEnabled, isQuiet).pipe(Effect.provide(NodeResolver.layerNode)));
|
|
6680
6675
|
//#endregion
|
|
6681
6676
|
//#region src/cli/utils/version.ts
|
|
6682
|
-
const VERSION = "0.2.12-dev.
|
|
6677
|
+
const VERSION = "0.2.12-dev.d40a933";
|
|
6683
6678
|
//#endregion
|
|
6684
6679
|
//#region src/inspect.ts
|
|
6685
6680
|
const silentConsole = makeNoopConsole();
|
|
@@ -7472,7 +7467,7 @@ const defaultWait = (milliseconds) => new Promise((resolve) => {
|
|
|
7472
7467
|
setTimeout(resolve, milliseconds);
|
|
7473
7468
|
});
|
|
7474
7469
|
const defaultSelect = async (message) => {
|
|
7475
|
-
const { setupReactDoctorChoice } = await
|
|
7470
|
+
const { setupReactDoctorChoice } = await basePrompts({
|
|
7476
7471
|
type: "select",
|
|
7477
7472
|
name: "setupReactDoctorChoice",
|
|
7478
7473
|
message,
|
|
@@ -8807,7 +8802,6 @@ const defaultInstallDependencyRunner = (input) => {
|
|
|
8807
8802
|
shell: process.platform === "win32"
|
|
8808
8803
|
});
|
|
8809
8804
|
};
|
|
8810
|
-
const formatInstallCommand = (input) => [input.command, ...input.args].join(" ");
|
|
8811
8805
|
const installReactDoctorDependency = async (options) => {
|
|
8812
8806
|
const packageJson = readPackageJson(options.projectRoot);
|
|
8813
8807
|
if (!isRecord(packageJson)) return {
|
|
@@ -8820,15 +8814,7 @@ const installReactDoctorDependency = async (options) => {
|
|
|
8820
8814
|
dependencyReason: "invalid-dev-dependencies"
|
|
8821
8815
|
};
|
|
8822
8816
|
const runnerInput = buildInstallCommand(options.projectRoot);
|
|
8823
|
-
|
|
8824
|
-
await (options.runner ?? defaultInstallDependencyRunner)(runnerInput);
|
|
8825
|
-
} catch {
|
|
8826
|
-
return {
|
|
8827
|
-
dependencyStatus: "skipped",
|
|
8828
|
-
dependencyReason: "install-command-failed",
|
|
8829
|
-
installCommand: formatInstallCommand(runnerInput)
|
|
8830
|
-
};
|
|
8831
|
-
}
|
|
8817
|
+
await (options.runner ?? defaultInstallDependencyRunner)(runnerInput);
|
|
8832
8818
|
return { dependencyStatus: "created" };
|
|
8833
8819
|
};
|
|
8834
8820
|
const buildManualGitHookTarget = (hookPath, projectRoot) => ({
|
|
@@ -8855,7 +8841,6 @@ const formatDependencyInstallMessage = (result) => {
|
|
|
8855
8841
|
if (result.dependencyStatus === "created") return "Installed dev dependency: react-doctor.";
|
|
8856
8842
|
if (result.dependencyStatus === "existing") return "React Doctor dependency already exists.";
|
|
8857
8843
|
if (result.dependencyReason === "invalid-dev-dependencies") return "Skipped dev dependency install: devDependencies field is not an object.";
|
|
8858
|
-
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`}`;
|
|
8859
8844
|
return "Skipped dev dependency install: package.json missing or invalid.";
|
|
8860
8845
|
};
|
|
8861
8846
|
const installReactDoctorPackageSetup = async (projectRoot, dependencyRunner) => {
|
|
@@ -9201,6 +9186,11 @@ const stripUnknownCliFlags = (argv) => {
|
|
|
9201
9186
|
];
|
|
9202
9187
|
};
|
|
9203
9188
|
//#endregion
|
|
9189
|
+
//#region src/cli/utils/unref-stdin.ts
|
|
9190
|
+
const unrefStdin = () => {
|
|
9191
|
+
process.stdin.unref?.();
|
|
9192
|
+
};
|
|
9193
|
+
//#endregion
|
|
9204
9194
|
//#region src/cli/index.ts
|
|
9205
9195
|
process.on("SIGINT", exitGracefully);
|
|
9206
9196
|
process.on("SIGTERM", exitGracefully);
|
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.d40a933",
|
|
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.d40a933"
|
|
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/core": "0.2.12",
|
|
68
|
+
"@react-doctor/api": "0.2.12"
|
|
69
69
|
},
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": "^20.19.0 || >=22.12.0"
|