diff --git a/.changeset/tiny-wolves-ignore-tmp.md b/.changeset/tiny-wolves-ignore-tmp.md new file mode 100644 index 00000000000..62800874539 --- /dev/null +++ b/.changeset/tiny-wolves-ignore-tmp.md @@ -0,0 +1,5 @@ +--- +'@shopify/theme': patch +--- + +Ignore atomic-write temporary files (e.g. `blocks/foo.liquid.tmp.93809.4dbd82e0b95a`) in the theme dev watcher to prevent crashes when editors save files. diff --git a/packages/theme/src/cli/constants.ts b/packages/theme/src/cli/constants.ts index b8a86bd926b..2ac503b0a9c 100644 --- a/packages/theme/src/cli/constants.ts +++ b/packages/theme/src/cli/constants.ts @@ -31,6 +31,10 @@ export const DEFAULT_IGNORE_PATTERNS = [ '**/config.yml', '**/node_modules/', '.prettierrc.json', + // Atomic-write temp files (e.g. blocks/foo.liquid.tmp.bar.baz) + '**/{blocks,layout,snippets}/**/*.liquid.tmp.*', + '**/{config,locales}/**/*.json.tmp.*', + '**/{sections,templates}/**/*.{liquid,json}.tmp.*', ] export const MAX_GRAPHQL_THEME_FILES = 50