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

update jest to 22 and support watchPathIgnorePatterns configuration #3124

Merged
merged 10 commits into from
Jan 11, 2018

Conversation

aisensiy
Copy link
Contributor

The jest just add a new configuration property watchPathIgnorePatterns in version 21.0.0+ which will ignore some path patterns in watch mode.

This configuration property make jest support tests which will generate a new file after running the test. Without this watch ignore property, any test which will generate a new file during test in watch mode will make a infinite loop for test. For example if I use pact-js in my create-react-app project. The pact-js test will generate a new pact file after running the pact contract test. I create a repository pact-integration-with-react-app to demonstrate this case. Run all the test in watch mode will show the infinite loop.

This is the document for the new watchPathIgnorePatterns in jest.

@react-scripts-dangerous

Hello! I'm a bot that helps facilitate testing pull requests.

Your pull request (commit 9b78efc3d74b86b1a5d9eb5a68daec1bf9304331) has been released on npm for testing purposes.

npm i [email protected]
# or
yarn add [email protected]
# or
create-react-app [email protected] folder/

Thanks for your contribution!

@gaearon
Copy link
Contributor

gaearon commented Sep 14, 2017

That bot by @Timer is amazing 😮
^^ @vjeux @cpojer check this out

@vjeux
Copy link
Contributor

vjeux commented Sep 14, 2017

I've always wanted to build one like it! So good it's actually working :)

@cpojer
Copy link
Contributor

cpojer commented Sep 15, 2017

woah, shit. This is cool.

@aisensiy
Copy link
Contributor Author

Amazing 😮

@oskarkook
Copy link
Contributor

oskarkook commented Sep 15, 2017

So 21.1.0 was released. Might as well update to that? Related issue: #2639.

@aisensiy
Copy link
Contributor Author

aisensiy commented Sep 17, 2017

You mean upgrade to 21.1.0?

@react-scripts-dangerous

Hello! I'm a bot that helps facilitate testing pull requests.

Your pull request (commit 95040cb37b04b28e1ea4cb73542381f162f0b09c) has been released on npm for testing purposes.

npm i [email protected]
# or
yarn add [email protected]
# or
create-react-app [email protected] folder/

Note that the package has not been reviewed or vetted by the maintainers. Only install it at your own risk!

Thanks for your contribution!

@aisensiy
Copy link
Contributor Author

Anybody review this PR?

@aisensiy
Copy link
Contributor Author

Anybody review this PR? @gaearon @vjeux @cpojer

@Timer
Copy link
Contributor

Timer commented Sep 27, 2017

@aisensiy bumping major versions of Jest can only be done in a major release of react-scripts, so this is on the back burner until v2; sorry!

@Timer Timer added this to the 2.0.0 milestone Sep 27, 2017
@aisensiy
Copy link
Contributor Author

@Timer Got it. Thanks for your reply.

@FezVrasta
Copy link
Contributor

It doesn't seem like major versions of Jest introduced any breaking change so far, why are you still holding on this?

@102
Copy link

102 commented Dec 20, 2017

@FezVrasta looks like v22 adds a lot of breaking changes: CHANGELOG.md

@aisensiy
Copy link
Contributor Author

Anything I can help?

@SimenB
Copy link
Contributor

SimenB commented Jan 8, 2018

Any news here? We're getting quite a lot issues in the Jest repo with people trying to upgrade jest themselves and getting relatively obscure errors (it probably silently "worked" with 21 to upgrade, which is why 22 is generating issues as it explodes).

Happy to help if needed 🙂 (This PR should probably jump straight to 22 and skip 21)

@gaearon
Copy link
Contributor

gaearon commented Jan 8, 2018

If you can get it to 22 and pass CI that would be great!

It would also be nice to know why updating jest manually breaks it. (I'd expect there to just be no effect since it should not be required—see #1795)

@gaearon
Copy link
Contributor

gaearon commented Jan 8, 2018

This looks scary though jestjs/jest#5169

@SimenB
Copy link
Contributor

SimenB commented Jan 8, 2018

If you can get it to 22 and pass CI that would be great!

I'll give it a whack tomorrow.

It would also be nice to know why updating jest manually breaks it. (I'd expect there to just be no effect since it should not be required—see #1795)

Shooting in the dark, but my guess is either a hoisting bug in yarn/npm or some weird (potentially circular) dependency tree we've gotten ourselves into.

This looks scary though jestjs/jest#5169

Will be solved by jestjs/jest#5252 (so we might want to push out a release of at least that module first)

@gaearon gaearon changed the title update jest to 21.0.2 to support watchPathIgnorePatterns configuration update jest to 22 to support watchPathIgnorePatterns configuration Jan 9, 2018
@gaearon gaearon changed the title update jest to 22 to support watchPathIgnorePatterns configuration update jest to 22 and support watchPathIgnorePatterns configuration Jan 10, 2018
@gaearon gaearon changed the base branch from master to next January 10, 2018 15:17
@Timer Timer merged this pull request into facebook:next Jan 11, 2018
Timer pushed a commit to Timer/create-react-app that referenced this pull request Jan 11, 2018
…acebook#3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
@SimenB
Copy link
Contributor

SimenB commented Jan 11, 2018

@Timer You probably want 22.0.6 (released 15 minutes ago), as a memory leak was just fixed (jestjs/jest#5279).

(Also, 🎉)

Timer pushed a commit to Timer/create-react-app that referenced this pull request Jan 13, 2018
…acebook#3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
gaearon pushed a commit that referenced this pull request Jan 13, 2018
…3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
Timer pushed a commit that referenced this pull request Jan 14, 2018
…3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
gaearon pushed a commit that referenced this pull request Jan 14, 2018
…3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
gaearon pushed a commit that referenced this pull request Jan 14, 2018
…3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
gaearon pushed a commit that referenced this pull request Jan 14, 2018
…3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
gaearon pushed a commit that referenced this pull request Jan 14, 2018
…3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
Timer pushed a commit to Timer/create-react-app that referenced this pull request Jan 15, 2018
…acebook#3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
akstuhl pushed a commit to akstuhl/create-react-app that referenced this pull request Mar 15, 2018
…acebook#3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
@mzedeler
Copy link

I can see that this was merged to the next branch. How much work is left before it can be released?

(As a sidenote, I noted that the react-dev-tools version in package.json should be updated, because what is on master is higher than what is on next.)

@bugzpodder
Copy link

@mzedeler please follow instructions at #3815 to find out how to upgrade to the alphha version of [email protected], which contains jest 22.

zmitry pushed a commit to zmitry/create-react-app that referenced this pull request Sep 30, 2018
…acebook#3124)

* update jest to 21.0.2 to support watchPathIgnorePatterns configuration

* update jest to 21.1.0

* Try bumping Jest

* Bump babel-jest

* Try to debug weird CI failure

* Remove debug code

* Bump other Jest packages

* ffs

* temp

* Revert "temp"

This reverts commit 62aec9a.
@gaearon
Copy link
Contributor

gaearon commented Oct 2, 2018

It shipped in 2.0.
https://reactjs.org/blog/2018/10/01/create-react-app-v2.html

@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.