babel 7 inconsistent transformation
See original GitHub issue🐛 Bug Report
When upgrading to babel 7
some files are not being transformed. I have both babel-core@7.0.0-bridge.0
and babel-jest
installed.
Example error message:
To Reproduce
https://github.com/chrisblossom/backtrack/tree/babel-7
git clone https://github.com/chrisblossom/backtrack.git
cd backtrack
git checkout babel-7
npm install
npm run test
jest --clearCache
sometimes helps some tests pass.
Expected behavior
All tests pass.
Link to repl or repo (highly encouraged)
https://github.com/chrisblossom/backtrack/tree/babel-7 https://github.com/chrisblossom/backtrack/commit/697617c7f499c2c8e4c0dd2b7056c1d070a10fcf
Run npx envinfo --preset jest
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Binaries:
Node: 8.11.4 - ~/.nvm/versions/node/v8.11.4/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.11.4/bin/npm
npmPackages:
jest: ^23.6.0 => 23.6.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:17 (3 by maintainers)
Top Results From Across the Web
Dependencies incompatible with new upgrades (for example ...
Dependencies incompatible with new upgrades (for example babel 7). Hi! I'm looking for some advice regarding dependencies, because my package.json dependencies ...
Read more >Babel Roadmap
We haven't figured out yet a policy for Babel 7 maintenance. ... A minimal Babel transforming setup requires at least three packages:.
Read more >Incompatible Bable Version React - javascript - Stack Overflow
I Am using node version 12.18.1. I installed following to start with react testing in my application I am using React integrated within...
Read more >babel-preset-env | Yarn - Package Manager
Setting this to false will not transform modules. debug. boolean , defaults to false . Outputs the targets/plugins used and the version specified...
Read more >Updating to Babel 7.4 - The Basement
As we learned in the Working with babel 7 and Wepack - post, ... care of what transforms should be applied and @babel/polyfill...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the problem is that
babel-jest
expects babel configuration filebabel.config.js
to simply return a JS object:https://github.com/facebook/jest/blob/master/packages/babel-jest/src/index.js#L58
while babel js started to promote a config API which allows to return a function:
https://babeljs.io/docs/en/config-files#config-function-api
and this is what we have in the example repo project:
https://github.com/chrisblossom/backtrack/blob/babel-7/.babelrc.js
This issue 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.