@theholocron/cli 5.0.0-alpha.30 → 5.0.0-alpha.32
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.mjs +19 -2
- package/dist/cli.mjs.map +1 -1
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -5348,13 +5348,20 @@ async function runSetup(input) {
|
|
|
5348
5348
|
await source.writeRepoFile("turbo.json", content);
|
|
5349
5349
|
}));
|
|
5350
5350
|
print(formatStep(steps[steps.length - 1]));
|
|
5351
|
-
const
|
|
5351
|
+
const rootPkgRaw = await readFile(join(input.context.repoRoot, "package.json"), "utf8").catch(() => null);
|
|
5352
|
+
const rootPkg = rootPkgRaw ? JSON.parse(rootPkgRaw) : null;
|
|
5352
5353
|
const workspaceYaml = await readFile(join(input.context.repoRoot, "pnpm-workspace.yaml"), "utf8").catch(() => "");
|
|
5353
5354
|
const rootScripts = Object.keys(rootPkg?.scripts ?? {});
|
|
5354
5355
|
const workspaceFix = astromechTurbo.ensureRootWorkspaceMember(workspaceYaml, rootScripts);
|
|
5355
5356
|
if (workspaceFix.changed) steps.push(await runStep("source", "fix pnpm-workspace.yaml (root workspace member, #692)", dryRun, async () => {
|
|
5356
5357
|
await source.writeRepoFile("pnpm-workspace.yaml", workspaceFix.content);
|
|
5357
5358
|
}));
|
|
5359
|
+
if (rootPkgRaw) {
|
|
5360
|
+
const depFix = astromechTurbo.ensureTurboDependency(rootPkgRaw, workspaceFix.content);
|
|
5361
|
+
if (depFix.changed) steps.push(await runStep("source", "add turbo devDependency", dryRun, async () => {
|
|
5362
|
+
await source.writeRepoFile("package.json", depFix.content);
|
|
5363
|
+
}));
|
|
5364
|
+
}
|
|
5358
5365
|
}
|
|
5359
5366
|
print(formatStep(steps[steps.length - 1]));
|
|
5360
5367
|
}
|
|
@@ -6607,7 +6614,8 @@ async function runSync(input) {
|
|
|
6607
6614
|
await writeFile(join(input.context.repoRoot, "turbo.json"), content, "utf8");
|
|
6608
6615
|
}));
|
|
6609
6616
|
print(formatSyncStep(steps[steps.length - 1]));
|
|
6610
|
-
const
|
|
6617
|
+
const rootPkgRaw = await readFile(join(input.context.repoRoot, "package.json"), "utf8").catch(() => null);
|
|
6618
|
+
const rootPkg = rootPkgRaw ? JSON.parse(rootPkgRaw) : null;
|
|
6611
6619
|
const workspaceYaml = await readFile(join(input.context.repoRoot, "pnpm-workspace.yaml"), "utf8").catch(() => "");
|
|
6612
6620
|
const rootScripts = Object.keys(rootPkg?.scripts ?? {});
|
|
6613
6621
|
const workspaceFix = astromechTurbo.ensureRootWorkspaceMember(workspaceYaml, rootScripts);
|
|
@@ -6617,6 +6625,15 @@ async function runSync(input) {
|
|
|
6617
6625
|
}));
|
|
6618
6626
|
print(formatSyncStep(steps[steps.length - 1]));
|
|
6619
6627
|
}
|
|
6628
|
+
if (rootPkgRaw) {
|
|
6629
|
+
const depFix = astromechTurbo.ensureTurboDependency(rootPkgRaw, workspaceFix.content);
|
|
6630
|
+
if (depFix.changed) {
|
|
6631
|
+
steps.push(await runSyncStep("local", "add turbo devDependency", dryRun, async () => {
|
|
6632
|
+
await writeFile(join(input.context.repoRoot, "package.json"), depFix.content, "utf8");
|
|
6633
|
+
}));
|
|
6634
|
+
print(formatSyncStep(steps[steps.length - 1]));
|
|
6635
|
+
}
|
|
6636
|
+
}
|
|
6620
6637
|
}
|
|
6621
6638
|
}
|
|
6622
6639
|
if (stepName === "wiki") {
|