Upgrading @babel/core 7 to 8
Breaking7.29.7 → 8.0.10Breaking145Security2Platform5Deprecated2New11Changed33Fixed115Other94
SecurityLow · CVSS 3.2@babel/core: Arbitrary File Read via sourceMappingURL CommentGHSA-4x5r-pxfx-6jf8 · CVE-2026-49356 ↗
BreakingUpgrade verdict
141 breaking changes and 5 platform requirement changes and 2 security fixes.
In plain terms
- The useBuiltIns setting for preset-env is now fully gone; it was already supposed to be removed in Babel 8.
- The runtime package no longer exposes corejs exports, so code importing them will break.
- The parser no longer accepts the packed locations setting, so configurations using it must change.
- The plugin that rewrote Object.setPrototypeOf to assignment is gone.
Must act Top 5 of 150 that need code or config changes
@babel/core publishes official migration guides for versions 8, 8, 8. They cover more than the release notes do.
Migration guide for users ↗Migration guide for plugin developers ↗Migration guide ↗Node.js requirement changed in 8.0.0-rc.5: >=6.9.0 → ^22.18.0 || >=24.11.0.
Adds @types/gensync ^1.0.5, empathic ^2.0.1, import-meta-resolve ^4.2.0, obug ^3.0.0, verkit ^0.5.0.
Drops @babel/helper-module-transforms, @jridgewell/remapping, debug, semver.
Installs 37 packages in all (was 38).
What you must change
Breaking141
Actually removes preset-env's useBuiltIns option, completing a removal announced for Babel 8.
useBuiltInspreset-envRemoves corejs exports for
@babel/runtime-corejs3.@babel/runtime-corejs3Removes the
locations: "packed" parser option.locations: "packed"Removes the transform-object-set-prototype-of-to-assign plugin.
babel-plugin-transform-object-set-prototype-of-to-assignbabel-standaloneRemoves noop plugins from @babel/standalone.
@babel/standaloneRemoves Scope#buildUndefinedNode from babel-traverse.
Scope#buildUndefinedNodebabel-traverseRemoves NodePath#toComputedKey from babel-traverse and dependent plugins.
NodePath#toComputedKeybabel-helper-wrap-functionbabel-plugin-transform-block-scopingbabel-plugin-transform-regeneratorbabel-traverseRemoves @babel/plugin-transform-property-mutators from the repo and babel-standalone.
@babel/plugin-transform-property-mutatorsbabel-standaloneRemoves
Import from the Expression alias in Babel 8.ImportExpressionRemoves
decorators from TSDeclareMethod.TSDeclareMethoddecoratorsRemoves unused code for old ESLint versions.
Removes the deprecated default export from @babel/code-frame.
@babel/code-frameDrops support for ESLint v7 and v8 in babel-eslint-parser.
babel-eslint-parserRemoves the browser entrypoint for @babel/register.
@babel/registerRemoves NodePath#visit from babel-traverse.
NodePath#visitRemoves smart pipeline support and the accessor property from the Standardized alias.
babel-plugin-proposal-pipeline-operatorStandardizedRemoves @babel/plugin-transform-object-assign.
@babel/plugin-transform-object-assignDrops support for TypeScript
module <identifier> syntax.Removes the
isPluginRequired export from preset-env.isPluginRequiredRemoves the
blacklist option from traverse.blacklistRemoves the
plugin-transform-react-compat, plugin-transform-react-source and plugin-transform-react-self plugins.plugin-transform-react-compatplugin-transform-react-sourceplugin-transform-react-selfRemoves
regenerator-runtime from @babel/node.regenerator-runtime@babel/nodeRemoves the decorator parser plugin options.
Removes corejs2 and legacy files from compat-data.
compat-dataRemoves the
./regenerator entrypoint from @babel/runtime.@babel/runtime@babel/runtime/regeneratorRenames
TSImportType.argument to .source.TSImportType.argumentTSImportType.sourceFully removes import assertions support.
Fully removes Records and Tuples support.
Stops enabling default plugins in @babel/standalone.
@babel/standaloneDrops CommonJS support from @babel/parser.
@babel/parserRemoves record and tuple syntax support from the parser, generator, traverse and related plugins.
babel-plugin-proposal-record-and-tupleRemoves legacy .d.ts files for TypeScript 4.0 and earlier from babel-types.
babel-typesRemoves the bugfixes option from babel-preset-env.
babel-preset-envbugfixesRenames typeParameters to typeArguments for TSClassImplements and TSInterfaceHeritage.
TSClassImplementsTSInterfaceHeritagetypeParameterstypeArgumentsTSImportTypeTSTypeQueryRenames TSTypeReference.typeParameters to typeArguments in babel-generator, babel-parser and babel-types.
TSTypeReference.typeParametersTSTypeReference.typeArgumentsRemoves TSModuleDeclaration.global in Babel 8.
TSModuleDeclaration.globalRenames superTypeParameters to superTypeArguments across generator, parser, Flow comments, TypeScript transform and types.
superTypeParameterssuperTypeArgumentsAdds TSClassImplements and TSInterfaceHeritage AST nodes and renames TsExpressionWithTypeArguments in Babel 8.
TSClassImplementsTSInterfaceHeritageTsExpressionWithTypeArgumentsRemoves the minimal and smart options of the Pipeline Operator in Babel 8.
minimalsmartDrops Flow support for annotations inside array patterns.
Removes some Scope methods in Babel 8.
ScopeRemoves the importAssertions parser plugin.
importAssertionsRemoves the importReflection parser plugin.
importReflectionRemoves the DecimalLiteral AST node in Babel 8.
DecimalLiteralRemoves decimal support from the parser in Babel 8.
decimalRemoves some NodePath methods.
NodePathRemoves the enums option of the flow plugin in Babel 8.
enumsRemoves methods starting with
_ in @babel/traverse.@babel/traverseRemoves File.prototype.getModuleName from babel-core.
File.prototype.getModuleNameRemoves
extra.shorthand from the parser and traverse packages.extra.shorthandRemoves the
syntaxType option for record-and-tuple in the parser and plugins.syntaxTypeRemoves core-js and regenerator entrypoints from @babel/runtime-* packages.
@babel/runtime@babel/runtime-corejs3Removes ./helpers/esm exports from @babel/runtime and drops Node.js 13.0-13.1 support.
@babel/runtime@babel/plugin-transform-runtimeRemoves the
useESModules option from babel-plugin-transform-runtime.babel-plugin-transform-runtimeuseESModulesRemoves core-js@2 and regenerator support from
babel-plugin-transform-runtime.babel-plugin-transform-runtimecore-js@2regeneratorRemoves the
loose and spec options from preset-env.babel-preset-envloosespecRemoves
CodeGenerator from @babel/generator.CodeGenerator@babel/generatorChanges
parserOpts.createImportExpressions to default to true.parserOpts.createImportExpressionsRemoves
getModulesPluginNames from babel-preset-env.getModulesPluginNamesbabel-preset-envRemoves core-js 2 and regenerator from
preset-env.babel-preset-envcore-jsregeneratorRemoves the -d and -gc aliases from babel-node.
babel-node-d-gcRemoves the getChalk function from babel-highlight and babel-code-frame.
getChalkRemoves builders present only for backwards-compatibility.
Removes
selfClosing from the jsxElement builder.jsxElementselfClosingRemoves the
block argument from Scope#rename.Scope#renameRemoves
Super from the Expression alias.SuperExpressionRemoves support for the
2018-09 decorators proposal.2018-09Removes the Noop node type.
NoopEnables preset-env bugfixes by default.
preset-envRemoves module attributes parser and generator support.
Stops creating TSParenthesizedType nodes by default.
TSParenthesizedTypeRemoves module-specific options from @babel/core.
@babel/coreFalls back targets to "defaults, not ie 11".
Outputs minimal strings by default.
Uses the JSX automatic runtime by default.
Removes useSpread and useBuiltIns JSX options.
useSpreaduseBuiltInsRemoves uglify target support in preset-env.
uglifyEnables the allowDeclareFields option by default for TypeScript.
allowDeclareFieldsRemoves the jsonCompatibleStrings option from babel-generator.
jsonCompatibleStringsEnables the allowDeclareFields option by default for Flow.
allowDeclareFieldsFalls back to assuming ESM support when using
modules: auto.modules: autoDisallows decorators on abstract and declare class fields in the parser.
babel-parserUses 0-based columns in code frames to match Babel AST locations.
babel-code-framebabel-corebabel-parserbabel-traverseDisallows a super call after new in the parser, generator, spread transform and types.
babel-generatorbabel-parserbabel-plugin-transform-spreadbabel-typesReplaces remaining whitelist/blacklist options with inclusive alternatives in external-helpers, template and traverse.
babel-plugin-external-helpersbabel-templatebabel-traverseGates jsxDEV source/self output behind the
developmentSourceSelf option.developmentSourceSelfjsxDEVPasses
file instead of path to importToPlatformApi builders.importToPlatformApiMakes eslint-parser/experimental-worker the default in babel-eslint-parser.
eslint-parser/experimental-workerRequires the "version" option for the partial-application plugin.
babel-plugin-proposal-partial-applicationbabel-plugin-syntax-partial-applicationUses package.json#imports for browser-specific code in core, transform-runtime and register.
package.json#importsExtracts babel-build-external-helpers from babel-cli.
babel-build-external-helpersbabel-cliDisallows excess arguments in babel-external-helpers.
babel-external-helpersCleans up unused preset-env data entries in transform-runtime and preset-env.
babel-preset-envbabel-plugin-transform-runtimeEnsures
parseExpression with tokens: true returns the exported tokens.parseExpressionArchives the
proposal-import-attributes-to-assertions plugin.proposal-import-attributes-to-assertionsTreats the parser option
allowSuperOutsideMethod as top-level only.allowSuperOutsideMethodUpdates LVal coverage in destructuring-private, do-expressions, object-rest-spread, traverse and types packages.
Accepts bigints in the t.bigIntLiteral factory, changing parser, traverse and types behavior.
t.bigIntLiteralFixes incorrect LVal coverage in destructuring, do-expressions, object-rest-spread and types for Babel 8.
Stops replacing global regeneratorRuntime references in the regenerator transform.
regeneratorRuntimeDirectly exports the JSON files from @babel/compat-data instead of the previous export shape.
@babel/compat-dataHardens variable declarator validations in babel-traverse and babel-types.
Aligns esmodules: true behaviour to intersect in helper-compilation-targets and preset-env.
esmodulesParses TSHeritageBase.expression as an expression in babel-parser and babel-types.
TSHeritageBase.expressionCreates a new TSTemplateLiteralType AST node for template literal types.
TSTemplateLiteralTypeParses
export import = as an ExportNamedDeclaration.ExportNamedDeclarationCreates TSEmptyBodyFunctionExpression also on invalid input.
TSEmptyBodyFunctionExpressionCreates a ThisExpression node for
typeof this.ThisExpressionCreates TSEnumBody for TSEnumDeclaration in the AST.
TSEnumBodyTSEnumDeclarationWraps the TSImportType argument within a TSLiteralType.
TSImportTypeTSLiteralTypeCreates TSAbstractMethodDefinition and TSAbstractPropertyDefinition nodes.
TSAbstractMethodDefinitionTSAbstractPropertyDefinitionUses TSQualifiedName for the name of namespace X.Y {} declarations.
TSQualifiedNameTSModuleDeclarationSplits the typeParameter of TSMappedType in Babel 8.
TSMappedTypetypeParameterCleans up plugin-transform-runtime options in Babel 8.
@babel/plugin-transform-runtime@babel/plugin-transform-typeof-symbol@babel/runtime-corejs2Inlines
toSequenceExpression into @babel/traverse.toSequenceExpression@babel/traverseDisallows synchronous usage of createConfigItem, loadPartialConfig and loadOptions.
createConfigItemloadPartialConfigloadOptionsNumeric literals must be finite and non-negative in babel-types.
Disallows sequence expressions in JSX expression containers.
Bumps eslint-parser/plugin eslint requirements.
Aligns
allow* parser options with ESLint behavior.Adds
"exports" to every package.exportsOnly supports
legacy and 2023-05 decorators.legacy2023-05Applies other Babel 8 misc changes across core, helpers, plugins, preset-env, traverse and types.
Applies more misc Babel 8 little changes across core, helpers, plugins and preset-env.
Improves file extension handling for TS and Flow presets.
Bundles most packages in Babel 8.
Disallows synchronous usage of babel.* callback methods.
babel.*Requires ObjectTypeAnnotation fields to always be arrays.
ObjectTypeAnnotationFixes property names for function-like TypeScript nodes.
Uses an identifier for TSTypeParameter.name.
TSTypeParameter.nameMoves the @babel/register transform to a separate worker.
@babel/registerImproves template tokenizing.
Materializes ESTree's classFeatures option.
classFeaturesMoves ESLint parsing to a Worker.
Stops skipping requeued paths.
Adds type checking for preset-react options.
preset-reactAdds type checking for preset-flow options.
preset-flowRequires @babel/plugin-proposal-dynamic-import when transforming import() to SystemJS.
@babel/plugin-proposal-dynamic-importimport()Improves syntax highlighting.
Adds type checking for preset-typescript options.
babel-preset-typescriptBundles more packages, affecting babel-cli, babel-node, babel-register, helpers and the fixture test runner.
babel-clibabel-helper-transform-fixture-test-runnerbabel-helpersbabel-nodebabel-registerSecurity2
@babel/core: Arbitrary File Read via sourceMappingURL Comment
Low · CVSS 3.2Fixes GHSA-968p-4wvh-cqc8, a vulnerability affecting the .replace method of transpiled regular expressions using named capturing groups.
.replacePlatform5
Requires Node.js ^22.18.0 || >=24.11.0 for all packages.
Adds preset-typescript as an optional peer dependency of babel-core.
preset-typescriptRequires Node.js ^18.20.0 || ^20.17.0 || >=22.8.0 for every package in Babel 8.
Requires Node.js
^18.20.0 || ^20.10.0 || >=21.0.0 for every package.Requires Node.js
^16.20.0 || ^18.16.0 || >=20.0.0.Deprecations to plan for
Deprecated2
Deprecates the spec and loose plugin options across many transform plugins.
babel-plugin-transform-arrow-functionsbabel-plugin-transform-classesbabel-plugin-transform-computed-propertiesbabel-plugin-transform-destructuringbabel-plugin-transform-for-ofbabel-plugin-transform-modules-commonjsbabel-plugin-transform-optional-chainingbabel-plugin-transform-spreadDeprecates uppercase builders in babel-types.