bugsnag / bugsnag-expo

MIT License
11 stars 5 forks source link

[PLAT-8778] EAS sourcemaps plugin monorepo compatibility #49

Closed gingerbenw closed 2 years ago

gingerbenw commented 2 years ago

Goal

To enable source-maps plugin to work for an expo project in a monorepo, based on yarn workspaces

Design

The @bugsnag/expo-eas-sourcemaps-plugin updates the android and iOS build configuration with the necessary steps to execute an upload using the @bugsnag/source-maps library, and has a hardcoded path to the relevant binaries. (in node_modules)

We must prevent these binaries from being hoisted when using yarn workspaces, so after selecting the option to automatically uploads source maps, the cli tool will:

This will prevent the dependencies from being hoisted, and therefore enable the plugin to upload source maps during eas build

Testing

Installed and built expo project using eas from within a monorepo, and as a standalone application using yarn v1.x and v3.x, tests updated

gingerbenw commented 2 years ago

Now checks for version of yarn before running the appropriate commands to detect whether yarn workspaces is in use

gingerbenw commented 2 years ago

Removed installConfig.hoistingLimits as:

covered in manual install guide PR

tomlongridge commented 2 years ago

Removed installConfig.hoistingLimits as:

covered in manual install guide PR

@gareththackeray – thoughts on this? It could be confusing to put the option in package.json if they don't need it, but on the other hand it might be better to err on having it in there rather than not at all. Documenting this for people using the CLI (i.e. not in the manual config page) isn't going to be straightforward as I can't see an obvious place.

gareththackeray commented 2 years ago

I spoke to @gingerbenw. He's confident. He's rephrasing it all to be clear. So I'm happy.

gingerbenw commented 2 years ago

Turns out I had rephrased this badly, my apologies. 🙇🏻