Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/spicy-crabs-bundle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/app': minor
---

Support the ui_extension_bundle_size_exception extension capability
1 change: 1 addition & 0 deletions packages/app/src/cli/models/extensions/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const CapabilitiesSchema = zod.object({
api_access: zod.boolean().optional(),
collect_buyer_consent: CollectBuyerConsentCapabilitySchema.optional(),
iframe: IframeCapabilitySchema.optional(),
ui_extension_bundle_size_exception: zod.boolean().optional(),
})

const SupportedFeaturesSchema = zod.object({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,53 @@ Please check the configuration in ${uiExtension.configurationPath}`),
})
})

test('includes the ui_extension_bundle_size_exception capability in the deploy config', async () => {
await inTemporaryDirectory(async (tmpDir) => {
// Given
vi.spyOn(loadLocales, 'loadLocalesConfig').mockResolvedValue({})
const configurationPath = joinPath(tmpDir, 'shopify.extension.toml')
const allSpecs = await loadLocalExtensionsSpecifications()
const specification = allSpecs.find((spec) => spec.identifier === 'ui_extension')!
const parsed = specification.parseConfigurationObject({
targeting: [
{
target: 'EXTENSION::POINT::A',
module: './src/ExtensionPointA.js',
},
],
api_version: '2025-10' as const,
name: 'UI Extension',
type: 'ui_extension',
handle: 'test-ui-extension',
capabilities: {
ui_extension_bundle_size_exception: true,
},
settings: {},
})
if (parsed.state !== 'ok') {
throw new Error("Couldn't parse configuration")
}
const uiExtension = new ExtensionInstance({
configuration: parsed.data,
directory: tmpDir,
specification,
configurationPath,
entryPath: '',
})

// When
const deployConfig = await uiExtension.deployConfig({
apiKey: 'apiKey',
appConfiguration: placeholderAppConfiguration,
})

// Then
expect(deployConfig?.capabilities).toStrictEqual({
ui_extension_bundle_size_exception: true,
})
})
})

test('returns supported_features with runs_offline true when configured', async () => {
await inTemporaryDirectory(async (tmpDir) => {
// Given
Expand Down
Loading