Skip to content

Split bundle_ui manifest emission into a separate 'bundle' lifecycle phase#7414

Draft
isaacroldan wants to merge 2 commits intomainfrom
04-28-split_bundle_ui_manifest_emission_into_a_separate_bundle_lifecycle_phase
Draft

Split bundle_ui manifest emission into a separate 'bundle' lifecycle phase#7414
isaacroldan wants to merge 2 commits intomainfrom
04-28-split_bundle_ui_manifest_emission_into_a_separate_bundle_lifecycle_phase

Conversation

@isaacroldan
Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

How to test your changes?

Post-release steps

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

…phase

The `bundle_ui` step previously carried a `generatesAssetsManifest: boolean` config that fired for every command (`build`, `dev`, `deploy`) because the framework hardcoded a single `'deploy'` lifecycle. The flag is the smell: bundle_ui was doing two jobs and conditionally turning the second one off.

This change splits the manifest emission into its own step (`generate_ui_assets_manifest`) and replaces the single `'deploy'` lifecycle with two additive phases:

- `'build'` — local build (run by `shopify app build`).
- `'bundle'` — extra steps run after `'build'` when bundling for upload (driven by `dev` and `deploy`). Specs only declare a `'bundle'` group when they need to do more than the local build.

`extension.build()` composes them: `'build'` runs only the build steps; `'bundle'` runs `[...buildSteps, ...bundleSteps]` in declaration order. No spec needs to duplicate steps across both groups.

For `ui_extension`: `'build'` runs `bundle_ui`; `'bundle'` adds `generate_ui_assets_manifest` and `include_assets`. Net result: `shopify app build` no longer emits `manifest.json` for `ui_extension`; `dev` and `deploy` are unchanged.

The other 13 specs simply rename `lifecycle: 'deploy'` → `lifecycle: 'build'` — same behavior as before across all three commands.

`include_assets` keeps its own `generatesAssetsManifest` flag (out of scope for this PR; same cleanup pattern can be applied later).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

include_assets is conceptually a bundle-time step: it copies extension
assets into the bundle output and (for some specs) emits manifest.json.
It has no role in producing local build artifacts.

For the 5 specs whose only client step is include_assets — admin,
admin_link, channel, flow_template, order_attribution_config — move the
group from 'build' to 'bundle'. After this, `shopify app build` is a
no-op for these extension types; they run during dev/deploy as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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