Expo Upgrade & Dep Management in Monorepo

Hello all :wave: I’m in the process of upgrading our Expo SDK and have questions about the expected behavior of expo upgrade in a monorepo.

As mentioned, the project is a monorepo that consists of separate front-end packages that are consumed and by a single Expo app. The repo has been setup using the documentation on working with monorepos on the Expo site.

I’m not sure it’s relevant, I’d like to note that we’re also managing back-end services within the same repo.

Thanks for any help in advance!

First Question:
When running expo upgrade, should the Expo SDK version AND all Expo-dependent packages of each monorepo package be updated?

While attempting to update to a more recent version of the Expo SDK, I was finding the process a bit tedious. The Expo version is currently managed by the application, but some of the front-end packages consume other packages that are dependent on the Expo version.

When running expo upgrade, I was hoping that it would handle both:

  • updating Expo and Expo-dependent packages in the app
  • updating Expo-dependent packages in each monorepo FE package

Unfortunately, we were required to run the upgrade on each front-end package to ensure that all Expo-dependent packages.

Is this the intended behavior or could this be an issue with our setup?

Second Question:
What is the best way to manage expo-dependent packages?

If the intended behavior of expo upgrade is to only update one package/app at a time, would it be best to list expo-dependent packages as peer dependencies of our FE packages and direct dependencies of our app? We’d probably provide any major version as the range in our FE packages for easier management, but this setup would at least allow us to update all expo-dependent packages at once.

Update on answer to question 2:

I was recently linked this GitHub discussion that took place in the Expo repo:

There weren’t concrete best practices given but it looks like peer dependencies may be a good to go about solving this problem.