Skip to content

Commit

Permalink
Support customer API codegen in directories (#2600)
Browse files Browse the repository at this point in the history
  • Loading branch information
weotch authored Oct 24, 2024
1 parent bca2f86 commit a0f660a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-berries-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/hydrogen-codegen': patch
---

Checks anywhere in generated filename for "customer" or "caapi"
2 changes: 1 addition & 1 deletion packages/hydrogen-codegen/src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const caapiDefaultValues: DefaultValues = {
};

export function getDefaultOptions(outputFile = '') {
return /^(customer|caapi\.)/i.test(outputFile)
return /(customer|caapi\.)/i.test(outputFile)
? caapiDefaultValues
: sfapiDefaultValues;
}

0 comments on commit a0f660a

Please sign in to comment.