-
Notifications
You must be signed in to change notification settings - Fork 0
[codec][P2] Add prepack build hook to eliminate stale-dist local-pack footgun #45
Description
dist/ is gitignored and built fresh by CI (release.yml runs pnpm -r build before changeset publish), so the published artifact is always correct. But none of the three packages define a prepack/prepare hook, so a developer running pnpm pack locally without first building ships a stale or missing dist/ (this is how the F0 viem-crash surfaced during the PR #44 audit — a local pack of pre-#40 dist).
Proposal: add "prepack": "pnpm run build" to networks + types (cheap tsc). For codec there is a trade-off — prepack would re-run the full wasm-pack build on every pack, and CI already builds before publish (double build). Options to weigh:
- per-package
prepack(simple, but doubles CI build + slow local packs for codec) - a root-level pack guard / CI dist-freshness gate instead (no double build)
Needs a small design decision before implementing. Non-blocking for 0.1.0.
Surfaced by: PR #44 (Iris review, P2).