question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider adding babel-core to a peerDep like other integrations (+ to @babel/core)

See original GitHub issue

Feature Request

We are going to release Babel 7 soon, and right now it’s incompatible with ava since it’s a peerDep (the dependency needs to be updated either way). I understand that it is nicer to have it as a dependency though because it means less installing.

babel-loader has had babel-core as a peerDep before, and I moved grunt/gulp/rollup/cli to it as well in v7 beta. The reasoning was just that people were installing v7/v6 in their dependencies. Peer dependencies can be pretty annoying as well (warnings especially if it’s a transitive dependencies) but it seems to make sense for babel-core and we will try it out? Having to ask this for all the integrations does make me not want to do it though 😛

Also we are going to move to scoped packages soon!

Or is there an option to use a different version already?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
sindresorhuscommented, Nov 2, 2017

Right, but I’m thinking we’ll detect when people have v7 installed and use that instead. Then a little while after v7 has come out and the wider ecosystem has had a chance to adjust we can switch to run v7 by default (and perhaps detect and use v6 when installed).

Seems like a lot of extra work and complexity for little gain. Can’t we just upgrade to Babel 7 in a new AVA version and people that can’t upgrade to Babel 7 yet can just wait on upgrading AVA?

3reactions
nervetattoocommented, Nov 20, 2017

Judging by this thread, I get the impression that using babel7 should just work because ava brings its own babel dep. However, I made an attempt to use babel 7 in a project that uses ava for testing of react components, but even when using just the @ava/stage-4 babel preset and no inherits of babelrc it fails due to loose option being wrong somewhere. I didn’t look further into it as I just wanted to test out babel7, and wasn’t ready to invest time in issues since its still in beta. Just chiming in that it certainly didn’t work out of the box at least 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel-core is not added when no testing framework ... - GitHub
It seems babel-core only added when jest was selected. Searching shows it only there. I selected npm as package manager. $ create-nuxt-app -v ......
Read more >
@babel/core | Yarn - Package Manager
Intro. Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain...
Read more >
babel-upgrade - npm Package Health Analysis - Snyk
A tool that tries to automatically update most dependencies, config files, and JavaScript files that require Babel packages directly to Babel 7 (and...
Read more >
Upgrading from ChangeNotifier - Morioh
Using ChangeNotifier to architect your apps? Here's how you can upgrade.Enter StateNotifier, a new way to architect your Provider apps.
Read more >
rushstack/rushstack - Gitter
rush add --package @babel/core --dev. But this results in the same error as above. Any suggestions? I believe this is quite straightforward to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found