From 99b88caa7016277c4f6199ee7d7cc1d0761bacf7 Mon Sep 17 00:00:00 2001 From: Morisa Manzella Date: Tue, 31 Jan 2023 07:59:23 -0500 Subject: [PATCH] Fix to include customer JSON templates in `theme package` (#1250) --- .changeset/cuddly-papayas-own.md | 5 +++++ packages/theme/src/cli/services/package.test.ts | 8 +++++++- packages/theme/src/cli/services/package.ts | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .changeset/cuddly-papayas-own.md 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('/**|')