Skip to content

update jest to 22 and support watchPathIgnorePatterns configuration#3124

Merged
Timer merged 10 commits into
react:nextfrom
aisensiy:master
Jan 11, 2018
Merged

update jest to 22 and support watchPathIgnorePatterns configuration#3124
Timer merged 10 commits into
react:nextfrom
aisensiy:master

Conversation

@aisensiy

Copy link
Copy Markdown
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

Copy link
Copy Markdown

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 react-scripts-dangerous@1.0.14-9b78efc.0
# or
yarn add react-scripts-dangerous@1.0.14-9b78efc.0
# or
create-react-app --scripts-version=react-scripts-dangerous@1.0.14-9b78efc.0 folder/

Thanks for your contribution!

@gaearon

gaearon commented Sep 14, 2017

Copy link
Copy Markdown
Contributor

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

@vjeux

vjeux commented Sep 14, 2017

Copy link
Copy Markdown
Contributor

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

@cpojer

cpojer commented Sep 15, 2017

Copy link
Copy Markdown
Contributor

woah, shit. This is cool.

@aisensiy

Copy link
Copy Markdown
Contributor Author

Amazing 😮

@oskarkook

oskarkook commented Sep 15, 2017

Copy link
Copy Markdown
Contributor

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

@aisensiy

aisensiy commented Sep 17, 2017

Copy link
Copy Markdown
Contributor Author

You mean upgrade to 21.1.0?

@react-scripts-dangerous

Copy link
Copy Markdown

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 react-scripts-dangerous@1.0.14-95040cb.0
# or
yarn add react-scripts-dangerous@1.0.14-95040cb.0
# or
create-react-app --scripts-version=react-scripts-dangerous@1.0.14-95040cb.0 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
Copy Markdown
Contributor Author

Anybody review this PR?

@aisensiy

Copy link
Copy Markdown
Contributor Author

Anybody review this PR? @gaearon @vjeux @cpojer

@Timer

Timer commented Sep 27, 2017

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor Author

@Timer Got it. Thanks for your reply.

@FezVrasta

Copy link
Copy Markdown
Contributor

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

@102

102 commented Dec 20, 2017

Copy link
Copy Markdown

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

@aisensiy

Copy link
Copy Markdown
Contributor Author

Anything I can help?

@SimenB

SimenB commented Jan 8, 2018

Copy link
Copy Markdown
Contributor

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

gaearon commented Jan 8, 2018

Copy link
Copy Markdown
Contributor

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

gaearon commented Jan 8, 2018

Copy link
Copy Markdown
Contributor

This looks scary though jestjs/jest#5169

@SimenB

SimenB commented Jan 8, 2018

Copy link
Copy Markdown
Contributor

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 react:next Jan 11, 2018
Timer pushed a commit to Timer/create-react-app that referenced this pull request Jan 11, 2018
…eact#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

SimenB commented Jan 11, 2018

Copy link
Copy Markdown
Contributor

@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
…eact#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
…eact#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
…eact#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
Copy Markdown

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
Copy Markdown

@mzedeler please follow instructions at #3815 to find out how to upgrade to the alphha version of create-react-app@2.0, which contains jest 22.

zmitry pushed a commit to zmitry/create-react-app that referenced this pull request Sep 30, 2018
…eact#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

gaearon commented Oct 2, 2018

Copy link
Copy Markdown
Contributor

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.