Skip to content

fix(package): use host-provided TypeBox peer - #22

Merged
DevMortimer merged 2 commits into
DevMortimer:mainfrom
danielgap:fix/host-typebox-peer
Sep 30, 2026
Merged

DevMortimer merged 2 commits into
DevMortimer:mainfrom
danielgap:fix/host-typebox-peer

Conversation

@danielgap

Copy link
Copy Markdown
Contributor

What and why

Closes #21.

  • Move typebox from runtime dependencies to a required wildcard peer, so Pi supplies its host module instead of installing an extension-local copy.
  • Keep the existing TypeBox range in development dependencies. The peer remains required because the standalone public library imports TypeBox; ordinary npm installs resolve it automatically.
  • Add three offline package-contract regressions, update the lockfile and dependency documentation, and teach the package smoke test to distinguish optional Pi peers from the required library peer.

Verification

  • npm ci and npm run check pass. Baseline: 134/134 tests; candidate: 137/137, no failures or skips. Build and typecheck pass.
  • Changed behavior has offline tests. All three new contract tests fail against the original manifest/lockfile and pass after the fix.
  • Documentation and changelog notes are updated where needed.

Additional checks:

  • Executed the workflow's package metadata check, isolated tarball/library smoke test without optional Pi peers, and entry-point smoke test with locked peers: all pass.
  • Real isolated Pi 0.99.1 RPC startup using the tarball installed with --omit=peer: no physical TypeBox in the consumer, successful get_state, and typesafe command registered. No host-dependency warning or extension error. No active Pi installation was modified.
  • actionlint 1.7.12 passes with ShellCheck disabled locally (ShellCheck is not installed); full workflow lint remains for CI.
  • git diff --check passes. Scope: 7 files, 49 additions + 10 deletions (59 changed lines).

Live testing is not applicable: no transport or response-validation behavior changes and no billable requests were sent.

Compatibility and release notes

No public API or package version change. typebox is intentionally not an optional peer: consumers outside Pi still need it. Package managers that do not automatically install peers must install typebox alongside pi-typesafe, as documented in the README.

Existing Pi peer ranges are unchanged. Other host versions, Node versions and macOS were not locally tested; the existing CI matrix covers the supported Node/platform combinations. Baseline and candidate npm installs both report one pre-existing high-severity transitive brace-expansion advisory; dependency security upgrades are outside this focused fix.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 08:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@DevMortimer
DevMortimer merged commit 3a498ea into DevMortimer:main Sep 30, 2026
8 checks passed
@danielgap
danielgap deleted the fix/host-typebox-peer branch October 1, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Host-provided typebox declared as a runtime dependency triggers Pi extension-loader warning

3 participants