@inixiative/config 0.5.81 → 0.5.82

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 CHANGED
@@ -85,7 +85,7 @@ Lanes stand alone. A lane with a package missing a checkout, or claimed by ambig
85
85
  Blessing is two-phase, so a dependent that needs work never deadlocks a release:
86
86
 
87
87
  1. **Candidate.** A published version is recorded under `candidates`, and the config release that ends the train carries it, so `check` in any repo's CI accepts it from then on.
88
- 2. **Adopt.** A repo (lane checkout or consumer) whose check fails against the candidates it was moved onto doesn't stop the train. Its checkout is put back as it was, and the train opens `train/adopt-<pkg>-<version>` in a worktree (with the repo's root `.env*` files copied in): the same bump and re-lock, then the repo's `train:adopt` script if its package.json declares one (Foundry's re-records cassettes with `bun run test:live`), all committed, and re-locked onto the new config release so the PR's CI judges it against the candidates. A lane checkout that adopts publishes nothing this run. A consumer that passes against candidates gets the same branch name: its default branch is still on the previous versions until the branch merges. If the adoption's commit is refused (its hooks typecheck), the branch is deleted and the summary says to adopt by hand.
88
+ 2. **Adopt.** A repo (lane checkout or consumer) whose check fails against the candidates it was moved onto doesn't stop the train. Its checkout is put back as it was, and the train opens `train/adopt-<pkg>-<version>` in a worktree (with the repo's ignored `.env*` files copied in, at any depth): the same bump and re-lock, then the repo's `train:adopt` script if its package.json declares one (Foundry's re-records cassettes with `bun run test:live`), all committed, and re-locked onto the new config release so the PR's CI judges it against the candidates. A lane checkout that adopts publishes nothing this run. A consumer that passes against candidates gets the same branch name: its default branch is still on the previous versions until the branch merges. If the adoption's commit is refused (its hooks typecheck), the branch is deleted and the summary says to adopt by hand.
89
89
  3. **Promote.** At the end of each run a candidate is blessed (moved into its lane's section) unless something holds it: its lane stopped; a repo has an adoption branch for it that is not yet on its default branch (opened this run, unmerged, or committed but never pushed); or a repo that declares it was not walked to an outcome this run — another lane's checkout, a skipped or failed one, a consumer without a checkout. A later train finds a waiting adoption branch and opens nothing new; once it merges, the repo is on the candidate and the train promotes it. A candidate every dependent already accepts is blessed in the run that published it. An adoption PR closed without merging holds its candidates until its branch is deleted.
90
90
 
91
91
  The summary lists what was blessed, every candidate with what holds it, and each pending adoption branch with its PR when `gh` can find one.
package/dist/cli.js CHANGED
@@ -2,7 +2,15 @@
2
2
 
3
3
  // src/cli.ts
4
4
  import { spawnSync as spawnSync2 } from "child_process";
5
- import { existsSync as existsSync2, mkdtempSync, readdirSync as readdirSync2, readFileSync as readFileSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
5
+ import {
6
+ existsSync as existsSync2,
7
+ mkdirSync as mkdirSync2,
8
+ mkdtempSync,
9
+ readdirSync as readdirSync2,
10
+ readFileSync as readFileSync2,
11
+ rmSync as rmSync2,
12
+ writeFileSync as writeFileSync2
13
+ } from "fs";
6
14
  import { hostname as hostname2, tmpdir } from "os";
7
15
  import { basename, dirname as dirname2, join as join2, resolve as resolve2 } from "path";
8
16
 
@@ -1337,7 +1345,8 @@ if (command === "train") {
1337
1345
  };
1338
1346
  };
1339
1347
  const relockAndCheck = (checkout, check = true) => effect(`re-lock ${checkout.name}${check ? " and run its check" : ""}`, void 0, () => {
1340
- if (spawnSync2("bun", ["install"], { cwd: checkout.dir, stdio: "inherit" }).status !== 0) {
1348
+ const install = (...flags) => spawnSync2("bun", ["install", ...flags], { cwd: checkout.dir, stdio: "inherit" }).status === 0;
1349
+ if (!install() && !install("--no-cache")) {
1341
1350
  throw new Abort(`bun install failed in ${checkout.name}`);
1342
1351
  }
1343
1352
  for (const { cwd, names } of staleUpdates(
@@ -1389,10 +1398,21 @@ if (command === "train") {
1389
1398
  throw new Abort(`could not create ${branch} in ${checkout.name}`);
1390
1399
  }
1391
1400
  worktrees.push({ repo: checkout.dir, path });
1392
- for (const name of readdirSync2(checkout.dir)) {
1393
- if (/^\.env(\..+)?$/.test(name) && !existsSync2(join2(path, name))) {
1394
- writeFileSync2(join2(path, name), readFileSync2(join2(checkout.dir, name)));
1395
- }
1401
+ const envFiles = git(
1402
+ checkout.dir,
1403
+ "ls-files",
1404
+ "--others",
1405
+ "--ignored",
1406
+ "--exclude-standard",
1407
+ "--",
1408
+ ":(glob)**/.env*"
1409
+ ).stdout.split("\n").filter(
1410
+ (file) => /(^|\/)\.env[^/]*$/.test(file) && !/(^|\/)(node_modules|\.worktrees)\//.test(file)
1411
+ );
1412
+ for (const file of envFiles) {
1413
+ if (existsSync2(join2(path, file))) continue;
1414
+ mkdirSync2(dirname2(join2(path, file)), { recursive: true });
1415
+ writeFileSync2(join2(path, file), readFileSync2(join2(checkout.dir, file)));
1396
1416
  }
1397
1417
  return { ...checkout, dir: path };
1398
1418
  };
@@ -1425,6 +1445,7 @@ if (command === "train") {
1425
1445
  relockAndCheck(branchCheckout, false);
1426
1446
  const message = moving.length > 0 ? `chore: adopt ${moving.map((name) => `${name}@${manifest.candidates?.[name]}`).join(", ")}` : void 0;
1427
1447
  if (!commitOwned(branchCheckout, packagePaths, true, message)) {
1448
+ console.log(`\u2713 nothing to commit for ${checkout.name} after its re-lock`);
1428
1449
  dropBranch(checkout, branch);
1429
1450
  return false;
1430
1451
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inixiative/config",
3
- "version": "0.5.81",
3
+ "version": "0.5.82",
4
4
  "description": "Shared toolchain for the inixiative ecosystem: tsconfig/biome/tsup presets, a version manifest (BOM), and a sync/check CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/versions.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "@types/bun"
14
14
  ],
15
15
  "ecosystem": {
16
- "@inixiative/config": "0.5.81",
16
+ "@inixiative/config": "0.5.82",
17
17
  "@inixiative/json-rules": "3.5.4",
18
18
  "@inixiative/permissions": "0.4.0",
19
19
  "@inixiative/transitions": "0.5.0",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "agentic": {
26
26
  "@inixiative/signet": "0.4.0",
27
- "@inixiative/archive": "0.18.0",
27
+ "@inixiative/archive": "0.19.0",
28
28
  "@inixiative/agent-session": "0.6.3",
29
29
  "@inixiative/foundry-core": "0.5.1",
30
30
  "@inixiative/foundry": "0.5.3",
@@ -50,6 +50,6 @@
50
50
  }
51
51
  },
52
52
  "candidates": {
53
- "@inixiative/archive": "0.19.0"
53
+ "@inixiative/agent-session": "0.6.4"
54
54
  }
55
55
  }