New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-upgrade

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-upgrade

Upgrade tool for Babel

  • 0.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
increased by14.84%
Maintainers
1
Weekly downloads
 
Created
Source

babel-upgrade

npx babel-upgrade

Goals

Update dependencies, config file, files that require babel directly

  • auto run npm or yarn
  • Update package.json: dependencies and devDependencies to the "latest supported" version.
    • This includes doing all package renames
    • This includes upgrading the same package to the latest version
    • add @babel/core peerDep
    • modify scripts for mocha + @babel/register
    • throw/warn if engines is < node 4 or current node is < 4?
    • log when replacing out preset-es2015,16,17,latest as FYI
    • if babel-node is used, import @babel/node?
  • Update the babel config file(s).
    • .babelrc
    • .babelrc.js
    • package.json babel key
    • handle env
    • handle shorthand names: babel-preset-env and env
    • convert comma separated presets/plugins into an array
    • handle react + flow preset being split. Read if .flowconfig and add it?
    • convert only/ignore?
    • how do we want to handle spec/loose modes, especially when changing previous loose mode to spec (just warn?)
    • remove typeof-symbol if using @babel/preset-env
  • Update test files that use babel directly (babel-types, babel-core)
    • Update all requires/imports
    • Update the use of the Babel API (plugins, integrations)
  • Misc files as we go (karma.conf.js, mocha.opts)
  • Add to the upgrade guide which parts are autofixable and the command (if we care enough to make this individually runnable too infrastructure wise)
  • May need to add a warning on any 3rd party plugins since they might not be compatible
  • later: work on node 4
  • Should certain parts be generic (replace the string babel-register with @babel/register)? Could be in a Makefile or somewhere else, but it's just find replace.

Philosophy

  • Move this into the monorepo when somewhat ready
    • Maybe move into @babel/cli?
    • Or just another package that is intended to be used via npx/globally
  • Whenever there is a breaking change in a PR we should also update this tool when possible or at least provide a warning
    • What about with a regression?
  • Can be used for non-major bumps too - just for updating to the latest version.
  • Include mini-changelog?
  • Maybe the version should just reflect the version that it targets?

FAQs

Package last updated on 20 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc