Skip to content

chore: build packages via prepack instead of a separate build script - #140

Merged
dinwwwh merged 1 commit into
mainfrom
claude/prepack-script-migration-2058bb
Sep 30, 2026
Merged

dinwwwh merged 1 commit into
mainfrom
claude/prepack-script-migration-2058bb

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Sep 30, 2026

Copy link
Copy Markdown
Member

Packages now build through a prepack script instead of a separate build script, matching oRPC. unbuild runs automatically on every pnpm pack and pnpm publish, so a package can no longer be published without its dist because a step was forgotten.

Changes

  • All 7 packages: "build": "unbuild" → "prepack": "unbuild".
  • CI preview and release workflows no longer run a separate build step; packing and publishing build on their own.

Testing

  • pnpm pack in packages/shared builds first; the tarball contains dist/index.mjs, dist/index.d.mts and dist/index.d.ts.
  • pnpm --filter='./packages/*' publish -r --dry-run --no-git-checks builds all 7 packages, covering the release path.
  • pkg-pr-new 0.0.87 runs pnpm pack --pack-destination <dir> without --ignore-scripts, so previews still build.
  • eslint clean.

Every package's `build` script is renamed to `prepack`, so unbuild runs
automatically whenever a package is packed or published. The explicit
build steps in the CI preview and release workflows are removed, since
`pnpm pack` (used by pkg-pr-new) and `pnpm publish` both trigger the
hook themselves.
@pkg-pr-new

pkg-pr-new Bot commented Sep 30, 2026

Copy link
Copy Markdown
@standard-server/aws-lambda

npm i https://pkg.pr.new/@standard-server/aws-lambda@140

@standard-server/core

npm i https://pkg.pr.new/@standard-server/core@140

@standard-server/fastify

npm i https://pkg.pr.new/@standard-server/fastify@140

@standard-server/fetch

npm i https://pkg.pr.new/@standard-server/fetch@140

@standard-server/node

npm i https://pkg.pr.new/@standard-server/node@140

@standard-server/peer

npm i https://pkg.pr.new/@standard-server/peer@140

@standard-server/shared

npm i https://pkg.pr.new/@standard-server/shared@140

commit: 1793182

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — this run reviewed the full 9-file diff at head 1793182: the build → prepack script rename across all 7 publishable packages and the removal of the explicit build step from both CI workflows.

  • Per-package prepack hook — "build": "unbuild" becomes "prepack": "unbuild" in shared, core, peer, node, fetch, fastify, and aws-lambda, so packing/publishing builds automatically.
  • CI preview workflow — the standalone pnpm --filter='./packages/*' run -r build step is dropped; pkg-pr-new now relies on prepack during its per-package pnpm pack.
  • Release workflow — the same build step is dropped before pnpm publish; prepack covers the publish path.

I verified the load-bearing external contract directly against the installed source: pkg-pr-new@0.0.87 runs pnpm pack --pack-destination <dir> with no --ignore-scripts (node_modules/pkg-pr-new/dist/index.js:32901), so previews still build. pnpm pack/pnpm publish both run prepack, and no other reference to a build npm script exists anywhere in the repo (no workflow, doc, or root script invokes it; pnpm-workspace.yaml sets no ignore-scripts). Cross-package type resolution during each package's own build uses the source exports (./src/index.ts), not dist, so per-package prepack ordering is not a concern.

The only observable side effect is DX: pnpm run build no longer exists locally (use pnpm pack or pnpm exec unbuild), which is the intended trade-off.

Pullfrog  | View workflow run | Using DeepSeek Flash (default — pick a model for stronger reviews) | 𝕏

@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed

codspeed Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 26 untouched benchmarks
⏩ 108 skipped benchmarks1


Comparing claude/prepack-script-migration-2058bb (1793182) with main (917b6a2)2

Open in CodSpeed

Footnotes

  1. 108 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (e887068) during the generation of this report, so 917b6a2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@dinwwwh
dinwwwh merged commit e00dd77 into main Sep 30, 2026
11 checks passed
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.

1 participant