diff --git a/.changeset/cuddly-papayas-own.md b/.changeset/cuddly-papayas-own.md new file mode 100644 index 0000000000..977f8d5566 --- /dev/null +++ b/.changeset/cuddly-papayas-own.md @@ -0,0 +1,5 @@ +--- +'@shopify/theme': patch +--- + +Fix to include customer JSON templates in `theme package` diff --git a/packages/theme/src/cli/services/package.test.ts b/packages/theme/src/cli/services/package.test.ts index 47f55833fa..86e047fb93 100644 --- a/packages/theme/src/cli/services/package.test.ts +++ b/packages/theme/src/cli/services/package.test.ts @@ -50,10 +50,16 @@ describe('packageTheme', () => { const themeRelativePaths = [ 'assets/base.css', 'config/settings_schema.json', + 'config/unsupported_dir/settings_schema.json', + 'templates/customers/account.json', 'invalid-file.md', 'invalid/file.liquid', ] - const expectedThemeRelativePaths = ['assets/base.css', 'config/settings_schema.json'] + const expectedThemeRelativePaths = [ + 'assets/base.css', + 'config/settings_schema.json', + 'templates/customers/account.json', + ] await createFiles(themeRelativePaths, inputDirectory) await createSettingsSchema( '[{"name": "theme_info", "theme_name": "Dawn", "theme_version": "7.0.2"}]', diff --git a/packages/theme/src/cli/services/package.ts b/packages/theme/src/cli/services/package.ts index a0be8eaf2b..b644d3d36f 100644 --- a/packages/theme/src/cli/services/package.ts +++ b/packages/theme/src/cli/services/package.ts @@ -12,6 +12,7 @@ const themeDirectoriesPattern = [ 'sections', 'snippets', 'templates', + 'templates/customers', 'release-notes.md', ].join('/**|')