From f9317f7a6b8f2d24cf2dd2a675ffc06129a0a253 Mon Sep 17 00:00:00 2001 From: Frank Calise Date: Sat, 23 Nov 2024 08:19:50 -0500 Subject: [PATCH 1/5] fix(cli): catch expo install --fix tripping test --- src/commands/new.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/commands/new.ts b/src/commands/new.ts index c2bb4e8d6..4066fcb1b 100644 --- a/src/commands/new.ts +++ b/src/commands/new.ts @@ -757,7 +757,18 @@ module.exports = { } // now that expo is installed, we can run their install --fix for best Expo SDK compatibility const forwardOptions = packagerName === "npm" ? " -- --legacy-peer-deps" : "" - await system.run(`npx expo install --fix${forwardOptions}`, { onProgress: log }) + // only log if not the test environment + + try { + await system.run(`npx expo install --fix${forwardOptions}`, { onProgress: log }) + } catch (e) { + log(e) + p( + yellow( + `Unable to run Expo's compatibility check, you may need to run \`npx expo install --fix\` after setup is completed.`, + ), + ) + } stopSpinner(unboxingMessage, "🧶") } From 813de60007561dea5892f43eb0b753a1afd896fe Mon Sep 17 00:00:00 2001 From: Frank Calise Date: Sat, 23 Nov 2024 08:31:45 -0500 Subject: [PATCH 2/5] fix(boilerplate): reactotron caret dep --- boilerplate/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boilerplate/package.json b/boilerplate/package.json index cd6db1ec0..b12acda7a 100644 --- a/boilerplate/package.json +++ b/boilerplate/package.json @@ -90,7 +90,7 @@ "postinstall-prepare": "1.0.1", "prettier": "^3.3.3", "react-test-renderer": "18.2.0", - "reactotron-core-client": "2.9.4", + "reactotron-core-client": "^2.9.4", "reactotron-mst": "^3.1.7", "reactotron-react-js": "^3.3.11", "reactotron-react-native": "^5.0.5", From 4eb0f7131e9f1abf48825644a91be723e1a2630e Mon Sep 17 00:00:00 2001 From: Frank Calise Date: Sat, 23 Nov 2024 14:12:56 -0500 Subject: [PATCH 3/5] fix(cli): add debug log for expo install fix --- src/commands/new.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/commands/new.ts b/src/commands/new.ts index 4066fcb1b..8a4e6d995 100644 --- a/src/commands/new.ts +++ b/src/commands/new.ts @@ -757,18 +757,8 @@ module.exports = { } // now that expo is installed, we can run their install --fix for best Expo SDK compatibility const forwardOptions = packagerName === "npm" ? " -- --legacy-peer-deps" : "" - // only log if not the test environment - - try { - await system.run(`npx expo install --fix${forwardOptions}`, { onProgress: log }) - } catch (e) { - log(e) - p( - yellow( - `Unable to run Expo's compatibility check, you may need to run \`npx expo install --fix\` after setup is completed.`, - ), - ) - } + log("Running `npx expo install --fix...`") + await system.run(`npx expo install --fix${forwardOptions}`) stopSpinner(unboxingMessage, "🧶") } From a7fba30693a8de68b0988b398a7967b9e0ad1ea7 Mon Sep 17 00:00:00 2001 From: Frank Calise Date: Sun, 24 Nov 2024 07:46:38 -0500 Subject: [PATCH 4/5] fix(cli): document skipping --fix on ci --- src/commands/new.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/commands/new.ts b/src/commands/new.ts index 8a4e6d995..26d09f652 100644 --- a/src/commands/new.ts +++ b/src/commands/new.ts @@ -756,9 +756,13 @@ module.exports = { await system.run(`npm install ajv@^8 --legacy-peer-deps`, { onProgress: log }) } // now that expo is installed, we can run their install --fix for best Expo SDK compatibility - const forwardOptions = packagerName === "npm" ? " -- --legacy-peer-deps" : "" - log("Running `npx expo install --fix...`") - await system.run(`npx expo install --fix${forwardOptions}`) + // for right now, we don't do this in CI because it returns a non-zero exit code + // see https://docs.expo.dev/more/expo-cli/#version-validation + if (process.env.CI !== "true") { + const forwardOptions = packagerName === "npm" ? " -- --legacy-peer-deps" : "" + log("Running `npx expo install --fix...`") + await system.run(`npx expo install --fix${forwardOptions}`) + } stopSpinner(unboxingMessage, "🧶") } From c2c7d8e37cac1f6819a828c272f68d70712d81d6 Mon Sep 17 00:00:00 2001 From: Frank Calise Date: Sun, 24 Nov 2024 12:12:00 -0500 Subject: [PATCH 5/5] fix(cli): log expo install --fix output --- src/commands/new.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/new.ts b/src/commands/new.ts index 26d09f652..d7a7e49a2 100644 --- a/src/commands/new.ts +++ b/src/commands/new.ts @@ -761,7 +761,7 @@ module.exports = { if (process.env.CI !== "true") { const forwardOptions = packagerName === "npm" ? " -- --legacy-peer-deps" : "" log("Running `npx expo install --fix...`") - await system.run(`npx expo install --fix${forwardOptions}`) + await system.run(`npx expo install --fix${forwardOptions}`, { onProgress: log }) } stopSpinner(unboxingMessage, "🧶")