@danypops/pi-packed 0.27.5 → 0.27.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danypops/pi-packed",
3
- "version": "0.27.5",
3
+ "version": "0.27.6",
4
4
  "description": "Pi package lifecycle, validation, daemon, tools, profiles, and TUI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,7 +31,6 @@
31
31
  "@danypops/packed": "^0.7.0",
32
32
  "@danypops/pi-extension-harness": "^0.7.0",
33
33
  "@danypops/vehicle-client": "^0.10.0",
34
- "@danypops/vehicle-client-pi": "^0.40.1",
35
34
  "@danypops/vehicle-core": "^0.15.0",
36
35
  "@danypops/vehicle-server": "^0.24.2",
37
36
  "jiti": "^2.7.0",
@@ -41,9 +40,11 @@
41
40
  },
42
41
  "devDependencies": {
43
42
  "@danypops/pi-tui-harness": "^0.0.1",
43
+ "@danypops/vehicle-client-pi": "^0.41.3",
44
44
  "@types/semver": "^7.7.1"
45
45
  },
46
46
  "peerDependencies": {
47
+ "@danypops/vehicle-client-pi": "^0.41.3",
47
48
  "@earendil-works/pi-coding-agent": "*",
48
49
  "@earendil-works/pi-tui": "*",
49
50
  "typebox": "*"
@@ -566,8 +566,14 @@ function dependencyCheck(context: Context): void {
566
566
  path: file,
567
567
  message: `${name} must be declared as peerDependencies[${name}] = *`,
568
568
  });
569
- } else if (dependencies[name] === undefined && optional[name] === undefined) {
570
- const misplaced = dev[name] !== undefined ? "devDependency" : peers[name] !== undefined ? "peerDependency" : undefined;
569
+ } else if (dependencies[name] === undefined && optional[name] === undefined && peers[name] === undefined) {
570
+ // A real (non-"*") peerDependency range genuinely satisfies this -- npm's own
571
+ // documented mechanism for "a real runtime dependency the host is expected to
572
+ // already share a single instance of," distinct from CORE_PACKAGES' own stricter
573
+ // peers[name] === "*" contract (Pi's own always-exactly-one-host-version packages,
574
+ // checked separately above). A devDependency alone still doesn't count -- it
575
+ // guarantees nothing for a real consumer's own install.
576
+ const misplaced = dev[name] !== undefined ? "devDependency" : undefined;
571
577
  context.add({
572
578
  code: "RUNTIME_DEPENDENCY_MISSING",
573
579
  severity: "error",
@@ -441,4 +441,37 @@ describe("dependencyCheck false-positive regressions (packed check)", () => {
441
441
  const report = await checkPackage(root, { generic: false });
442
442
  expect(codes(report.diagnostics)).not.toContain("RUNTIME_DEPENDENCY_MISSING");
443
443
  });
444
+
445
+ it("a real (non-*) peerDependency range genuinely satisfies a shipped-code import -- npm's own documented mechanism for a shared-singleton runtime dependency, distinct from CORE_PACKAGES' own peers[name] === '*' contract", async () => {
446
+ const root = fixture(
447
+ {
448
+ ...base,
449
+ files: ["extensions", "README.md", "LICENSE"],
450
+ peerDependencies: { ...base.peerDependencies, "@scope/shared-singleton": "^1.2.3" },
451
+ devDependencies: { "@scope/shared-singleton": "^1.2.3" },
452
+ },
453
+ {
454
+ "extensions/index.ts": 'import { thing } from "@scope/shared-singleton";\nexport default function () { return thing; }\n',
455
+ "README.md": "# Example",
456
+ LICENSE: "MIT",
457
+ },
458
+ );
459
+ const report = await checkPackage(root, { generic: false });
460
+ expect(codes(report.diagnostics)).not.toContain("RUNTIME_DEPENDENCY_MISSING");
461
+ });
462
+
463
+ it("still flags a shipped-code import declared only as a devDependency, even though a peerDependency-shaped exception now exists", async () => {
464
+ const root = fixture(
465
+ { ...base, files: ["extensions", "README.md", "LICENSE"], devDependencies: { "leftover-dev-only": "1.0.0" } },
466
+ {
467
+ "extensions/index.ts": 'import thing from "leftover-dev-only";\nexport default function () { return thing; }\n',
468
+ "README.md": "# Example",
469
+ LICENSE: "MIT",
470
+ },
471
+ );
472
+ const report = await checkPackage(root, { generic: false });
473
+ expect(codes(report.diagnostics)).toContain("RUNTIME_DEPENDENCY_MISSING");
474
+ const diagnostic = report.diagnostics.find((d) => d.code === "RUNTIME_DEPENDENCY_MISSING")!;
475
+ expect(diagnostic.message).toContain("only a devDependency");
476
+ });
444
477
  });