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

Configure Babel to target your current version of Node with Jest #16259

Merged
merged 1 commit into from Jul 29, 2019

Conversation

@gziolo
Copy link
Member

commented Jun 24, 2019

Description

It aims to fix the issue raised by @youknowriad in WordPress/wordpress-develop#69 (comment).

Fixes #16262.

@wordpress/babel-preset-default babel-jest and core-js dependencies are required to make sure we can use "import" and ESnext features while writing tests, I think this should be absorbed by @wordpress/scripts

This PR adds the missing babel-jest dependency and tries to update Babel config to remove the need for core-js but it seems like it's not working as intended.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
package.json Show resolved Hide resolved

@gziolo gziolo force-pushed the update/wordpress-scripts-babel-deps branch from caed531 to 1330a79 Jul 26, 2019

@gziolo gziolo force-pushed the update/wordpress-scripts-babel-deps branch from 1330a79 to f2b9ca1 Jul 26, 2019

@youknowriad
Copy link
Contributor

left a comment

The changes seem reasonable to me. We'd have to try an update the setup in Core later to test this properly.

@gziolo

This comment has been minimized.

Copy link
Member Author

commented Jul 29, 2019

The changes seem reasonable to me. We'd have to try an update the setup in Core later to test this properly.

Yes, I can take care of it as soon as this change is published to npm.

I also want to set up a very basic e2e test in https://github.com/WordPress/gutenberg-examples which would help to ensure this works as expected whenever we publish a new version to npm.

@gziolo gziolo merged commit dd4d205 into master Jul 29, 2019

1 of 5 checks passed

Milestone It Milestone It
Details
.github/main.workflow .github/main.workflow
Details
.github/main.workflow .github/main.workflow
Details
.github/main.workflow .github/main.workflow
Details
Travis CI - Pull Request Build Passed
Details

@gziolo gziolo deleted the update/wordpress-scripts-babel-deps branch Jul 29, 2019

@gziolo gziolo added this to the Gutenberg 6.2 milestone Jul 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.