From 5df94db679e97699b3911ed5cad3a5df4f28b50f Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 4 Jul 2024 10:05:57 +0900 Subject: [PATCH 1/2] Fix codegen config resolution --- packages/cli/src/lib/codegen.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/lib/codegen.ts b/packages/cli/src/lib/codegen.ts index dcbc7c4ec1..503750a7e0 100644 --- a/packages/cli/src/lib/codegen.ts +++ b/packages/cli/src/lib/codegen.ts @@ -1,7 +1,7 @@ import {spawn} from 'node:child_process'; import {fileURLToPath} from 'node:url'; import {formatCode, getCodeFormatOptions} from './format-code.js'; -import {renderFatalError, renderWarning} from '@shopify/cli-kit/node/ui'; +import {renderWarning} from '@shopify/cli-kit/node/ui'; import { joinPath, relativePath, @@ -173,8 +173,7 @@ async function generateTypes({ const {config: codegenConfig} = // Load /codegen.ts if available (await loadCodegenConfig({ - configFilePath, - searchPlaces: [dirs.rootDirectory], + configFilePath: configFilePath ?? dirs.rootDirectory, })) || // Fall back to default config (await generateDefaultConfig(dirs, forceSfapiVersion)); From 3bed00d0e6b04dcde78b1b21c4993632fbcba1ce Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 4 Jul 2024 10:06:57 +0900 Subject: [PATCH 2/2] Changesets --- .changeset/brave-falcons-repair.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/brave-falcons-repair.md diff --git a/.changeset/brave-falcons-repair.md b/.changeset/brave-falcons-repair.md new file mode 100644 index 0000000000..ac1401d94b --- /dev/null +++ b/.changeset/brave-falcons-repair.md @@ -0,0 +1,5 @@ +--- +'@shopify/cli-hydrogen': patch +--- + +Fix Codegen config resolution when project directory contains dots.