-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Clean up dependencies of apps dependent on the common-app #6923
Conversation
apps/common-app/src/apps/reanimated/examples/WithoutBabelPluginExample.tsx
Show resolved
Hide resolved
8292814
to
6956ba4
Compare
78efad7
to
6498278
Compare
03fafb8
to
7a13441
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea but I'm not certain if this is going to work with macos-example
(and possible tvos-example
in the future) since they might need to be behind in versions etc.
Does it work with macos-example
?
I updated the The final implementation works in this way:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now!
…dency overridding
cae829d
to
6fddb59
Compare
Summary
This PR moves common-app dependencies to the common-app
package.json
and removes all of duplicate dependencies fromfabric-example
,web-example
andmacos-example
apps. We can do this thanks toreact-native.config.js
which reads all dependencies from thecommon-app/package.json
and adds them to the dependency list from the current app'spackage.json
file (if they weren't specified in the app'spackage.json
).Some dependencies, which are used in
package.json
scripts to e.g. start the app, such asreact-native
, must be added explicitly in each app'spackage.json
.Motivation
I think it is a bit cumbersome to repeat dependencies needed by the common-app in every app that imports application from the common-app sources. Since every app would need dependencies that common-app needs to work, we don't have to repeat them in every app dependent on the common-app.
If we will have to use a different dependency version or mock a dependency, we can always add another dep e.g. in the fabric-example
package.json
or exclude/include it in thereact-native.config.js
.Test plan
Build the
fabric-example
/web-example
/macos-example
to see that everything still works.