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.

Update/Remove babel-core in a new major version

See original GitHub issue

Currently jscodeshift depends on an old version of babel-core, which depends on minimatch@2 which

  • Reports a security warning on npm install pointing to a security issue
  • Reports errors for nsp which checks for security warnings

Because of these two problems I’m unwilling to use this package. These warnings/errors are transitive and I don’t want my users to see security issues reported. Note that this is not a real security issue for jscodeshift, because it’s not using the affected babel options. Nevertheless I don’t want to tell every user to ignore these warnings, because it affects the trust in security warnings!

In another issue you pointed out that removing/updating babel would be a backward incompatible change:

see https://github.com/facebook/jscodeshift/pull/198#issuecomment-304329657

Yeah, this is not something we can do because we need babel v5 for backwards compatibility. Maybe if we release a new breaking version we could remove babel v5 support, but not at the moment.

So I propose to increase the major version and release a breaking change.

Do you really want a security warning reported on every npm install of your package? This affects the trust in security warnings! This trust is important for the community! Especially a package under the facebook namespace should be an example.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:13
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
slorbercommented, Dec 6, 2017

@ematipico you can’t just upgrade babel like that because babel6 is not retrocompatible with babel5 (it does not have the parse() method anymore, so you need to call Babylon directly with correct setup to produce an AST compatible with babel5)

My PR tries to keep this retrocompatibility: https://github.com/facebook/jscodeshift/pull/230

This permits to ensure that normally all existing codemods would still run fine against new version of jscodeshift

0reactions
slorbercommented, Dec 7, 2017

Don’t know if this was backported but it’s in plugin list 😃

great to see this solved 😃 thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

@babel/core - npm
Babel compiler core.. Latest version: 7.20.7, last published: 7 days ago. Start using @babel/core in your project by running `npm i ...
Read more >
Upgrade to Babel 7
We highly encourage you to use a newer version of Node.js (LTS v8) since the previous versions are not maintained. See nodejs/LTS for...
Read more >
Incompatible babel-loader and babel-core versions
x has moved all packages from a babel- prefix to the @babel npm scope. The error is correct, you have incorrectly installed babel-core...
Read more >
Babel 8 Release Plan · Issue #10746 - GitHub
We plan to release a new major version in 2021 (milestone). This release won't have all the migration pain which there was while...
Read more >
svg-react-loader | Yarn - Package Manager
A webpack loader allowing for inline usage of a SVG as a React component, or for composing individual SVGs into larger ones. The...
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