Closed novemberborn closed 5 years ago
It appears that Ava stopped working with Babel 49 update.
The test files are no longer compiled using .babelrc
.
Is this related?
@gajus depending on your beta version AVA should have its own instance of @babel/core
, so I wouldn't expect it to stop working. Perhaps you could try with master
?
Master works. 1.0.0-beta.4
does not.
When is the current master getting released?
Master works. 1.0.0-beta.4 does not.
That's weird. Beta 4 has pinned its Babel dependencies so it shouldn't end up using Beta 49. Perhaps your installer is deduping in unexpected ways.
When is the current master getting released?
I'm trying to land two features that were blocked on this Babel compatibility issue.
That's weird. Beta 4 has pinned its Babel dependencies so it shouldn't end up using Beta 49. Perhaps your installer is deduping in unexpected ways.
I am using npm@5.6.0.
It is not an issue with the installed version of @babel/core
either.
$ cat ./node_modules/ava/node_modules/@babel/core/package.json | jq .version
"7.0.0-beta.44"
@gajus not sure what's going on then. Hopefully the next beta fixes it correctly.
@gajus not sure what's going on then. Hopefully the next beta fixes it correctly.
This is currently breaking all of our builds.
Not one package, but all of the builds.
Whatever change happened between Babel ^7.0.0-beta.47 and ^7.0.0-beta.49 is breaking latest Ava release behaviour.
Ah, perhaps you have some plugins / presets that are making its way into AVA's Babel pipeline? I suggest downgrading to Babel 7 beta 44 (or 47) for the time being. Make sure to install exact dependencies, the ^
includes all beta releases.
Just for clarification, does ava currently support babel.config.js
? i.e., is this simply a documentation/test issue?
@danny-andrews, yes, if you add something like this to your ava
config:
"babel": {
"testOptions": {
"configFile": "./babel.config.js"
}
}
We need to auto-detect it though, like we do .babelrc
files. That's not implemented yet. We also need tests for that implementation, including what happens when both files are present.
Then, I'd like to update our documentation to use babel.config.js
rather than .babelrc
.
@novemberborn, wouldn't just providing configFile: true
in defaultOptions
work? Then it'd fallback to Babels own behaviour. And yeah, needs some tests too.
@kevva yup, I just didn't want to do that without having tests and an understanding of how it all behaves.
master
now supports babel.config.js
files, but we still need to update the documentation.
As of #1798 we support Babel 7 beta 48. This supports a new
babel.config.js
file.We need to update our Babel recipe with examples of
babel.config.js
files. I think we may even be able to remove.babelrc
examples, as I'm under the impression that this is the desired new config format for Babel 7.~We need to update our Babel integration tests (in
test/api.js
) so we're also testingbabel.config.js
files. We should change our default behavior so that bothbabelrc
andconfig
files are considered when compiling test & helper files. See:~https://github.com/avajs/ava/blob/a5de3691e76a2a999ac3392830d1e26d279d60ab/lib/babel-pipeline.js#L28
https://github.com/avajs/ava/blob/a5de3691e76a2a999ac3392830d1e26d279d60ab/lib/babel-pipeline.js#L125