From 1a23ef597f00a5d7e26112119ffca586adb7d45c Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Tue, 7 May 2024 13:20:35 +0200 Subject: [PATCH 1/8] [eas-cli] don't allow to specify custom global version of deprecated `expo-cli` --- packages/eas-cli/src/build/android/prepareJob.ts | 1 - packages/eas-cli/src/build/ios/prepareJob.ts | 1 - packages/eas-json/schema/eas.schema.json | 5 ----- packages/eas-json/src/build/schema.ts | 1 - packages/eas-json/src/build/types.ts | 1 - 5 files changed, 9 deletions(-) diff --git a/packages/eas-cli/src/build/android/prepareJob.ts b/packages/eas-cli/src/build/android/prepareJob.ts index 22513765ed..760da2d615 100644 --- a/packages/eas-cli/src/build/android/prepareJob.ts +++ b/packages/eas-cli/src/build/android/prepareJob.ts @@ -68,7 +68,6 @@ export async function prepareJobAsync( bun: buildProfile.bun, yarn: buildProfile.yarn, ndk: buildProfile.ndk, - expoCli: buildProfile.expoCli, env: buildProfile.env, }, cache: { diff --git a/packages/eas-cli/src/build/ios/prepareJob.ts b/packages/eas-cli/src/build/ios/prepareJob.ts index 806448a6e4..e14639d36e 100644 --- a/packages/eas-cli/src/build/ios/prepareJob.ts +++ b/packages/eas-cli/src/build/ios/prepareJob.ts @@ -62,7 +62,6 @@ export async function prepareJobAsync( bundler: buildProfile.bundler, cocoapods: buildProfile.cocoapods, fastlane: buildProfile.fastlane, - expoCli: buildProfile.expoCli, env: buildProfile.env, }, cache: { diff --git a/packages/eas-json/schema/eas.schema.json b/packages/eas-json/schema/eas.schema.json index 02f4652a74..b203cceb3e 100644 --- a/packages/eas-json/schema/eas.schema.json +++ b/packages/eas-json/schema/eas.schema.json @@ -156,11 +156,6 @@ "description": "The version of Bun to use for the build. See: https://bun.sh/", "markdownDescription": "The exact version of [Bun](https://bun.sh/) to use for the build." }, - "expoCli": { - "type": "string", - "description": "The version of `expo-cli` used to `prebuild` your app.", - "markdownDescription": "Version of [expo-cli](https://www.npmjs.com/package/expo-cli) used to [prebuild](https://docs.expo.dev/workflow/expo-cli/#expo-prebuild) your app. It does not have any effect on bare projects." - }, "env": { "type": "object", "description": "Environment variables that should be set during the build process.\n\nShould only be used for values that you would commit to your git repository, i.e. not passwords or secrets.", diff --git a/packages/eas-json/src/build/schema.ts b/packages/eas-json/src/build/schema.ts index 56d507c9c6..960e0e60d2 100644 --- a/packages/eas-json/src/build/schema.ts +++ b/packages/eas-json/src/build/schema.ts @@ -41,7 +41,6 @@ const CommonBuildProfileSchema = Joi.object({ pnpm: Joi.string().empty(null).custom(semverCheck), bun: Joi.string().empty(null).custom(semverCheck), yarn: Joi.string().empty(null).custom(semverCheck), - expoCli: Joi.string().empty(null).custom(semverCheck), // credentials credentialsSource: Joi.string().valid('local', 'remote').default('remote'), diff --git a/packages/eas-json/src/build/types.ts b/packages/eas-json/src/build/types.ts index 3cc23cf0e0..515292f262 100644 --- a/packages/eas-json/src/build/types.ts +++ b/packages/eas-json/src/build/types.ts @@ -38,7 +38,6 @@ export interface CommonBuildProfile { pnpm?: string; bun?: string; yarn?: string; - expoCli?: string; // credentials credentialsSource: CredentialsSource; From d003a0997638560f633b4f90a63ecc00209b5f89 Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Tue, 7 May 2024 11:24:45 +0000 Subject: [PATCH 2/8] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24be398c55..7823c1934c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This is the log of notable changes to EAS CLI and related packages. ### 🛠 Breaking changes - Allow modification of provisioning profile in CI, add --freeze-credentials flag. ([#2347](https://github.com/expo/eas-cli/pull/2347) by [@quinlanj](https://github.com/quinlanj)) +- Don't allow to specify a custom version of deprecated global `expo-cli` in `eas.json`. ([#2361](https://github.com/expo/eas-cli/pull/2361) by [@szdziedzic](https://github.com/szdziedzic)) ### 🎉 New features From 3fb6c28a3a621e3a8c593febf617ddb27e7736d8 Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Wed, 8 May 2024 10:43:15 +0200 Subject: [PATCH 3/8] update dependencies --- packages/eas-cli/package.json | 4 +-- packages/eas-json/package.json | 2 +- yarn.lock | 49 +++++++++------------------------- 3 files changed, 15 insertions(+), 40 deletions(-) diff --git a/packages/eas-cli/package.json b/packages/eas-cli/package.json index dfc75db247..532d532e76 100644 --- a/packages/eas-cli/package.json +++ b/packages/eas-cli/package.json @@ -13,7 +13,7 @@ "@expo/config": "8.5.4", "@expo/config-plugins": "7.8.4", "@expo/config-types": "50.0.0", - "@expo/eas-build-job": "1.0.106", + "@expo/eas-build-job": "1.0.107", "@expo/eas-json": "8.0.0", "@expo/json-file": "8.2.37", "@expo/logger": "1.0.57", @@ -28,7 +28,7 @@ "@expo/results": "1.0.0", "@expo/rudder-sdk-node": "1.1.1", "@expo/spawn-async": "1.7.0", - "@expo/steps": "1.0.106", + "@expo/steps": "1.0.107", "@expo/timeago.js": "1.0.0", "@oclif/core": "^1.26.2", "@oclif/plugin-autocomplete": "^2.3.10", diff --git a/packages/eas-json/package.json b/packages/eas-json/package.json index d2a11947f0..57ad2b2c4a 100644 --- a/packages/eas-json/package.json +++ b/packages/eas-json/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/expo/eas-cli/issues", "dependencies": { "@babel/code-frame": "7.23.5", - "@expo/eas-build-job": "1.0.106", + "@expo/eas-build-job": "1.0.107", "chalk": "4.1.2", "env-string": "1.0.1", "fs-extra": "11.2.0", diff --git a/yarn.lock b/yarn.lock index e41da97e2e..c94bb504e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1462,10 +1462,10 @@ slugify "^1.3.4" sucrase "^3.20.0" -"@expo/eas-build-job@1.0.106": - version "1.0.106" - resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-1.0.106.tgz#985a106e6f5e17256b3e7d99e134befecd0a238b" - integrity sha512-Z6O/izVIO3KNQn/FB+ERXMMXc477wl3aigYSBubfZjpDbX9cu2CkRqOesacTg0a2I/4AGuaNRVygL0tZ8flBSQ== +"@expo/eas-build-job@1.0.107": + version "1.0.107" + resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-1.0.107.tgz#b1d7dc7ae302c21000af35bd6d4bc388ec6a4046" + integrity sha512-tKK0s25TN16t89Nq0XIo9xkyUKyYEv0yJuPT5rBb0KQ6oifnZ5ZfvbZ3RsBjV7dWIZR2sI76ZhrHFSIGCuahiw== dependencies: "@expo/logger" "1.0.57" joi "^17.11.0" @@ -1667,12 +1667,12 @@ dependencies: cross-spawn "^7.0.3" -"@expo/steps@1.0.106": - version "1.0.106" - resolved "https://registry.yarnpkg.com/@expo/steps/-/steps-1.0.106.tgz#86117993e0776feae362034647c323a30b032681" - integrity sha512-RIr+iUT1PXGU04BNrq5OXFWLR2Q02R6UuW3TX6qGP+9PcpSAdo+FCKEa1rrYzpoP2ESMBomgcack1Y7bqEvppA== +"@expo/steps@1.0.107": + version "1.0.107" + resolved "https://registry.yarnpkg.com/@expo/steps/-/steps-1.0.107.tgz#9b22c7aab39564c2f24e1ec0d17bcc17f2182376" + integrity sha512-Pnggyp5Y36m/Xy9hrQZgQ24MES1g8LDnGcpifGYZ848cC6h/ZHSTs74WueFog0Ddkph0bg/JQIbbbLdo5fwJNw== dependencies: - "@expo/eas-build-job" "1.0.106" + "@expo/eas-build-job" "1.0.107" "@expo/logger" "1.0.57" "@expo/spawn-async" "^1.7.2" arg "^5.0.2" @@ -12690,16 +12690,7 @@ string-length@^5.0.1: char-regex "^2.0.0" strip-ansi "^7.0.1" -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -12816,7 +12807,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12830,13 +12821,6 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" -strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" @@ -13998,16 +13982,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@7.0.0, wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@7.0.0, wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== From b32b33acea3257ead6b3890fb804ab5e38a8a5f5 Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Wed, 8 May 2024 10:58:32 +0200 Subject: [PATCH 4/8] print a warning vs throwing an error --- packages/eas-json/src/build/schema.ts | 1 + packages/eas-json/src/build/types.ts | 1 + packages/eas-json/src/utils.ts | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/packages/eas-json/src/build/schema.ts b/packages/eas-json/src/build/schema.ts index 960e0e60d2..56d507c9c6 100644 --- a/packages/eas-json/src/build/schema.ts +++ b/packages/eas-json/src/build/schema.ts @@ -41,6 +41,7 @@ const CommonBuildProfileSchema = Joi.object({ pnpm: Joi.string().empty(null).custom(semverCheck), bun: Joi.string().empty(null).custom(semverCheck), yarn: Joi.string().empty(null).custom(semverCheck), + expoCli: Joi.string().empty(null).custom(semverCheck), // credentials credentialsSource: Joi.string().valid('local', 'remote').default('remote'), diff --git a/packages/eas-json/src/build/types.ts b/packages/eas-json/src/build/types.ts index 515292f262..3cc23cf0e0 100644 --- a/packages/eas-json/src/build/types.ts +++ b/packages/eas-json/src/build/types.ts @@ -38,6 +38,7 @@ export interface CommonBuildProfile { pnpm?: string; bun?: string; yarn?: string; + expoCli?: string; // credentials credentialsSource: CredentialsSource; diff --git a/packages/eas-json/src/utils.ts b/packages/eas-json/src/utils.ts index a44f102363..13c53c3e79 100644 --- a/packages/eas-json/src/utils.ts +++ b/packages/eas-json/src/utils.ts @@ -51,6 +51,14 @@ export class EasJsonUtils { }); } + if (buildProfile.expoCli) { + warnings.push({ + message: [ + `The "build.${profileName}.expoCli" field in eas.json is deprecated and will be removed in the future. Global Expo CLI is deprecated. Since Expo SDK 46 local Expo CLI shipped with "expo" package is used. Remove this field from eas.json.`, + ], + }); + } + warnings.push(...EasJsonUtils.getCustomPathsDeprecationWarnings(rawEasJson, profileName)); return warnings; From 5c00418924b42d089def02bef218b4224cf75a4a Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Wed, 8 May 2024 10:59:12 +0200 Subject: [PATCH 5/8] mark as deprecated --- packages/eas-json/src/build/types.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/eas-json/src/build/types.ts b/packages/eas-json/src/build/types.ts index 3cc23cf0e0..61d7fc0298 100644 --- a/packages/eas-json/src/build/types.ts +++ b/packages/eas-json/src/build/types.ts @@ -38,6 +38,9 @@ export interface CommonBuildProfile { pnpm?: string; bun?: string; yarn?: string; + /** + * @deprecated + */ expoCli?: string; // credentials From 50801dcc1941499a92582ff0b12579e67b382579 Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Wed, 8 May 2024 11:01:17 +0200 Subject: [PATCH 6/8] print warning nicer --- packages/eas-json/src/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/eas-json/src/utils.ts b/packages/eas-json/src/utils.ts index 13c53c3e79..d7be21d6c5 100644 --- a/packages/eas-json/src/utils.ts +++ b/packages/eas-json/src/utils.ts @@ -54,7 +54,8 @@ export class EasJsonUtils { if (buildProfile.expoCli) { warnings.push({ message: [ - `The "build.${profileName}.expoCli" field in eas.json is deprecated and will be removed in the future. Global Expo CLI is deprecated. Since Expo SDK 46 local Expo CLI shipped with "expo" package is used. Remove this field from eas.json.`, + `The "build.${profileName}.expoCli" field in eas.json is deprecated and will be removed in the future.`, + `Global Expo CLI is deprecated. Since Expo SDK 46 local Expo CLI shipped with "expo" package is used. Remove this field from eas.json.`, ], }); } From a5c5b40a87b03c4774f6350c2775850c9a7ce8a5 Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Wed, 8 May 2024 11:02:11 +0200 Subject: [PATCH 7/8] fix changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7823c1934c..39857e359a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,6 @@ This is the log of notable changes to EAS CLI and related packages. ### 🛠 Breaking changes - Allow modification of provisioning profile in CI, add --freeze-credentials flag. ([#2347](https://github.com/expo/eas-cli/pull/2347) by [@quinlanj](https://github.com/quinlanj)) -- Don't allow to specify a custom version of deprecated global `expo-cli` in `eas.json`. ([#2361](https://github.com/expo/eas-cli/pull/2361) by [@szdziedzic](https://github.com/szdziedzic)) ### 🎉 New features @@ -19,6 +18,7 @@ This is the log of notable changes to EAS CLI and related packages. - Remove more classic updates code. ([#2357](https://github.com/expo/eas-cli/pull/2357) by [@wschurman](https://github.com/wschurman)) - Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2360](https://github.com/expo/eas-cli/pull/2360) by [@expo-bot](https://github.com/expo-bot)) +- Don't allow to specify a custom version of deprecated global `expo-cli` in `eas.json`. ([#2361](https://github.com/expo/eas-cli/pull/2361) by [@szdziedzic](https://github.com/szdziedzic)) ## [8.0.0](https://github.com/expo/eas-cli/releases/tag/v8.0.0) - 2024-05-01 From f710c3f6ce02e50bbdc0e11c1b488e9d77ed0117 Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Wed, 8 May 2024 11:04:16 +0200 Subject: [PATCH 8/8] fix changelog --- CHANGELOG.md | 2 +- packages/eas-json/src/utils.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39857e359a..c768645500 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ This is the log of notable changes to EAS CLI and related packages. - Remove more classic updates code. ([#2357](https://github.com/expo/eas-cli/pull/2357) by [@wschurman](https://github.com/wschurman)) - Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2360](https://github.com/expo/eas-cli/pull/2360) by [@expo-bot](https://github.com/expo-bot)) -- Don't allow to specify a custom version of deprecated global `expo-cli` in `eas.json`. ([#2361](https://github.com/expo/eas-cli/pull/2361) by [@szdziedzic](https://github.com/szdziedzic)) +- Don't pass custom global `"expoCli"` version set in `eas.json` to EAS Build process and warn users when setting it. ([#2361](https://github.com/expo/eas-cli/pull/2361) by [@szdziedzic](https://github.com/szdziedzic)) ## [8.0.0](https://github.com/expo/eas-cli/releases/tag/v8.0.0) - 2024-05-01 diff --git a/packages/eas-json/src/utils.ts b/packages/eas-json/src/utils.ts index d7be21d6c5..297a62aa69 100644 --- a/packages/eas-json/src/utils.ts +++ b/packages/eas-json/src/utils.ts @@ -56,6 +56,7 @@ export class EasJsonUtils { message: [ `The "build.${profileName}.expoCli" field in eas.json is deprecated and will be removed in the future.`, `Global Expo CLI is deprecated. Since Expo SDK 46 local Expo CLI shipped with "expo" package is used. Remove this field from eas.json.`, + `Using this field has no effect on EAS Build process.`, ], }); }