-
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
AVA with --experimental-modules #1810
Comments
Whilst support remains experimental we won't support it directly, no. You can use AVA with the That said perhaps we should support a way of passing options to the worker processes. We could add |
Would it also require the restriction to only process *.js files to be relaxed? |
@PhilT yes but that's landing soon (#1746). I imagine AVA should use Line 110 in f0f0c3b
|
Hi novemberborn, thank you very much for the reply. The --node-args CLI flag or the corresponding config object is exactly what we need. I'm OK that AVA only processes *.js file. But I do need AVA support the statement like "import xxx from './yyy.mjs'" natively. Because it's a lot of extra work to introduce babel in test. |
By the way, the esm package works well. Thank you again. |
@jim-king-2000 configurable extension support has landed, so AVA can now run I think the one remaining question is how AVA would actually load the files. I don't think it can use |
@novemberborn Fantastic! I tried the latest beta5 AVA and it loaded my test_*.mjs successfully. My config file is like the following. No babel any more.
|
@novemberborn I don't know how to implement it, however, I'd really like to digest "test_*.mjs" with empty config file or with a little bit more characters as the following:
|
I could make a ticket for the We should also extend AVA's handling of Leaving this open for somebody to spec this out further. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi @novemberborn , long time no see. Shall we let AVA run *.mjs without "esm" plug-in now? The "esm" plug-in can work, but the error reported by AVA is based to the transpiled code which is hard for us to find the true culprit in our source code. |
We won't support it directly while it's behind a flag, but I'd be happy to take PRs that allow AVA to opt-in to experimental Node.js features, if controlled through the appropriate flags. |
What bothers us mostly is the line of the errors reported by AVA is NOT the line in our source code when using |
@jim-king-2000 this discussion may be relevant: #1980 There's a lot of different tools interacting here. I don't fully understand what's going wrong either. Again I'd be happy to find a way so you can configure experimental Node.js flags and have them apply to AVA's worker processes. |
Hi @novemberborn , I'm so sorry that I haven't made a minimal repro for the issue I reported. Now when I'm trying to do it, I find that it is not reproduced. So, it is almost perfect of AVA at this time. I'm still looking forward to the experimental flag(s), which would make it absolutely perfect. |
Came here after the Node 12 release announced the anticipating dropping of the I was hoping I'd be able to run my In "ava": {
"babel": false,
"compileEnhancements": false,
"extensions": [
"mjs"
]
} |
By specifying the |
Do I understand it correctly, that for as long as |
Since all of my project files are *.mjs, is it possible that AVA supports native ESM? Or can I add additional node parameter "--experimental-modules" to AVA?
The text was updated successfully, but these errors were encountered: