gentle-pi 0.10.4 → 0.10.6

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.
@@ -0,0 +1,16 @@
1
+ import { realpathSync } from "node:fs";
2
+ import { createRequire } from "node:module";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ const packageJsonPath = realpathSync(
6
+ fileURLToPath(new URL("../package.json", import.meta.url)),
7
+ );
8
+ const requireFromRealPackage = createRequire(packageJsonPath);
9
+ const piPrettyModule = requireFromRealPackage("@heyhuynhgiabuu/pi-pretty");
10
+
11
+ const piPrettyExtension =
12
+ typeof piPrettyModule === "function"
13
+ ? piPrettyModule
14
+ : piPrettyModule.default;
15
+
16
+ export default piPrettyExtension;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gentle-pi",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "description": "Turn Pi into el Gentleman: a senior-architect development harness with SDD/OpenSpec, subagents, strict TDD evidence, review guardrails, and skill discovery.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,8 +37,7 @@
37
37
  "pi": {
38
38
  "image": "https://cdn.jsdelivr.net/npm/gentle-pi/assets/gentle-logo-only.png",
39
39
  "extensions": [
40
- "./extensions",
41
- "./node_modules/@heyhuynhgiabuu/pi-pretty/dist/index.js"
40
+ "./extensions"
42
41
  ],
43
42
  "themes": [
44
43
  "./themes"
@@ -1,5 +1,5 @@
1
1
  import assert from "node:assert/strict";
2
- import { readFileSync } from "node:fs";
2
+ import { existsSync, readFileSync } from "node:fs";
3
3
  import { dirname, join } from "node:path";
4
4
  import test from "node:test";
5
5
  import { fileURLToPath } from "node:url";
@@ -27,7 +27,7 @@ function readPackageJson(): PackageJson {
27
27
  }
28
28
  }
29
29
 
30
- test("package manifest installs and loads pi-pretty without bundling native optional dependencies", () => {
30
+ test("package manifest installs pi-pretty through a wrapper without bundling native optional dependencies", () => {
31
31
  const packageJson = readPackageJson();
32
32
 
33
33
  assert.equal(
@@ -36,10 +36,18 @@ test("package manifest installs and loads pi-pretty without bundling native opti
36
36
  "gentle-pi must install the tested pi-pretty version as a normal dependency",
37
37
  );
38
38
  assert.ok(
39
- packageJson.pi?.extensions?.includes(
39
+ packageJson.pi?.extensions?.includes("./extensions"),
40
+ "gentle-pi must load packaged extension wrappers",
41
+ );
42
+ assert.ok(
43
+ !packageJson.pi?.extensions?.includes(
40
44
  "./node_modules/@heyhuynhgiabuu/pi-pretty/dist/index.js",
41
45
  ),
42
- "gentle-pi must load the pi-pretty extension from its installed dependency",
46
+ "gentle-pi must not reference pnpm-unportable nested node_modules paths",
47
+ );
48
+ assert.ok(
49
+ existsSync(join(PACKAGE_ROOT, "extensions", "pi-pretty.ts")),
50
+ "gentle-pi must expose pi-pretty through a packaged wrapper extension",
43
51
  );
44
52
  assert.ok(
45
53
  !packageJson.bundledDependencies?.includes("@heyhuynhgiabuu/pi-pretty"),
@@ -50,3 +58,15 @@ test("package manifest installs and loads pi-pretty without bundling native opti
50
58
  "pi-pretty must not be bundled because its native optional dependencies are platform-specific",
51
59
  );
52
60
  });
61
+
62
+
63
+ test("pi-pretty wrapper uses real package path resolution for pnpm symlink installs", () => {
64
+ const wrapper = readFileSync(
65
+ join(PACKAGE_ROOT, "extensions", "pi-pretty.ts"),
66
+ "utf8",
67
+ );
68
+
69
+ assert.match(wrapper, /realpathSync/);
70
+ assert.match(wrapper, /createRequire/);
71
+ assert.match(wrapper, /@heyhuynhgiabuu\/pi-pretty/);
72
+ });