Npms_big

babel-preset-stage-0

6.22.0

Babel preset for stage 0 plugins

Critical or Security advisories for 6.22.0

This version doesn't have any advisory. Want to report one?

Changelog for 6.22.0

6.22.0 (2017-01-19)

Thanks to 10 new contributors! (23 total)

A quick update since it's been over a month already: adds support for shorthand import syntax in Flow + some fixes!

We'll be merging in our current 7.0 PRs on a 7.0 branch soon and I'l be making some more issues (most should be beginner-friendly).

To follow our progress check out our 7.0 milestone, the wiki and upcoming announcements on twitter!

We support stripping out and generating the new shorthand import syntax in Flow (parser support was added in babylon@6.15.0.

js import { someValue, type someType, typeof someOtherValue, } from "blah";

:rocket: New Feature

  • babel-generator, babel-types
  • babel-plugin-transform-flow-strip-types, babel-traverse
    • #5035 Strip Flow's new shorthand import-type specifiers. (@jeffmo)
  • babel-core
    • #4729 Add resolvePlugin and resolvePreset methods to babel-core API. (@rmacklin)

:bug: Bug Fix

  • babel-plugin-transform-object-rest-spread

js const { x, ...y } = foo();

Old Behavior

js const { x } = foo(); const y = _objectWithoutProperties(foo(), ["x"]);

New/Expected Behavior

js const _ref = foo(); // should only be called once const { x } = _ref; const y = _objectWithoutProperties(_ref, ["x"]); - babel-cli - #4790 fixes invalid line offsets in merged sourcemaps. (@peterm0x) - babel-plugin-transform-object-rest-spread - #5088 fix: plugin-transform-object-rest-spread param with default value. (@christophehurpeau)

Accounts for default values in object rest params

js function fn({a = 1, ...b} = {}) { return {a, b}; } - babel-plugin-transform-es2015-destructuring - #5093 Ensure array is always copied during destructure. (@existentialism)

``` js const assign = ([...arr], index, value) => { arr[index] = value return arr }

const arr = [1, 2, 3] assign(arr, 1, 42) console.log(arr) // [1, 2, 3] `` -babel-plugin-transform-es2015-function-name` - #5008 Don't try to visit ArrowFunctionExpression, they cannot be named. (@Kovensky)

Input

js export const x = ({ x }) => x; export const y = function () {};

Output

js export const x = ({ x }) => x; export const y = function y() {}; - babel-types - #5068 Fix getBindingIdentifiers in babel-types. (@rtsao) - babel-cli - #3698 Watch mode should wait for file write. (T7411) (@hayeah)

:nail_care: Polish

  • babel-traverse
    • #5076 Optimize removal-hooks for ArrowFunctions. (@danez)
  • babel-generator, babel-plugin-transform-exponentiation-operator

:memo: Documentation

  • Other
  • babel-core
  • babel-plugin-syntax-class-constructor-call
    • #5130 update syntax-class-constructor-call documentation. (@xtuc)
  • babel-plugin-transform-es2015-duplicate-keys, babel-plugin-transform-es2015-parameters
    • #5111 Fixes some inconsistent documentation. (@xtuc)
  • babel-plugin-transform-es2015-computed-properties, babel-plugin-transform-es2015-for-of
  • babel-plugin-transform-class-properties
    • #5077 Static function call result comment does not match variable content [skip ci]. (@kasn)
  • Other
  • babel-plugin-transform-es2015-classes, babel-plugin-transform-function-bind
  • babel-helpers
    • #5059 Fix incorrect snippet language in babel-helpers. (@xtuc)
  • babel-preset-react
  • babel-plugin-check-es2015-constants, babel-plugin-transform-es2015-modules-umd, babel-plugin-transform-es2015-typeof-symbol, babel-register
  • babel-core

:house: Internal

  • babel-*
  • babel-helper-transform-fixture-test-runner
  • babel-cli, babel-core, babel-generator, babel-helper-define-map, babel-register, babel-runtime, babel-types
    • #5043 Replace "lodash/is*" and "lodash/each" with native equivalents. (@zertosh)
  • babel-cli, babel-generator, babel-helper-fixtures, babel-helper-transform-fixture-test-runner, babel-preset-es2015, babel-runtime, babel-traverse
    • #5042 Use native or lodash util module where full "lodash" is required. (@zertosh)
  • babel-code-frame
  • babel-plugin-transform-react-jsx
  • babel-plugin-transform-decorators
  • babel-plugin-transform-es2015-computed-properties
  • babel-cli

Committers: 23, First PRs: 10

Dependencies for 6.22.0

Name Requirement Status
^6.22.0

^6.22.0

^6.22.0

My projects using babel-preset-stage-0

Name Locked version Requirement
You should be logged in to see which of your projects use babel-preset-stage-0.