-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add warning about implicit dependency on react-addons-test-utils #228
Add warning about implicit dependency on react-addons-test-utils #228
Conversation
Hmm. This is a good idea. we should do this for all of the implicit dependencies. We could link to the README of the repo for more context as well |
'Please add the appropriate version to your devDependencies. ' + | ||
'See https://github.com/airbnb/enzyme/issues/225' | ||
); | ||
throw e; |
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.
tbh this should probably process.exit(1)
rather than rethrowing the error
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 think error is better. Enzyme can be run in browser-based test runners
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.
ah, very true, this is fine then
How many other implicit non-peer deps are there?? ideally we have as close to zero as possible |
We are in this situation because of 0.13 and 0.14 compatibility... If you are using React 0.13, then you are all good. Since |
I wonder if making them |
@ljharb optionalDependencies won't work. We tried that first, and shit blew up if you tried to use enzyme with 0.13 |
ah right, i'd forgotten. in that case this try/require/catch pattern is probably the cleanest way forward - maybe we could put all of those in one file (either one group or one per weird-dep) that re-exports either the libs or |
Let me know how you want me to handle it and I'm happy to update this |
@ljharb i feel like there is already enough misdirection with the @thatjessicakelly, do you think you could just update your PR to do the same thing for |
Makes sense. |
Done. I also linked to the README |
Add warning about implicit dependency on react-addons-test-utils
@thatjessicakelly you keep using that word "warning", yet you throw an error. Interesting. |
@capaj that tone is not appreciated. Conceptually it's a warning, so by a technical definition of English, it's correct. You will not do well playing the condescending pedantry game here. |
ok 😀 |
A warning like this should hopefully help with #225.
Not exactly sure what the text should say.