Skip to content

Commit

Permalink
Merge master into 7.0 (#5310)
Browse files Browse the repository at this point in the history
* Add new flow preset (#5288)

* Fix PathHoister hoisting JSX member expressions on "this". (#5143)

The PathHoister ignored member references on "this", causing it
to potentially hoist an expression above its function scope.

This patch tells the hoister to watch for "this", and if seen,
mark the nearest non-arrow function scope as the upper limit
for hoistng.

This fixes #4397 and is an alternative to #4787.

* Fix PathHoister hoisting before bindings. (#5153)

Fixes #5149 and enables a few additional safe hoists.

* Fix linting error

* feature: Support pure expressions in transform-react-constant-elements (#4812)

* Fix loose for-of with label (#5298)

* Rewrite Hub as interface #5047 (#5050)

* Rewrite Hub as interface #5047

* Update index.js

* Avoid adding unnecessary closure for block scoping (#5246)

When you write

```
for (const x of l) {
  setTimeout(() => x);
}
```

we need to add a closure because the variable is meant to be block-scoped and recreated each time the block runs. We do this.

However, we also add the closure when no loop is present. This isn't necessary, because if no loop is present then each piece of code runs at most once. I changed the transform to only add a closure if a variable is referenced from within a loop.

* Add greenkeeperio-bot to mention-bot blacklist (#5301) [skip ci]

* Upgrade lerna to current beta. (#5300)

* Revert "Upgrade lerna to current beta." (#5303)

* Add charset so tests work with convert-source-map@>1.4 (#5302)

* Add CHANGELOG for 6.23.0 [skip ci] (#5304)

* Update babel-types README from script.

* v6.23.0

* Revert change that lerna force-committed.

* Revert "Rewrite Hub as interface #5047" (#5306)

* v6.23.1

* Revert lerna again
  • Loading branch information
danez committed Feb 14, 2017
1 parent dde70c0 commit 266332a
Show file tree
Hide file tree
Showing 87 changed files with 828 additions and 254 deletions.
8 changes: 7 additions & 1 deletion .mention-bot
@@ -1,5 +1,11 @@
{
"userBlacklist": [ "amasad", "thejameskyle", "jmm", "kittens" ],
"userBlacklist": [
"amasad",
"greenkeeperio-bot",
"jmm",
"kittens",
"thejameskyle"
],
"fileBlacklist": ["*.md"],
"skipAlreadyAssignedPR": true,
"createReviewRequest": true
Expand Down
90 changes: 90 additions & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,96 @@ _Note: Gaps between patch versions are faulty, broken or test releases._

See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.

## 6.23.0 (2017-02-13)

#### :rocket: New Feature
* `babel-plugin-transform-react-constant-elements`
* [#4812](https://github.com/babel/babel/pull/4812) feature: Support pure expressions in transform-react-constant-elements. ([@STRML](https://github.com/STRML))
* `babel-preset-flow`, `babel-preset-react`
* [#5288](https://github.com/babel/babel/pull/5288) Add new flow preset. ([@thejameskyle](https://github.com/thejameskyle))
* `babel-traverse`
* [#5230](https://github.com/babel/babel/pull/5230) Add path/family sibling traversal methods. ([@chitchu](https://github.com/chitchu))
* `babel-plugin-transform-es2015-block-scoping`
* [#5236](https://github.com/babel/babel/pull/5236) Add option to block-scoping to throw on slow code. ([@spicyj](https://github.com/spicyj))

#### :bug: Bug Fix
* `babel-core`, `babel-traverse`
* [#5050](https://github.com/babel/babel/pull/5050) Rewrite Hub as interface #5047. ([@yongxu](https://github.com/yongxu))
* `babel-plugin-transform-es2015-for-of`
* [#5298](https://github.com/babel/babel/pull/5298) Fix loose for-of with label. ([@jridgewell](https://github.com/jridgewell))
* `babel-plugin-transform-react-constant-elements`, `babel-traverse`
* [#5153](https://github.com/babel/babel/pull/5153) Fix react constant elements bindings. ([@STRML](https://github.com/STRML))
* [#5143](https://github.com/babel/babel/pull/5143) Fix PathHoister hoisting JSX member expressions on "this".. ([@STRML](https://github.com/STRML))
* `babel-plugin-transform-do-expressions`, `babel-traverse`
* [#5030](https://github.com/babel/babel/pull/5030) Prevent multiple return statements in a loop when replacing expressions. ([@existentialism](https://github.com/existentialism))
* `babel-register`
* [#5260](https://github.com/babel/babel/pull/5260) Fix TypeError with babel-register's cache. ([@xtuc](https://github.com/xtuc))
* `babel-traverse`
* [#5206](https://github.com/babel/babel/pull/5206) Deopt evaluation of undefined with a local binding. Closes [#5204](https://github.com/babel/babel/issues/5204). ([@boopathi](https://github.com/boopathi))
* `babel-plugin-transform-runtime`
* [#5195](https://github.com/babel/babel/pull/5195) Don't transpile ES7 symbol properties. ([@taion](https://github.com/taion))
* `babel`
* [#5258](https://github.com/babel/babel/pull/5258) checks if babel is installed globally and displays correct cli message. ([@xtina-starr](https://github.com/xtina-starr))
* `babel-generator`
* [#5270](https://github.com/babel/babel/pull/5270) Emit parens for await of ternary expressions. ([@erikdesjardins](https://github.com/erikdesjardins))
* [#5193](https://github.com/babel/babel/pull/5193) Fix missing parens when function expressions is tag. ([@existentialism](https://github.com/existentialism))
* `babel-plugin-transform-es2015-modules-commonjs`
* [#5235](https://github.com/babel/babel/pull/5235) Limit export node default assignment stack size #4323. ([@mattste](https://github.com/mattste))

#### :memo: Documentation
* `babel-*`
* [#5244](https://github.com/babel/babel/pull/5244) Normalize options sections in docs [skip ci]. ([@existentialism](https://github.com/existentialism))
* [#5216](https://github.com/babel/babel/pull/5216) Remove link to REPL. ([@xtuc](https://github.com/xtuc))
* Other
* [#5242](https://github.com/babel/babel/pull/5242) Add our business model [skip ci]. ([@hzoo](https://github.com/hzoo))
* `babel-plugin-transform-es2015-spread`
* [#5227](https://github.com/babel/babel/pull/5227) Add example to spread README [skip ci]. ([@finkef](https://github.com/finkef))
* `babel-plugin-transform-flow-strip-types`
* [#5212](https://github.com/babel/babel/pull/5212) Remove REPL link transform-flow-strip-types doc. ([@xtuc](https://github.com/xtuc))
* `babel-plugin-transform-regenerator`
* [#5202](https://github.com/babel/babel/pull/5202) Fix transform-regenerator README. ([@xtuc](https://github.com/xtuc))
* `babel-plugin-transform-es2015-arrow-functions`
* [#5200](https://github.com/babel/babel/pull/5200) Fix transform-es2015-arrow-functions code blocks on the website. ([@xtuc](https://github.com/xtuc))
* [#5194](https://github.com/babel/babel/pull/5194) Fix transform-es2015-arrow-functions README. ([@xtuc](https://github.com/xtuc))

#### :house: Internal
* `babel-core`
* [#5302](https://github.com/babel/babel/pull/5302) Add charset so tests work with convert-source-map@>1.4. ([@loganfsmyth](https://github.com/loganfsmyth))
* `babel-core`, `babel-traverse`
* [#5050](https://github.com/babel/babel/pull/5050) Rewrite Hub as interface #5047. ([@yongxu](https://github.com/yongxu))
* `babel-generator`
* [#5255](https://github.com/babel/babel/pull/5255) codegen performance: use trim instead of lodash/trimEnd. ([@jwbay](https://github.com/jwbay))
* `babel-types`
* [#5181](https://github.com/babel/babel/pull/5181) Remove uses of lodash/compact. ([@zertosh](https://github.com/zertosh))
* `babel-*`
* [#5265](https://github.com/babel/babel/pull/5265) Re-enable the max-len ESLint rule.. ([@loganfsmyth](https://github.com/loganfsmyth))
* Other
* [#5264](https://github.com/babel/babel/pull/5264) Add a sublime project file. ([@loganfsmyth](https://github.com/loganfsmyth))
* [#5182](https://github.com/babel/babel/pull/5182) Run coverage only once. ([@existentialism](https://github.com/existentialism))
* [#5165](https://github.com/babel/babel/pull/5165) Add Node 7 to CI. ([@chicoxyzzy](https://github.com/chicoxyzzy))

#### Committers: 20
- Andres Suarez ([zertosh](https://github.com/zertosh))
- Ben Alpert ([spicyj](https://github.com/spicyj))
- Boopathi Rajaa ([boopathi](https://github.com/boopathi))
- Brian Ng ([existentialism](https://github.com/existentialism))
- Christina ([xtina-starr](https://github.com/xtina-starr))
- Erik Desjardins ([erikdesjardins](https://github.com/erikdesjardins))
- Fabian Finke ([finkef](https://github.com/finkef))
- Henry Zhu ([hzoo](https://github.com/hzoo))
- Jimmy Jia ([taion](https://github.com/taion))
- Justin Ridgewell ([jridgewell](https://github.com/jridgewell))
- Logan Smyth ([loganfsmyth](https://github.com/loganfsmyth))
- Matt Stewart ([mattste](https://github.com/mattste))
- Samuel Reed ([STRML](https://github.com/STRML))
- Sergey Rubanov ([chicoxyzzy](https://github.com/chicoxyzzy))
- Sven SAULEAU ([xtuc](https://github.com/xtuc))
- Vicente Jr Yuchitcho ([chitchu](https://github.com/chitchu))
- Yongxu Ren ([yongxu](https://github.com/yongxu))
- [jwbay](https://github.com/jwbay)
- james kyle ([thejameskyle](https://github.com/thejameskyle))
- Łukasz Lityński ([hex13](https://github.com/hex13))

## 6.22.2 (2017-01-19)

#### :bug: Bug Fix
Expand Down
8 changes: 4 additions & 4 deletions packages/babel-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-cli",
"version": "6.22.2",
"version": "6.23.0",
"description": "Babel command line.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
Expand All @@ -16,9 +16,9 @@
"compiler"
],
"dependencies": {
"babel-core": "^6.22.1",
"babel-register": "^6.22.0",
"babel-polyfill": "^6.22.0",
"babel-core": "^6.23.0",
"babel-register": "^6.23.0",
"babel-polyfill": "^6.23.0",
"commander": "^2.8.1",
"convert-source-map": "^1.1.0",
"fs-readdir-recursive": "^1.0.0",
Expand Down
20 changes: 10 additions & 10 deletions packages/babel-core/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-core",
"version": "6.22.1",
"version": "6.23.1",
"description": "Babel compiler core.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
Expand All @@ -27,13 +27,13 @@
},
"dependencies": {
"babel-code-frame": "^6.22.0",
"babel-generator": "^6.22.0",
"babel-helpers": "^6.22.0",
"babel-messages": "^6.22.0",
"babel-template": "^6.22.0",
"babel-register": "^6.22.0",
"babel-traverse": "^6.22.1",
"babel-types": "^6.22.0",
"babel-generator": "^6.23.0",
"babel-helpers": "^6.23.0",
"babel-messages": "^6.23.0",
"babel-template": "^6.23.0",
"babel-register": "^6.23.0",
"babel-traverse": "^6.23.1",
"babel-types": "^6.23.0",
"babylon": "^6.11.0",
"convert-source-map": "^1.1.0",
"debug": "^2.1.1",
Expand All @@ -46,7 +46,7 @@
},
"devDependencies": {
"babel-helper-fixtures": "^6.22.0",
"babel-helper-transform-fixture-test-runner": "^6.22.0",
"babel-polyfill": "^6.22.0"
"babel-helper-transform-fixture-test-runner": "^6.23.0",
"babel-polyfill": "^6.23.0"
}
}
@@ -1,6 +1,6 @@
function wrapper(fn) {
return (...args) => {
if (someCondition) {
while (someCondition) {
const val = fn(...args);
return val.test(() => {
console.log(val);
Expand Down
Expand Up @@ -2,17 +2,19 @@ function wrapper(fn) {
return function () {
var _arguments = arguments;

if (someCondition) {
var _ret = function () {
var val = fn(..._arguments);
return {
v: val.test(function () {
console.log(val);
})
};
}();
var _loop = function () {
var val = fn(..._arguments);
return {
v: val.test(function () {
console.log(val);
})
};
};

while (someCondition) {
var _ret = _loop();

if (typeof _ret === "object") return _ret.v;
}
};
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/babel-generator/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-generator",
"version": "6.22.0",
"version": "6.23.0",
"description": "Turns an AST into code.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
Expand All @@ -11,9 +11,9 @@
"lib"
],
"dependencies": {
"babel-messages": "^6.22.0",
"babel-types": "^6.22.0",
"detect-indent": "^5.0.0",
"babel-messages": "^6.23.0",
"babel-types": "^6.23.0",
"detect-indent": "^4.0.0",
"jsesc": "^1.3.0",
"lodash": "^4.2.0",
"source-map": "^0.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-helper-builder-react-jsx/package.json
@@ -1,12 +1,12 @@
{
"name": "babel-helper-builder-react-jsx",
"version": "6.22.0",
"version": "6.23.0",
"description": "Helper function to build react jsx",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-react-jsx",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-types": "^6.22.0",
"babel-types": "^6.23.0",
"esutils": "^2.0.0",
"lodash": "^4.2.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-helper-define-map/package.json
@@ -1,13 +1,13 @@
{
"name": "babel-helper-define-map",
"version": "6.22.0",
"version": "6.23.0",
"description": "Helper function to define a map",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-define-map",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"lodash": "^4.2.0",
"babel-types": "^6.22.0",
"babel-helper-function-name": "^6.22.0"
"babel-types": "^6.23.0",
"babel-helper-function-name": "^6.23.0"
}
}
8 changes: 4 additions & 4 deletions packages/babel-helper-function-name/package.json
@@ -1,14 +1,14 @@
{
"name": "babel-helper-function-name",
"version": "6.22.0",
"version": "6.23.0",
"description": "Helper function to change the property 'name' of every function",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-types": "^6.22.0",
"babel-traverse": "^6.22.0",
"babel-types": "^6.23.0",
"babel-traverse": "^6.23.0",
"babel-helper-get-function-arity": "^6.22.0",
"babel-template": "^6.22.0"
"babel-template": "^6.23.0"
}
}
4 changes: 2 additions & 2 deletions packages/babel-helper-optimise-call-expression/package.json
@@ -1,11 +1,11 @@
{
"name": "babel-helper-optimise-call-expression",
"version": "6.22.0",
"version": "6.23.0",
"description": "Helper function to optimise call expression",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-optimise-call-expression",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-types": "^6.22.0"
"babel-types": "^6.23.0"
}
}
12 changes: 6 additions & 6 deletions packages/babel-helper-replace-supers/package.json
@@ -1,15 +1,15 @@
{
"name": "babel-helper-replace-supers",
"version": "6.22.0",
"version": "6.23.0",
"description": "Helper function to replace supers",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-replace-supers",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-helper-optimise-call-expression": "^6.22.0",
"babel-traverse": "^6.22.0",
"babel-messages": "^6.22.0",
"babel-template": "^6.22.0",
"babel-types": "^6.22.0"
"babel-helper-optimise-call-expression": "^6.23.0",
"babel-traverse": "^6.23.0",
"babel-messages": "^6.23.0",
"babel-template": "^6.23.0",
"babel-types": "^6.23.0"
}
}
@@ -1,15 +1,15 @@
{
"name": "babel-helper-transform-fixture-test-runner",
"version": "6.22.0",
"version": "6.23.0",
"description": "Transform test runner for babel-helper-fixtures module",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-transform-fixture-test-runner",
"main": "lib/index.js",
"dependencies": {
"babel-core": "^6.22.0",
"babel-polyfill": "^6.22.0",
"babel-core": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-helper-fixtures": "^6.22.0",
"source-map": "^0.5.0",
"babel-code-frame": "^6.22.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-helpers/package.json
@@ -1,13 +1,13 @@
{
"name": "babel-helpers",
"version": "6.22.0",
"version": "6.23.0",
"description": "Collection of helper functions used by Babel transforms.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helpers",
"main": "lib/index.js",
"dependencies": {
"babel-template": "^6.22.0"
"babel-template": "^6.23.0"
}
}
2 changes: 1 addition & 1 deletion packages/babel-messages/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-messages",
"version": "6.22.0",
"version": "6.23.0",
"description": "Collection of debug messages used by Babel.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-plugin-transform-class-properties/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-transform-class-properties",
"version": "6.22.0",
"version": "6.23.0",
"description": "This plugin transforms static class properties as well as properties declared with the property initializer syntax",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-class-properties",
"license": "MIT",
Expand All @@ -9,9 +9,9 @@
"babel-plugin"
],
"dependencies": {
"babel-helper-function-name": "^6.22.0",
"babel-helper-function-name": "^6.23.0",
"babel-plugin-syntax-class-properties": "^6.8.0",
"babel-template": "^6.22.0"
"babel-template": "^6.23.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "^6.22.0"
Expand Down

0 comments on commit 266332a

Please sign in to comment.