Skip to content

Commit

Permalink
Revert "Change templates pattern to 'templates/*'"
Browse files Browse the repository at this point in the history
This reverts commit e20fb5f.
  • Loading branch information
montalvomiguelo committed Oct 15, 2024
1 parent 5491866 commit cd35797
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/theme/src/cli/utilities/asset-ignore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function matchGlob(key: string, pattern: string) {
if (result) return true

// When the the standard match fails and the pattern includes '/*.', we
// replace '/*' with '/**/*' to emulate Shopify CLI 2.x behavior, as it was
// replace '/*.' with '/**/*.' to emulate Shopify CLI 2.x behavior, as it was
// based on 'File.fnmatch'.
if (shouldReplaceGlobPattern(pattern)) {
return originalMatchGlob(key, pattern.replace(templatesRegex, 'templates/**/*$1'), matchOpts)
Expand All @@ -79,8 +79,8 @@ export function raiseWarningForNonExplicitGlobPatterns(patterns: string[]) {
if (shouldReplaceGlobPattern(pattern)) {
outputWarn(
`Warning: The pattern '${pattern}' does not include subdirectories. To maintain backwards compatibility, we have modified your pattern to ${pattern.replace(
'/*',
'/**/*',
templatesRegex,
'templates/**/*$1',
)} to explicitly include subdirectories.`,
)
}
Expand Down

0 comments on commit cd35797

Please sign in to comment.