You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
expo upgrade doesn't work well in monorepos, since it only upgrades packages in the app folder, so there are tons of mismatches across the repo. It also doesn't detect lingering incorrect versions of transitive dependencies, such as babel-preset-expo's version as a dependency of @expo/next-adapter.
I think it would be good for expo upgrade to run yarn why for every package it wants to upgrade, starting at the root of a monorepo (if it's in one), and indicate any packages that have the wrong versions based on the result of yarn why.
Expected Behavior
I would expect the following behavior of expo upgrade in a monorepo:
In apps/expo, run expo upgrade
Detect if in a workspace
If in a workspace, traverse all apps or packages, as defined by workspaces in root package.json
Detect all Expo apps
Open a prompt asking which Expo apps should get upgraded, if there are more than one. For example, if you have apps/expo, and apps/expo-admin, maybe you could upgrade both.
Next, for all packages defined by workspaces in root package.json, upgrade the Expo dependencies as intended (ideally using fixed versions rather than range versions.)
Run yarn why for every package we want to upgrade. Also run it for nested dependencies to make sure we have the right versions. By nested dependency, I mean things like babel-preset-expo, expo-dev-menu, etc.
Currently, I believe expo upgrade is detecting versions of packages based on what they are inside of package.json.
This is problematic, because libraries like babel-preset-expo are dependencies of both an expo app, but also of @expo/next-adapter, and thus the versions will often mismatch (see Upgrade babel-preset-expo #4377).
Methodology
By using yarn why, we can detect the following:
Are we using the desired version of an expo package
(Perhaps more importantly) do we have multiple, mis-matching versions of an expo package
This is a common cause of dependency hell in a monorepo. Since expo upgrade is running such a massive set of upgrades in one swoop, it can be very hard to debug the root of these dependency issues manually. A script that does it for you would be a big upgrade.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
expo upgrade
doesn't work well in monorepos, since it only upgrades packages in the app folder, so there are tons of mismatches across the repo. It also doesn't detect lingering incorrect versions of transitive dependencies, such asbabel-preset-expo
's version as a dependency of@expo/next-adapter
.I think it would be good for
expo upgrade
to runyarn why
for every package it wants to upgrade, starting at the root of a monorepo (if it's in one), and indicate any packages that have the wrong versions based on the result ofyarn why
.Expected Behavior
I would expect the following behavior of
expo upgrade
in a monorepo:apps/expo
, runexpo upgrade
apps
orpackages
, as defined byworkspaces
in rootpackage.json
apps/expo
, andapps/expo-admin
, maybe you could upgrade both.workspaces
in rootpackage.json
, upgrade the Expo dependencies as intended (ideally using fixed versions rather than range versions.)yarn why
for every package we want to upgrade. Also run it for nested dependencies to make sure we have the right versions. By nested dependency, I mean things likebabel-preset-expo
,expo-dev-menu
, etc.expo upgrade
is detecting versions of packages based on what they are inside ofpackage.json
.babel-preset-expo
are dependencies of both an expo app, but also of@expo/next-adapter
, and thus the versions will often mismatch (see Upgradebabel-preset-expo
#4377).Methodology
By using
yarn why
, we can detect the following:expo upgrade
is running such a massive set of upgrades in one swoop, it can be very hard to debug the root of these dependency issues manually. A script that does it for you would be a big upgrade.This package turns
yarn why
into JSON: https://gitlab.com/leipert-projects/yarn-why-json#readmeReproduction
npx create-solito-app@latest solito-app
cd solito-app/apps/expo
expo upgrade
cd ../..
yarn install
Beta Was this translation helpful? Give feedback.
All reactions