Skip to content

Commit a314543

Browse files
authored
Merge pull request #5709 from Shopify/merge-main-fixes
Merge main fixes
2 parents 38025a7 + 0e6c5c4 commit a314543

File tree

6 files changed

+28
-10
lines changed

6 files changed

+28
-10
lines changed

.changeset/quick-planes-try.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/app': patch
3+
---
4+
5+
Allow a deprecatedFromCliVersion to be configured for app management extension templates
6+
Use 2025-10 as the version for remote dom UI extension

packages/app/src/cli/api/graphql/business-platform-organizations/generated/types.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export type Scalars = {
1919
AccessRoleRecordId: {input: any; output: any}
2020
/** The ID for a ActionAudit. */
2121
ActionAuditID: {input: any; output: any}
22+
/** The ID for a Address. */
23+
AddressID: {input: any; output: any}
2224
/** The ID for a BusinessUser. */
2325
BusinessUserID: {input: any; output: any}
2426
/** A signed decimal number, which supports arbitrary precision and is serialized as a string. */

packages/app/src/cli/models/extensions/specifications/ui_extension.test.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ Please check the configuration in ${uiExtension.configurationPath}`),
703703
const uiExtension = await getTestUIExtension({
704704
directory: tmpDir,
705705
// Remote DOM supported API version
706-
apiVersion: '2025-07',
706+
apiVersion: '2025-10',
707707
extensionPoints: [
708708
{
709709
target: 'admin.product-details.action.render',
@@ -940,7 +940,7 @@ Please check the configuration in ${uiExtension.configurationPath}`),
940940
fileContent: '// JSX code',
941941
shouldRenderFileContent: '// JS code',
942942
// Remote DOM supported version
943-
apiVersion: '2025-07',
943+
apiVersion: '2025-10',
944944
})
945945
// Create tsconfig.json
946946
const tsconfigPath = joinPath(tmpDir, 'tsconfig.json')
@@ -981,7 +981,7 @@ Please check the configuration in ${uiExtension.configurationPath}`),
981981
fileContent: '// JSX code',
982982
shouldRenderFileContent: '// JS code',
983983
// Remote DOM supported version
984-
apiVersion: '2025-07',
984+
apiVersion: '2025-10',
985985
})
986986

987987
// Add another target sharing the same tsconfig.json as the main target
@@ -1050,7 +1050,7 @@ Please check the configuration in ${uiExtension.configurationPath}`),
10501050
tmpDir,
10511051
fileContent: '// Preact code',
10521052
// Remote DOM supported version
1053-
apiVersion: '2025-07',
1053+
apiVersion: '2025-10',
10541054
})
10551055

10561056
// Create tsconfig.json file for testing
@@ -1062,7 +1062,7 @@ Please check the configuration in ${uiExtension.configurationPath}`),
10621062

10631063
// When
10641064
await expect(extension.contributeToSharedTypeFile?.(typeDefinitionsByFile)).rejects.toThrow(
1065-
'Type reference for admin.unknown.action.render could not be found. You might be using the wrong @shopify/ui-extensions version. Fix the error by ensuring you install @shopify/ui-extensions@2025-07 in your dependencies.',
1065+
'Type reference for admin.unknown.action.render could not be found. You might be using the wrong @shopify/ui-extensions version. Fix the error by ensuring you install @shopify/ui-extensions@2025-10 in your dependencies.',
10661066
)
10671067

10681068
// No shopify.d.ts file should be created
@@ -1078,7 +1078,7 @@ Please check the configuration in ${uiExtension.configurationPath}`),
10781078
tmpDir,
10791079
fileContent: '// Preact code',
10801080
// Remote DOM supported version
1081-
apiVersion: '2025-07',
1081+
apiVersion: '2025-10',
10821082
})
10831083

10841084
// Change target to a target that does not exist in the library

packages/app/src/cli/models/extensions/specifications/ui_extension.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ function isRemoteDomExtension(
271271
return false
272272
}
273273

274-
return year > 2025 || (year === 2025 && month >= 7)
274+
return year > 2025 || (year === 2025 && month >= 10)
275275
}
276276

277277
export function getShouldRenderTarget(target: string) {

packages/app/src/cli/utilities/developer-platform-client/app-management-client.test.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,18 @@ const allowedTemplate: GatedExtensionTemplate = {
4747
organizationBetaFlags: ['allowedFlag'],
4848
minimumCliVersion: '1.0.0',
4949
}
50-
const templateDisallowedByCliVersion: GatedExtensionTemplate = {
50+
const templateDisallowedByMinimumCliVersion: GatedExtensionTemplate = {
5151
...testRemoteExtensionTemplates[2]!,
5252
organizationBetaFlags: ['allowedFlag'],
5353
// minimum CLI version is higher than the current CLI version
5454
minimumCliVersion: `1${CLI_KIT_VERSION}`,
5555
}
56+
const templateDisallowedByDeprecatedFromCliVersion: GatedExtensionTemplate = {
57+
...testRemoteExtensionTemplates[2]!,
58+
organizationBetaFlags: ['allowedFlag'],
59+
// deprecated CLI version is lower than the current CLI version
60+
deprecatedFromCliVersion: '1.0.0',
61+
}
5662
const templateDisallowedByBetaFlag: GatedExtensionTemplate = {
5763
...testRemoteExtensionTemplates[3]!,
5864
// organization beta flag is not allowed
@@ -211,7 +217,8 @@ describe('allowedTemplates', () => {
211217
const templates: GatedExtensionTemplate[] = [
212218
templateWithoutRules,
213219
allowedTemplate,
214-
templateDisallowedByCliVersion,
220+
templateDisallowedByMinimumCliVersion,
221+
templateDisallowedByDeprecatedFromCliVersion,
215222
templateDisallowedByBetaFlag,
216223
]
217224

packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ type ShopNode = Exclude<ShopEdge['node'], {[key: string]: never}>
158158
export interface GatedExtensionTemplate extends ExtensionTemplate {
159159
organizationBetaFlags?: string[]
160160
minimumCliVersion?: string
161+
deprecatedFromCliVersion?: string
161162
}
162163

163164
export class AppManagementClient implements DeveloperPlatformClient {
@@ -1106,7 +1107,9 @@ export async function allowedTemplates(
11061107
!ext.organizationBetaFlags || ext.organizationBetaFlags.every((flag) => enabledBetaFlags[flag])
11071108
const satisfiesMinCliVersion =
11081109
!ext.minimumCliVersion || versionSatisfies(CLI_KIT_VERSION, `>=${ext.minimumCliVersion}`)
1109-
return hasAnyNeededBetas && satisfiesMinCliVersion
1110+
const satisfiesDeprecatedFromCliVersion =
1111+
!ext.deprecatedFromCliVersion || versionSatisfies(CLI_KIT_VERSION, `<${ext.deprecatedFromCliVersion}`)
1112+
return hasAnyNeededBetas && satisfiesMinCliVersion && satisfiesDeprecatedFromCliVersion
11101113
})
11111114
}
11121115

0 commit comments

Comments
 (0)