Skip to content

v7.0.0-alpha.17

Pre-release
Pre-release
Compare
Choose a tag to compare
@hzoo hzoo released this 26 Jul 12:41
· 8213 commits to main since this release

v7.0.0-alpha.17 (2017-07-26)

Summary

  • Lots of bug fixes
  • function.sent (temporary at babel-plugin-transform-function-sent2 until we get access to the npm package) EDIT: republished babel-plugin-transform-function-sent
  • Optional catch binding try {} catch {}: babel-plugin-transform-optional-catch-binding
  • es2015-parameters loose mode that doesn't use arguments

馃憮 Spec Compliancy

  • babel-plugin-check-es2015-constants

Instead of throwing a compile time error when const is violated, Babel should insert a throw statement before the violation.

馃挜 Breaking Change

Removes the "Noop" AST node, which was only used in the flow-comments plugin and probably unlikely in the ecosystem.

馃殌 New Feature

  • babel-plugin-transform-react-constant-elements
    • #5307 feature: Support whitelisting mutable props for react-constant-elements. (@STRML)

If you know a certain property will be ok to hoist

{
  "plugins": [
    ["transform-react-constant-elements", {"allowMutablePropsOnTags": ["FormattedMessage"]}],
  ]
}
  • babel-generator, babel-types
  • babel-generator, babel-plugin-transform-flow-strip-types, babel-types
declare function foo(x: mixed): boolean %checks(x !== null);
  • babel-generator, babel-plugin-transform-flow-strip-types
declare module "foo" { declare export type * from "bar"; }
  • babel-helper-remap-async-to-generator, babel-helper-wrap-function, babel-helpers, babel-plugin-transform-function-sent, babel-preset-stage-2
function* gen() {
  let a = function.sent;
}
let gen = _skipFirstGeneratorNext(function* gen() {
  const _functionSent = yield;
  let a = _functionSentt;
})
  • babel-core, babel-generator, babel-plugin-syntax-optional-catch-binding, babel-plugin-transform-optional-catch-binding, babel-template, babel-traverse, babel-types
try {} catch {}
  • babel-plugin-transform-es2015-parameters

Non-spec compliant transform (disregards arity) but doesn't use arguments

var t = function (f = "foo") {
  return f + " bar";
};
var t = function (f) {
  if (f === void 0) {
    f = "foo";
  }

  return f + " bar";
};

馃悰 Bug Fix

  • babel-core, babel-helpers, babel-plugin-transform-object-rest-spread, babel-plugin-transform-react-constant-elements
    • #5757 Non string computed keys in object-rest-spread. (@peey)
  • babel-traverse
    • #5745 Use first binding for multiple var declarations. (@peey)
  • babel-helper-builder-binary-assignment-operator-visitor, babel-helper-explode-assignable-expression, babel-plugin-transform-exponentiation-operator
  • babel-plugin-transform-es2015-for-of, babel-traverse
  • babel-plugin-transform-numeric-separator, babel-types
  • babel-plugin-transform-es2015-modules-amd, babel-plugin-transform-es2015-modules-commonjs, babel-plugin-transform-es2015-modules-umd
  • babel-plugin-transform-es2015-for-of
  • babel-core, babel-plugin-transform-object-rest-spread, babel-traverse
  • babel-generator
  • babel-helpers, babel-plugin-transform-es2015-classes, babel-plugin-transform-es2015-typeof-symbol
  • babel-plugin-transform-react-inline-elements

馃彔 Internal

  • babel-helper-transform-fixture-test-runner
  • babel-code-frame
  • babel-register
  • babel-types
  • babel-cli
  • babel-generator
  • babel-traverse
  • Other
  • babel-core, babel-generator, babel-helper-builder-react-jsx, babel-helper-function-name, babel-helper-replace-supers, babel-plugin-transform-es2015-block-scoping, babel-plugin-transform-es2015-classes, babel-plugin-transform-jscript, babel-plugin-transform-react-constant-elements, babel-plugin-transform-react-jsx, babel-template, babel-traverse, babel-types
  • babel-plugin-transform-es2015-modules-systemjs

Committers: 15