Features Timeline
Which major new features did we introduce in each Babel version? This page includes a very short summary for each minor release, or you can read the full changelog on GitHub! Additionally, use this timeline to track some other important efforts, such as the babel-polyfills project.
-
Babel 7.13.0
- Top-level
targets
option (RFC) - Granular compiler assumptions (docs, RFC)
- Support for the Records and Tuples proposals
let rec = #{ x: 1 }; let tup = #[1, 2, 3];
- TypeScript 4.2 support
- Top-level
-
Babel 7.12.0
- Support for the class static blocks proposal
class A { static { initialize(A); } }
- Support for imports and exports string names
let happy = "wooo!"; export { happy as "😃" };
- Parser support for the Import Assertions proposal
import json from "./foo.json" assert { type: "json" };
- TypeScript 4.1 support
- Support for the class static blocks proposal
-
Babel 7.11.0
- Enable the Logical Assignment and Numeric Separator Stage 4 proposals by default
- Parser support for the Decimal proposal
console.assert(0.1m + 0.2m === 0.3m);
- TypeScript 4.0 support
-
@babel/eslint-parser
-
Babel 7.10.0
- Enable parser support for the
import.meta
Stage 4 proposal by default - Support for the Ergonomic brand checks for Private Fields proposal
class Car { #plate; race(other) { if (#plate in other) console.log("Racing against another car!"); } }
- Enable parser support for the
-
babel-polyfills
-
Babel 7.9.0
bugfixes
option in@babel/preset-env
, to workaround browsers bugs rather than compiling whole Features- TypeScript 3.8 support
- Support for Flow
declare
class fields - Support for the automatic JSX runtime
-
Babel 7.8.0
- Enable the Optional Chaining and the Nullish Coalescing Stage 4 proposals by default
- Support
.mjs
configuration files
-
Babel 7.7.0
- Parser support for the top-level
await
proposalimport db from "./database.js"; await db.connect();
- Add error recovery support for Early Errors in
@babel/parser
- Support
.json
and.cjs
configuration files - TypeScript 3.7 support
- Parser support for the top-level
-
Babel 7.6.0
- Support for static private accessors, part of the
static class features proposal
class Dog { static get #className() { return "Dog"; } }
- Support for static private accessors, part of the
static class features proposal
-
Babel 7.5.0
- Support for the F# pipeline operator proposal
num |> add(2) |> double
- TypeScript
namespace
support
- Support for the F# pipeline operator proposal
-
Babel 7.4.0
- Support for injecting
core-js@3
polyfills - Support for the Partial Application proposal
strings.map(parseInt(?));
- Support for static private methods, part of the
static class features proposal
class Dog { static #register() { /* ... */ } }
- TypeScript 3.4 support
- Support for injecting
-
Babel 7.3.0
- Support for instance private accessors, part of the
private methods proposal
class Dog { get #randomId() { return Math.random(); } }
- Support for the smart pipeline operator proposal
num |> add(2, #) |> double
- Support for
named capturing groups
in regular expressions
str.match({String.raw`/^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/`})
- TypeScript 3.2 and 2.9 support
- Support for instance private accessors, part of the
private methods proposal
-
Babel 7.2.0
- Support for instance private methods, part of the private methods proposal
class Dog { #bark() { console.log("Mew!") } }
- Support for instance private methods, part of the private methods proposal
-
Babel 7.1.0
- Support for the decorators proposal, as it was specified in September 2018
class Person { @autoIncrement age; }
- Support for static private fields, part of the static class features proposal
class Person { static #classId = 3; }
- Support for the decorators proposal, as it was specified in September 2018
-
Babel 7
This has a lot more changes since it was 2 years of pre-releases.
- Drop support for un-maintained Node versions: 0.10, 0.12, 4, 5
- Switch to scoped packages (
babel-core
to@babel/core
) - Remove yearly presets (
@babel/preset-es2015
) and Stage presets (@babel/preset-stage-0
) (blog post). - Added "pure" (
/*#__PURE__*/
) annotation support in certain cases. (Implemented later as @babel/helper-annotate-as-pure - Add project-wide
babel.config.js
config file (docs) andoverrides
config option. - Added
"useBuiltIns: "usage"
to@babel/preset-env
- Support TypeScript via
@babel/preset-typescript
- Support JSX Fragments
<></>
- Support a ton of TC39 proposals:
- Unicode Property Regex
- JSON Superset
new.target
- Class Private Instance Fields (
class A { #b = 2 }
) - Optional Catch Binding
try { throw 0 } catch { do() }
- BigInt (syntax only)
import.meta
(syntax only) (import.meta.url
)- Numeric Separators (
1_000
) function.sent
- Optional Chaining (
a?.b
) - Logical Assignment Operators (
a &&= b; a ||= b
) - Nullish Coalescing Operator (
a ?? b
) - Pipeline Operator (
a |> b
) - Throw Expressions (
() => throw new Error("a")
)