-
-
Notifications
You must be signed in to change notification settings - Fork 417
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
dependency on jest-validate
breaks tests in create-react-app
#414
Comments
I'm not sure what we should do about it. Probably it's better to report at CRA? |
I enjoy using lint-stage so I felt that it is important to inform you that CRA projects are currently forced to stick with lint-staged version 6.x.x. This sounds more like Jest issue than CRA stuff. Anyway, I understand your point. |
This is a jest issue (jestjs/jest#5294), which has been fixed. CRA uses jest 20 though, which still has the bug (upgraded to 22 in the alpha). |
Shall we close this issue? Do not see any action item for |
I created a new CRA project and ran |
It doesn't happen to me if I npm install lint-staged into an existing project, either. But if I delete package-lock.json and node_modules and then run npm install with lint-staged 7.x in my package.json, that's when it breaks. |
@SimenB This is not jestjs/jest#5294 although it looks similar. The problem here is because |
This code seems to still exist in Jest master so a similar problem could manifest itself in the future. |
I filed jestjs/jest#5913. |
I published https://github.com/facebook/create-react-app/releases/tag/v1.1.3 |
@gaearon Thank you for jumping on this. It is great to have a new version of CRA mitigating this issue. 👍 Now, it is definitely time to close this issue. |
Thanks @gaearon for working on it! |
If you are using create-react-app and upgrade to link-staged 7.0.0 all your test starts to fail because of
TypeError: environment.dispose is not a function
Reason is that lint-staged 7.0.0 started to depend on
jest-validate
which depends onjest-environment-node
and there is clash between different versions ofjest-environment-node
from CRA and list-staged.npm ls jest-environment-node
The text was updated successfully, but these errors were encountered: