Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
babel-upgrade
Advanced tools
Run at the root of your git repo
npx babel-upgrade
Optionally use --install
to run yarn
or npm
after the upgrade.
npx babel-upgrade --install
Ideas from http://new.babeljs.io/docs/en/next/v7-migration.html (or modify that file if it's missing)
Update dependencies, config files, and maybe JavaScript files that require babel packages directly
package.json
: dependencies
and devDependencies
to the "latest supported" version.
@babel/core
peerDep{
"devDependencies": {
+ "@babel/core": "7.0.0-beta.39",
+ "@babel/plugin-proposal-object-rest-spread": "7.0.0-beta.39",
+ "@babel/preset-env": "7.0.0-beta.39",
+ "babel-loader": "v8.0.0-beta.0"
- "babel-loader": "6.0.0",
- "babel-plugin-transform-object-rest-spread": "6.0.0",
- "babel-preset-env": "^1.0.0",
},
}
@babel/register
{
"name": "mocha-scripts-test",
"scripts": {
- "test": "mocha --compilers js:babel-register --require babel-polyfill test/*Test.js",
+ "test": "mocha --compilers js:@babel/register --require @babel/polyfill test/*Test.js",
}
}
"babel-core": "^7.0.0-bridge-0"
if jest is a dependency"devDependencies": {
"@babel/core": "7.0.0-beta.39",
+ "babel-core": "7.0.0-bridge.0",
"jest": "^22.0.0"
},
"scripts": {
"test": "jest"
}
@babel/node
package if babel-node
is used"devDependencies": {
"@babel/cli": "7.0.0-beta.39",
+ "@babel/node": "7.0.0-beta.39"
},
"scripts": {
"start": "babel-node a.js"
}
babel-node
is used, import @babel/node
?{
"devDependencies": {
+ "@babel/node": "7.0.0-beta.39"
}
"scripts": {
"start": "babel-node"
}
}
.babelrc
files- src/
- example/
- .babelrc // now modifies these too
- test/
- .babelrc // now modifies these too
- `.babelrc`
{
"presets": [
+ "@babel/preset-env"
- "env"
]
}
package.json babel key
{
"babel": {
"presets": [
+ "@babel/preset-env"
- "env"
]
}
}
env
{
"babel": {
"presets": [
"@babel/preset-env"
]
},
"env": {
"development": {
"plugins": [
- "transform-react-jsx-source",
- "babel-plugin-transform-react-jsx-self"
+ "@babel/plugin-transform-react-jsx-source",
+ "@babel/plugin-transform-react-jsx-self",
]
}
}
}
mocha.opts
--install
).babelrc.js
and other js files with a config like presets, webpack.config.js
.flowconfig
and add it?only
/ignore
if necessarytypeof-symbol
if using @babel/preset-env
+ loosebabel-types
-> @babel/types
, babel-core
)
babel-register
with @babel/register
)? Could be in a Makefile or somewhere else, but it's just find replace.@babel/cli
?npx/globally
$ npm i
$ npm start
FAQs
Upgrade tool for Babel
The npm package babel-upgrade receives a total of 1,942 weekly downloads. As such, babel-upgrade popularity was classified as popular.
We found that babel-upgrade demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.