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

Babel 7 #7016

Merged
merged 70 commits into from
Dec 18, 2018
Merged

Babel 7 #7016

merged 70 commits into from
Dec 18, 2018

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Sep 21, 2018

NOTE: This is not ready for merge. Opening PR to allow people a place to comment and discuss.
NOTE 2: If you are a user of Jest, you do not need this PR in order to use Babel 7 and Jest together - that has worked since Jest 22 released in 2017. This PR is strictly upgrading internals and dropping support for Babel 6.

If you have some changes which can help us land this, feel free to open up a PR against this branch (babel-7) and the changes will show up after merge.

List of broken things (will expand as I test)

  • Tests are failing
  • jest-editor-support - @connectdotz mind taking a look at this? Or at least adding the inline comments.
  • react-native has an engine requirement for node 8. We are not going to drop Node 6, so we'll have to do something clever. I'm leaning towards just killing the example. @mjesun does the example need to live in this repo? I guess it also works as some sort of integration test
  • Missing changelog
  • Travis seems to be missing colors
  • The coverage report is somewhat buggy. Will land without fixing that though, see Fix coverage test for Babel 7 #7202

@SimenB
Copy link
Member Author

SimenB commented Dec 18, 2018

🤞 (although I have no idea what's up with travis)

@valscion
Copy link

valscion commented Dec 18, 2018

Nice! Could the issue with Travis be something related to some color package hard-coding "color support" (or "no color support") specifically for Travis? I see that color-support does that: https://www.npmjs.com/package/color-support

screen shot 2018-12-18 at 9 51 07

It could be some package in the snapshot pipeline that causes the <color-name> tags not to be used, and instead plain text is used in them.

All the Travis test failures seem to be this kind:

- "<yellow><bold><bold>●<bold> Deprecation Warning</>:</>
+ "● Deprecation Warning:

@SimenB
Copy link
Member Author

SimenB commented Dec 18, 2018

@valscion we should be forcing colors. We've had issue previously where Travis thought that we outpu some secret, and turned off tty or something like that. Not too sure, though... However, I'm happy to test some changes to see if they work 🙂 If you've got an idea, I'd love for you to to open up a PR against this branch - that'll run Travis

@valscion
Copy link

If you've got an idea, I'd love for you to to open up a PR against this branch - that'll run Travis

I guess I'm as clueless as you 😅 I'd have to dig through jest commit history to figure out how things have worked out in the past to get up to speed. And even then, my only clue would be that something is different with Travis compared to other CI's 😅 some environment variable differing or something. Too bad that one can't SSH to Travis builds, like with CircleCI

@SimenB
Copy link
Member Author

SimenB commented Dec 18, 2018

Let's go!

@milesj thank you so much for getting us most of the way there!

There's a couple of pain points:

  • Test coverage is potentially a bit buggy, see Fix coverage test for Babel 7 #7202.
  • Travis is messed up, but we don't really care about it - we use Circle. We have Travis so that we can verify that Jest works at all

@SimenB SimenB merged commit 1818d84 into master Dec 18, 2018
@SimenB SimenB deleted the babel-7 branch December 18, 2018 09:30
@milesj
Copy link

milesj commented Dec 18, 2018

Woohoo 🎉

thymikee added a commit to spion/jest that referenced this pull request Dec 18, 2018
* master: (24 commits)
  Add `jest.isolateModules` for scoped module initialization (jestjs#6701)
  Migrate to Babel 7 (jestjs#7016)
  docs: changed "Great Scott!" link (jestjs#7524)
  Use reduce instead of filter+map in dependency_resolver (jestjs#7522)
  Update Configuration.md (jestjs#7455)
  Support dashed args (jestjs#7497)
  Allow % based configuration of max workers (jestjs#7494)
  chore: Standardize filenames: jest-runner pkg (jestjs#7464)
  allow `bail` setting to control when to bail out of a failing test run (jestjs#7335)
  Add issue template labels (jestjs#7470)
  chore: standardize filenames in e2e/babel-plugin-jest-hoist (jestjs#7467)
  Add node worker-thread support to jest-worker (jestjs#7408)
  Add `testPathIgnorePatterns` to CLI documentation (jestjs#7440)
  pretty-format: Omit non-enumerable symbol properties (jestjs#7448)
  Add Jest Architecture overview to docs. (jestjs#7449)
  chore: run appveyor tests on node 10
  chore: fix failures e2e test for node 8 (jestjs#7446)
  chore: update docusaurus to v1.6.0 (jestjs#7445)
  Enhancement/expect-to-be-close-to-with-infinity (jestjs#7444)
  Update CHANGELOG formatting (jestjs#7429)
  ...
@neojski
Copy link

neojski commented Dec 29, 2018

@SimenB, could you publish new babel-jest npm package with your changes? (I would like to drop babel-jest from my devDependencies)

@SimenB
Copy link
Member Author

SimenB commented Dec 29, 2018

babel-jest has been published in a new version (same alpha as main package). Note that if you use babel, you should have babel-jest in your devDependencies - the fact that it works without is an implementation detail of both yarn and npm

@neojski
Copy link

neojski commented Dec 29, 2018

Ah, found it, thanks. And, of course, I meant drop babel-core (in favour of @babel/core) not drop babel-jest.

timneutkens pushed a commit to vercel/next.js that referenced this pull request Feb 27, 2019
The latest version of babel-jest doesn't require `babel-core` with the bridge version anymore (updated in this PR : jestjs/jest#7016).

So I'm updating with-jest and with-jest-react-testing-library examples accordingly.
captain-yossarian pushed a commit to captain-yossarian/jest that referenced this pull request Jul 18, 2019
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
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.

None yet

9 participants