Skip to content

feat(builders): add after-bundle hook - #3751

Open
lucamaraschi wants to merge 1 commit into
vercel:mainfrom
lucamaraschi:feature/on-after-bundle
Open

feat(builders): add after-bundle hook#3751
lucamaraschi wants to merge 1 commit into
vercel:mainfrom
lucamaraschi:feature/on-after-bundle

Conversation

@lucamaraschi

Copy link
Copy Markdown
Contributor

Adds an awaited onAfterBundle hook to @workflow/builders.

The hook runs after a successful workflow bundle and manifest build and provides:

  • The build target and working directory
  • The generated workflow manifest
  • Absolute paths for the steps bundle, workflows bundle, and manifest
  • Consistent invocation after successful watch rebuilds, including when the manifest contents are unchanged

Hook errors propagate to the caller. Failed or incomplete bundle and manifest builds do not invoke the hook.

This enables integrations to consume completed workflow build artifacts without reproducing the builder lifecycle internally.

Nitro-specific integration is intentionally excluded and will be handled separately.

How did you test your changes?

  • Added coverage using the real combined-bundle and manifest lifecycle
  • Verified invocation after successful watch rebuilds
  • Verified relative manifest directories report the actual written path
  • Verified the hook is awaited and errors propagate
  • Verified failed bundle and manifest builds do not invoke the hook
  • Built and typechecked @workflow/builders
  • Ran the complete builders test suite: 243 tests passed

PR Checklist - Required to merge

  • 📦 Added a minor changeset for @workflow/builders
  • 🔒 Commit includes the required DCO Signed-off-by trailer
  • 📝 Ping @vercel/workflow once the PR is ready for review

Signed-off-by: Luca Maraschi <luca.maraschi@gmail.com>
@lucamaraschi
lucamaraschi requested a review from a team as a code owner August 22, 2026 22:47
@changeset-bot

changeset-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 25a8465

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@workflow/builders Minor
@workflow/astro Patch
@workflow/cli Patch
@workflow/nest Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/vitest Patch
workflow Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/core Patch
@workflow/web-shared Patch
@workflow/web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

@lucamaraschi is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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