Packages

@babel/generator

8.0.6 · 18 Sep 2026MIT285.4M / weekRepositoryHomepagenpmAtom feed

Your version

7.12.0

14 Oct 2020Where it was published

7.29.8 is the newest release of 7.x.

In short

4 new8 fixed7 changed55 internal

Release note

Thanks @akphi, @Amareis, @barronwei, @iamfotx, @mischnic, @overlookmotel, @ryanrhee, @snitin315, @sosukesuzuki, @timgates42, @zweimach for their first PRs.

:eyeglasses: Spec Compliance

  • babel-core, babel-helper-module-transforms, babel-parser, babel-plugin-proposal-export-namespace-from, babel-plugin-syntax-module-string-names, babel-plugin-transform-modules-amd, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-systemjs, babel-plugin-transform-modules-umd, babel-types

    • String import/export specifier (@JLHwung)

  • babel-parser

    • [ts] Throw a syntax error for index signature with declare (@sosukesuzuki)

:rocket: New Feature

  • babel-core, babel-generator, babel-parser, babel-plugin-syntax-import-assertions, babel-plugin-syntax-module-attributes, babel-standalone, babel-types

    • Parse import-assertions (@xtuc)

  • babel-core, babel-helper-create-class-features-plugin, babel-helper-module-transforms, babel-helper-replace-supers, babel-plugin-proposal-class-static-block, babel-plugin-transform-modules-commonjs, babel-standalone, babel-traverse, babel-types

  • babel-generator, babel-parser, babel-plugin-syntax-class-static-block, babel-types

  • babel-generator, babel-parser, babel-types

  • babel-parser, babel-types

  • babel-plugin-transform-modules-systemjs

  • babel-plugin-transform-typescript, babel-preset-typescript

    • Add jsxPragmaFrag support to typescript transform (@JLHwung)

  • babel-core, babel-helper-module-transforms, babel-parser, babel-plugin-proposal-export-namespace-from, babel-plugin-syntax-module-string-names, babel-plugin-transform-modules-amd, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-systemjs, babel-plugin-transform-modules-umd, babel-types

    • String import/export specifier (@JLHwung)

  • babel-core

    • Return a list of files that were read from loadPartialConfig (@devongovett)

:bug: Bug Fix

  • babel-parser

    • [ts] Add asserts: false to TSTypePredicate node (@sosukesuzuki)

    • Move check for TSTypeCastExpression to catch another case (@existentialism)

    • Throw a recoverable error for missing initializer in const declaration (@sosukesuzuki)

    • Improve syntax error for class fields in ambient context (@sosukesuzuki)

    • Throw a syntax error for empty type parameter/argument (@sosukesuzuki)

    • Throw an error for a declare class field that have an initializer (@sosukesuzuki)

    • Do not throw an error for optional binding pattern params in function declaration (@sosukesuzuki)

    • Fix invalid setter parse (@fisker)

    • Throw a syntax error for a declare function with a body (@sosukesuzuki)

    • Throw a syntax error for a constructor with type parameters (@sosukesuzuki)

  • babel-plugin-transform-typescript

    • fix transform-typescript logic to remove definite fields (@akphi)

    • [transform-typescript] Fix import elision for type exports (@Amareis)

  • babel-helper-member-expression-to-functions, babel-plugin-proposal-class-properties, babel-plugin-proposal-nullish-coalescing-operator, babel-plugin-proposal-optional-chaining

    • Handle cases when ?? and ?. is in binding initializers (@JLHwung)

  • babel-helper-builder-react-jsx-experimental, babel-plugin-transform-react-jsx-development, babel-plugin-transform-react-jsx, babel-preset-react

    • add .js extension to react runtime for JSX transform (@lunaruan)

  • babel-traverse, babel-types

    • fix: mark Pattern in CatchClause as scope (@JLHwung)

  • babel-generator

  • babel-plugin-transform-modules-systemjs

    • Fix reexporting init-less variable in systemjs (@JLHwung)

  • babel-helper-module-transforms, babel-plugin-transform-modules-amd, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-umd, babel-plugin-transform-runtime

    • [cjs] Skip duplicate reexported bindings in namespace reexports (@mischnic)

  • babel-helper-create-regexp-features-plugin, babel-plugin-transform-unicode-regex

  • babel-plugin-proposal-do-expressions, babel-traverse

    • fix(do-expr): SwitchStatement with IfStatement cases (@barronwei)

:nail_care: Polish

  • babel-parser

    • [parser] Better error message for missing number exponent (@iamfotx)

    • Throw a syntax error for a parameter properties in not constructor (@sosukesuzuki)

  • babel-helper-compilation-targets, babel-helper-validator-option, babel-preset-env

    • refactor: add @babel/helper-validator-option (@JLHwung)

:house: Internal

  • babel-cli, babel-helper-transform-fixture-test-runner, babel-traverse

    • Replace lodash 'defaults' usage with ES6 Spread initializer (@jayaddison)

  • babel-plugin-transform-runtime, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime

  • babel-core

  • babel-plugin-proposal-logical-assignment-operators, babel-plugin-proposal-numeric-separator, babel-plugin-syntax-import-meta, babel-plugin-syntax-logical-assignment-operators, babel-plugin-syntax-numeric-separator, babel-plugin-transform-modules-systemjs, babel-preset-env, babel-standalone

  • Other

  • babel-compat-data, babel-preset-env

    • chore: bump electron-to-chromium (@JLHwung)

  • babel-parser

  • babel-core, babel-plugin-transform-runtime

    • docs: Fix simple typo, preprelease -> pre-release (@timgates42)

  • babel-compat-data

    • chore: remove unused dependencies (@JLHwung)