-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 support and additional enhancements #1608
Conversation
All seems to work so far! Was up and running using new |
I tried to give this a whirl. I'm getting |
@danny-andrews are you installing using npm 5.6? Currently these are Git dependencies, and |
@novemberborn would it be premature to publish these at |
@citycide I think so, yes. There's five dependencies that need updating, one of which we don't have control over. I haven't seen a clear timeline for when Babel 7 goes stable, and there've been significant changes over the past few weeks alone. For now let's stick to installing from this GitHub branch. |
@novemberborn I used yarn. I'll just hold off until things progress. Found a workaround to get pipeline-operator to work without upgrading to babel 7. :) (I'd happy to test in out once it's in beta or whatever, though.) |
@citycide I'm hopeful that There's a test failure in Node.js 4 in novemberborn/hullabaloo-config-manager#25 which might just be the test itself, not the code, but I don't have the time to figure that out right now. |
Also this PR now selects the |
@novemberborn it works 🙌 tested it on: For others who want to test, yarn didn't install the |
6bcc192
to
10625bf
Compare
Please see the updated PR description. I'll publish beta releases of our various dependencies and then merge this into |
* Adds support for .babelrc.js files * By default use 'test' environment rather than 'development'
This new option controls whether the @ava/transform-test-files preset is used at all. Disabling will be one of the things necessary to side-step Babel altogether. Removes support for the `--no-power-assert` CLI flag, without a replacement. Refs #1556.
Always extend the project's Babel configuration, if any. Always apply the `@ava/stage-4` preset. Fixes #1488. Users can disable this preset by adding it to the AVA's Babel configuration with the `false` option: ``` "ava": { "babel": { "presets": [ ["ava/stage-4", false] ] } } And yes, `ava/stage-4` so now an alias for the preset, which means it can be used even if the preset is not installed as a top-level dependency. Fixes #1225. `@ava/transform-test-files` is applied as part of the test compilation, but cannot be overridden by users like `@ava/stage-4` can.
Remove 'default' and 'inherits' options, since 'inherits' is now the default. In preparation for custom extension support and source compilation, move options for test compilation into the `testOptions` field.
Set babel=false to disable AVA's default test compilation. *Also* set compileEnhancements=false to disable the Babel pipeline altogether. Fixes #1556.
Fixes #1598. Switches AVA's Babel implementation to use Babel 7. This applies to test and helper file compilation.
Adds a
compileEnhancements
option which can be set tofalse
to disable Power Assert and ourt.throws()
helper.Changes the Babel configuration. If you had this before:
You'll now need:
ava.babel.testOptions.babelrc
now defaults totrue
. You can disable our stage-4 preset by adding["ava/stage-4", false]
toava.babel.testOptions.presets
. Setava.babel
tofalse
to disable AVA's test file compilation, whilst still compiling enhancements. IfcompileEnhancements
is also set tofalse
then Babel is skipped completely.Fixes #1225, #1488 and #1556.