@akanjs/devkit 3.1.0-rc.8 → 3.1.0-rc.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "3.1.0-rc.8",
3
+ "version": "3.1.0-rc.9",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -40,15 +40,15 @@
40
40
  "./*": "./*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@earendil-works/chord": "0.86.1",
44
- "@earendil-works/pi-agent-core": "0.86.1",
45
- "@earendil-works/pi-ai": "0.86.1",
46
- "@earendil-works/pi-coding-agent": "0.86.1",
47
- "@earendil-works/pi-telemetry": "0.86.1",
48
- "@earendil-works/pi-tui": "0.86.1",
43
+ "@earendil-works/pi-agent-core": "1.3.0",
44
+ "@earendil-works/pi-ai": "1.3.0",
45
+ "@earendil-works/pi-codemode": "1.3.0",
46
+ "@earendil-works/pi-coding-agent": "1.3.0",
47
+ "@earendil-works/pi-mcp": "1.3.0",
48
+ "@earendil-works/pi-tui": "1.3.0",
49
49
  "@inquirer/prompts": "^8.4.3",
50
50
  "@tailwindcss/node": "^4.3.0",
51
- "akanjs": "3.1.0-rc.8",
51
+ "akanjs": "3.1.0-rc.9",
52
52
  "chalk": "^5.6.2",
53
53
  "commander": "^14.0.3",
54
54
  "dayjs": "^1.11.20",
@@ -2,31 +2,24 @@ import { describe, expect, test } from "bun:test";
2
2
  import path from "node:path";
3
3
  import type { PackageJson } from "@akanjs/devkit/types";
4
4
 
5
- //? A published install reads neither pi's npm-shrinkwrap.json nor our overrides, so PackageRunner re-declares pi's
6
- //? sibling pins (a floating 0.80.x once broke every global install); this keeps them equal to the shrinkwrap.
5
+ //? PackageRunner re-declares pi's sibling pins because neither our `overrides` nor pi's own ranges reach a
6
+ //? consumer's install. The source of truth is pi's `dependencies`: since 1.3.0 it pins every sibling exactly, where
7
+ //? 0.86.1 floated `^0.86.1` and only the (now removed) `npm-shrinkwrap.json` held the resolved version.
7
8
 
8
9
  const repoRoot = path.resolve(import.meta.dir, "../../..");
9
10
  const piName = "@earendil-works/pi-coding-agent";
10
11
  const piDir = `${repoRoot}/node_modules/${piName}`;
11
12
  const publishedPackages = ["pkgs/@akanjs/devkit/package.json", "pkgs/@akanjs/cli/package.json"];
12
13
 
13
- interface Shrinkwrap {
14
- packages: Record<string, { version?: string }>;
15
- }
16
-
17
14
  const readJson = async <T>(file: string) => (await Bun.file(file).json()) as T;
18
15
 
19
- const shrinkwrappedPins = async () => {
20
- const { packages } = await readJson<Shrinkwrap>(`${piDir}/npm-shrinkwrap.json`);
21
- // Top-level entries only: a nested `node_modules/` key is another package's placement, not ours to pin.
22
- const entries = Object.entries(packages)
23
- .filter(([key]) => /^node_modules\/@earendil-works\/[^/]+$/.test(key))
24
- .map(([key, entry]) => [key.replace(/^node_modules\//, ""), entry.version ?? ""] as const);
25
- return Object.fromEntries(entries);
16
+ const siblingEntries = async () => {
17
+ const { dependencies = {} } = await readJson<PackageJson>(`${piDir}/package.json`);
18
+ return Object.entries(dependencies).filter(([name]) => /^@earendil-works\/[^/]+$/.test(name));
26
19
  };
27
20
 
28
21
  describe("pi dependency pins", () => {
29
- test("the shrinkwrap read here belongs to the coding agent we publish", async () => {
22
+ test("the package read here belongs to the coding agent we publish", async () => {
30
23
  const installed = await readJson<PackageJson>(`${piDir}/package.json`);
31
24
  for (const file of publishedPackages) {
32
25
  const { dependencies = {} } = await readJson<PackageJson>(`${repoRoot}/${file}`);
@@ -34,13 +27,19 @@ describe("pi dependency pins", () => {
34
27
  }
35
28
  });
36
29
 
37
- test("every sibling pi package is published at the version the coding agent shrinkwrapped", async () => {
38
- const pins = await shrinkwrappedPins();
39
- expect(Object.keys(pins).length).toBeGreaterThan(0);
30
+ test("the coding agent pins each sibling exactly", async () => {
31
+ const siblings = await siblingEntries();
32
+ expect(siblings.length).toBeGreaterThan(0);
33
+ const floating = siblings.filter(([, version]) => !/^\d+\.\d+\.\d+/.test(version));
34
+ expect(floating).toEqual([]);
35
+ });
36
+
37
+ test("every sibling pi package is published at the version the coding agent pins", async () => {
38
+ const siblings = await siblingEntries();
40
39
  for (const file of publishedPackages) {
41
40
  const { dependencies = {} } = await readJson<PackageJson>(`${repoRoot}/${file}`);
42
- const declared = Object.fromEntries(Object.keys(pins).map((name) => [name, dependencies[name]]));
43
- expect({ file, ...declared }).toEqual({ file, ...pins });
41
+ const declared = Object.fromEntries(siblings.map(([name]) => [name, dependencies[name]]));
42
+ expect({ file, ...declared }).toEqual({ file, ...Object.fromEntries(siblings) });
44
43
  }
45
44
  });
46
45
  });