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. 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));