Registry / devops / babel-upgrade

babel-upgrade

JSON →
library1.0.1jsnpmunverified

A tool to automatically upgrade Babel 6 projects to Babel 7. It updates dependencies, config files (.babelrc, babel key in package.json), and JavaScript files that import Babel packages directly. Stable version is v1.0.1, though previously released as v0.x. No regular release cadence; last release was in 2019. Key differentiators: it automates the rename of packages (e.g., babel-preset-env → @babel/preset-env), adds necessary peer dependencies, and handles monorepos. It is a one-time migration tool, not a general Babel upgrade utility.

npm install babel-upgrade
INSTALL
IMPORT
SIG · BABEL-UPGRADE
B
babel-upgrade
devopsjavascriptv1.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (run via CLI)
npx babel-upgrade --write
babel-upgrade (without --write will only print diff)
Requires Node >= 8. Use npx to run without global install.
Programmatic API (if any)
const upgrade = require('babel-upgrade');
import upgrade from 'babel-upgrade' (ESM not supported)
The package is CJS-only; there is no ESM export.
CLI flags
npx babel-upgrade --write --install
npx babel-upgrade (without flags as above)
--write to apply changes, --install to run npm/yarn after.

Run babel-upgrade with --write to modify files and --install to update node_modules.

npx babel-upgrade --write --install
babel-upgrade --version
Debug
Known issues
breakingNode.js >= 8.0.0 required.
fix
Update Node.js to >= 8.0.0.
affects: >=0.0.1
breakingUpgraded projects may need manual adjustment for edge cases like custom Babel plugins.
fix
Review the diff output carefully; run tests after upgrade.
affects: >=0.0.1
gotchaWithout --write, only a diff is printed; no changes are made.
fix
Add --write or -w flag to apply changes.
affects: >=0.0.1
deprecatedThe --install flag may not work with npm versions < 5.2.0 (npx not available).
fix
Use npm >= 5.2.0 or manually run install after upgrade.
affects: >=0.0.1
breakingDoes not handle presets or plugins that are not in the known rename list.
fix
Manually rename any custom or third-party presets/plugins that were not renamed.
affects: >=0.0.1
Errors
Common errors & fixes
npx: command not found
npx is not available with older npm versions (< 5.2.0).
fix
Upgrade npm to >= 5.2.0 or install babel-upgrade globally and run without npx.
Error: Your Node.js version is not supported. Please upgrade to Node.js >= 8.0.0.
Node.js version is too old.
fix
Update Node.js to version 8.0.0 or higher.
babel-upgrade: command not found
babel-upgrade is not installed globally and npx is not used.
fix
Run 'npx babel-upgrade' or install globally: 'npm install -g babel-upgrade'.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
babel-upgrade — npm install babel-upgrade · libregistry