@theholocron/cli 5.0.0-alpha.76 → 5.0.0-alpha.78
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 +20 -0
- package/dist/cli.mjs +6 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +15 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -192,6 +192,26 @@ lockfile — no coverable change) passes instead of hanging on a `codecov/*`
|
|
|
192
192
|
required check that never posts. A re-run of `holocron setup` backfills both into
|
|
193
193
|
an existing repo.
|
|
194
194
|
|
|
195
|
+
### Default branch (`repo.defaultBranch`)
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
export default defineConfig({
|
|
199
|
+
repo: { protection: "strict", defaultBranch: "alpha" },
|
|
200
|
+
providers: { source: "github" },
|
|
201
|
+
});
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
`holocron setup` syncs GitHub's repo-level default branch (`HEAD`) — what a
|
|
205
|
+
fresh clone checks out, what `gh pr create`/the compare UI target by default,
|
|
206
|
+
and what Sentinel's `validateConfig()` reads (it only ever reads config from
|
|
207
|
+
the repo's default branch, never a PR ref — a deliberate security boundary).
|
|
208
|
+
Omit this field to leave GitHub's current setting untouched; most repos never
|
|
209
|
+
need it. It exists for a repo using a `main`/`alpha` prerelease-channel split
|
|
210
|
+
where active development happens on a non-`main` branch: set this to that
|
|
211
|
+
branch so Sentinel validates against what's actually being developed, then
|
|
212
|
+
change it back once that branch merges to `main` for a stable cut and stops
|
|
213
|
+
being the active branch.
|
|
214
|
+
|
|
195
215
|
### Git hooks
|
|
196
216
|
|
|
197
217
|
```ts
|
package/dist/cli.mjs
CHANGED
|
@@ -5194,7 +5194,10 @@ async function runSetup(input) {
|
|
|
5194
5194
|
print(formatStep(steps[steps.length - 1]));
|
|
5195
5195
|
if (effectivePreset && effectivePreset !== "none") {
|
|
5196
5196
|
steps.push(await runStep("source", "updateRepoSettings", dryRun, async () => {
|
|
5197
|
-
await source.updateRepoSettings(
|
|
5197
|
+
await source.updateRepoSettings({
|
|
5198
|
+
...BALANCED_REPO_SETTINGS,
|
|
5199
|
+
...repo?.defaultBranch ? { default_branch: repo.defaultBranch } : {}
|
|
5200
|
+
});
|
|
5198
5201
|
}));
|
|
5199
5202
|
print(formatStep(steps[steps.length - 1]));
|
|
5200
5203
|
const tasksConfig = { tasks: config.tasks };
|
|
@@ -5378,7 +5381,7 @@ async function runSetup(input) {
|
|
|
5378
5381
|
const rootPkgRaw = await readFile(join(input.context.repoRoot, "package.json"), "utf8").catch(() => null);
|
|
5379
5382
|
const rootPkg = rootPkgRaw ? JSON.parse(rootPkgRaw) : null;
|
|
5380
5383
|
const workspaceYaml = await readFile(join(input.context.repoRoot, "pnpm-workspace.yaml"), "utf8").catch(() => "");
|
|
5381
|
-
const rootScripts =
|
|
5384
|
+
const rootScripts = rootPkg?.scripts ?? {};
|
|
5382
5385
|
const workspaceFix = astromechTurbo.ensureRootWorkspaceMember(workspaceYaml, rootScripts);
|
|
5383
5386
|
if (workspaceFix.changed) steps.push(await runStep("source", "fix pnpm-workspace.yaml (root workspace member, #692)", dryRun, async () => {
|
|
5384
5387
|
await source.writeRepoFile("pnpm-workspace.yaml", workspaceFix.content);
|
|
@@ -6657,7 +6660,7 @@ async function runSync(input) {
|
|
|
6657
6660
|
const rootPkgRaw = await readFile(join(input.context.repoRoot, "package.json"), "utf8").catch(() => null);
|
|
6658
6661
|
const rootPkg = rootPkgRaw ? JSON.parse(rootPkgRaw) : null;
|
|
6659
6662
|
const workspaceYaml = await readFile(join(input.context.repoRoot, "pnpm-workspace.yaml"), "utf8").catch(() => "");
|
|
6660
|
-
const rootScripts =
|
|
6663
|
+
const rootScripts = rootPkg?.scripts ?? {};
|
|
6661
6664
|
const workspaceFix = astromechTurbo.ensureRootWorkspaceMember(workspaceYaml, rootScripts);
|
|
6662
6665
|
if (workspaceFix.changed) {
|
|
6663
6666
|
steps.push(await runSyncStep("local", "fix pnpm-workspace.yaml (root workspace member, #692)", dryRun, async () => {
|