Skip to content

refactor: remove buildConfig from specifications in favor of clientSteps#7334

Merged
isaacroldan merged 1 commit intomainfrom
04-16-refactor_remove_buildconfig_from_specifications_in_favor_of_clientsteps
Apr 21, 2026
Merged

refactor: remove buildConfig from specifications in favor of clientSteps#7334
isaacroldan merged 1 commit intomainfrom
04-16-refactor_remove_buildconfig_from_specifications_in_favor_of_clientsteps

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, so I've added a changelog entry with pnpm changeset add

Copy link
Copy Markdown
Contributor Author

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

@isaacroldan isaacroldan marked this pull request as ready for review April 17, 2026 14:54
@isaacroldan isaacroldan requested a review from a team as a code owner April 17, 2026 14:54
Copilot AI review requested due to automatic review settings April 17, 2026 14:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors extension deploy bundling to remove the legacy buildConfig contract from extension specifications and rely on clientSteps (and a new hasDeploySteps signal) to decide when a deploy bundle should be created and uploaded.

Changes:

  • Removed buildConfig from ExtensionSpecification and from all affected extension specs.
  • Added ExtensionInstance.hasDeploySteps and updated bundling logic to key off deploy lifecycle steps.
  • Updated deploy flow so bundleAndBuildExtensions returns an optional bundle path (upload skipped when undefined).

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/app/src/cli/services/deploy/bundle.ts Makes bundle creation conditional and returns bundlePath only when a bundle should be uploaded.
packages/app/src/cli/services/deploy.ts Simplifies deploy bundling setup and consumes optional bundlePath.
packages/app/src/cli/models/extensions/specifications/web_pixel_extension.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/ui_extension.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/theme.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/tax_calculation.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/product_subscription.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/pos_ui_extension.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/function.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/flow_template.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/checkout_ui_extension.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/checkout_post_purchase.ts Removes buildConfig in favor of existing clientSteps.
packages/app/src/cli/models/extensions/specifications/channel.ts Removes buildConfig copy-files config; uses include_assets client step instead.
packages/app/src/cli/models/extensions/specifications/admin.ts Removes buildConfig copy-files config; relies on include_assets client step.
packages/app/src/cli/models/extensions/specification.ts Deletes BuildConfig type and buildConfig property from spec interfaces/builders.
packages/app/src/cli/models/extensions/extension-instance.ts Adds hasDeploySteps and switches bundling decisions from buildConfig to clientSteps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/app/src/cli/models/extensions/extension-instance.ts
Comment on lines +21 to +26
/**
* Builds all extensions into a bundle directory and compresses it if any
* extension produced output. Returns the bundlePath if a bundle was created,
* or undefined if only the manifest was present (nothing to upload).
*/
export async function bundleAndBuildExtensions(options: BundleOptions): Promise<string | undefined> {
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The docstring says this returns undefined when “only the manifest was present (nothing to upload)”, but the decision is currently based on ext.hasDeploySteps, not on whether any files beyond manifest.json were actually written into the bundle directory. This can lead to returning a bundle path (and uploading) even when deploy steps copied 0 files. Consider basing this on bundle directory contents (excluding manifest.json) or tracking whether any step produced output.

Copilot uses AI. Check for mistakes.
Comment thread packages/app/src/cli/services/deploy/bundle.ts
The buildConfig property on extension specifications was redundant with
clientSteps. This removes the BuildConfig type, the property from
ExtensionSpecification, and all usages across specification files.

Consumer sites in deploy.ts and extension-instance.ts now use
clientSteps-based checks (hasDeploySteps getter) instead of
buildConfig.mode comparisons.

bundleAndBuildExtensions now always creates the bundle directory but
only compresses and returns a bundlePath when extensions have deploy
steps, avoiding unnecessary GCS uploads for manifest-only bundles.

Co-authored-by: Isaac Roldán <isaac.roldan@shopify.com>
@isaacroldan isaacroldan force-pushed the 04-16-refactor_remove_buildconfig_from_specifications_in_favor_of_clientsteps branch from 42ac8e9 to 8a10546 Compare April 20, 2026 11:45
@isaacroldan isaacroldan added this pull request to the merge queue Apr 21, 2026
Merged via the queue into main with commit 0fe2122 Apr 21, 2026
25 checks passed
@isaacroldan isaacroldan deleted the 04-16-refactor_remove_buildconfig_from_specifications_in_favor_of_clientsteps branch April 21, 2026 09:17
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.

3 participants