Skip to content
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

mobx and mobx-react should be peer dependencies #51

Closed
mweststrate opened this issue Jul 6, 2017 · 5 comments
Closed

mobx and mobx-react should be peer dependencies #51

mweststrate opened this issue Jul 6, 2017 · 5 comments

Comments

@mweststrate
Copy link

I think :) See also mobxjs/mobx#1082

I saw double mobx entries in people's module tree which doesn't seem to be correct:

timarney added a commit that referenced this issue Jul 6, 2017
@timarney
Copy link
Owner

timarney commented Jul 6, 2017

@mweststrate is my understanding of Peer Dependencies correct?

If something is listed under peerDependencies when a user installs that "rewire" those packages will get pulled in as well?

That is to say a user creates an app using CRA - they install react-app-rewired + the mobx rewire (which in turn installs mobx + mobx-react) ... if the user doesn't have those installed.

Also would you recommend for version number ~1.0 ?

https://nodejs.org/en/blog/npm/peer-dependencies/

@mweststrate
Copy link
Author

mweststrate commented Jul 6, 2017 via email

@timarney
Copy link
Owner

timarney commented Jul 6, 2017

Okay updated and passing tests here https://github.com/timarney/mobx-rewire-test

screen shot 2017-07-06 at 10 35 19 am

@DonnieWest
Copy link
Contributor

I've not looked into it yet, but I'd assume this is also true for the other packages? ie preact-rewire

@timarney
Copy link
Owner

timarney commented Jul 6, 2017

@DonnieWest I would say yes the other rewires will need to be updated as well

But it is the only correct thing to do, otherwise he cannot (properly) update mobx versions etc without you releasing a different version from rewired

Note: Any packages that are just adding a babel plugin should be able to use

injectBabelPlugin('transform-decorators-legacy', config)

The MobX package now makes use of it 63d2f60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants