diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d420e32fd..297298603d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ This is the log of notable changes to EAS CLI and related packages. ### ๐Ÿ› Bug fixes +- Avoid merging `expo.extra` plugin-generated data with `expo.extra.eas.projectId` in `eas init`. ([#2554](https://github.com/expo/eas-cli/pull/2554) by [@byCedric](https://github.com/byCedric))) + ### ๐Ÿงน Chores - Make error message for invalid CFBundleShortVersionString more descriptive and actionable. Improve CFBundleShortVersionString validation regex. ([#2542](https://github.com/expo/eas-cli/pull/2542) by [@szdziedzic](https://github.com/szdziedzic)) diff --git a/packages/eas-cli/src/commandUtils/context/contextUtils/getProjectIdAsync.ts b/packages/eas-cli/src/commandUtils/context/contextUtils/getProjectIdAsync.ts index 031aa5552e..da8d13dceb 100644 --- a/packages/eas-cli/src/commandUtils/context/contextUtils/getProjectIdAsync.ts +++ b/packages/eas-cli/src/commandUtils/context/contextUtils/getProjectIdAsync.ts @@ -18,13 +18,15 @@ import { Actor, getActorUsername } from '../../../user/User'; * Save an EAS project ID to the appropriate field in the app config. * * @deprecated Should not be used outside of context functions except in the init command. + * @deprecated Starting from `@expo/config` from SDK 52, the `modifyConfigAsync` function is merging existing data. Once this is released, we can use that instead of manually merging. */ export async function saveProjectIdToAppConfigAsync( projectDir: string, projectId: string, options: { env?: Env } = {} ): Promise { - const exp = getPrivateExpoConfig(projectDir, options); + // NOTE(cedric): we disable plugins to avoid writing plugin-generated content to `expo.extra` + const exp = getPrivateExpoConfig(projectDir, { skipPlugins: true, ...options }); const result = await createOrModifyExpoConfigAsync( projectDir, { diff --git a/packages/eas-cli/src/project/expoConfig.ts b/packages/eas-cli/src/project/expoConfig.ts index d4225f7349..aa7223b5d7 100644 --- a/packages/eas-cli/src/project/expoConfig.ts +++ b/packages/eas-cli/src/project/expoConfig.ts @@ -18,6 +18,7 @@ export type PublicExpoConfig = Omit< export interface ExpoConfigOptions { env?: Env; skipSDKVersionRequirement?: boolean; + skipPlugins?: boolean; } interface ExpoConfigOptionsInternal extends ExpoConfigOptions { @@ -52,6 +53,7 @@ function getExpoConfigInternal( const { exp } = getConfig(projectDir, { skipSDKVersionRequirement: true, ...(opts.isPublicConfig ? { isPublicConfig: true } : {}), + ...(opts.skipPlugins ? { skipPlugins: true } : {}), }); const { error } = MinimalAppConfigSchema.validate(exp, {