Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d28583bea1 | ||
|
|
b166f35218 | ||
|
|
0914378bba | ||
|
|
660d764390 | ||
|
|
d919d7837c | ||
|
|
b49cf4e779 | ||
|
|
e30dd7042b | ||
|
|
16d8d928e8 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -13,6 +13,17 @@ _Note: Gaps between patch versions are faulty/broken releases._
|
||||
|
||||
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
|
||||
|
||||
## 4.7.16
|
||||
|
||||
* **Bug Fix**
|
||||
* Fix constructor spreading of typed arrays.
|
||||
* Fix break/continue/return aliasing of non-loops in block scoping transformer.
|
||||
|
||||
## 4.7.15
|
||||
|
||||
* **Bug Fix**
|
||||
* Fix constructor spreading of collections.
|
||||
|
||||
## 4.7.14
|
||||
|
||||
* **Bug Fix**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "4.7.14",
|
||||
"version": "4.7.16",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"repository": "babel/babel",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-runtime",
|
||||
"description": "babel selfContained runtime",
|
||||
"version": "4.7.13",
|
||||
"version": "4.7.15",
|
||||
"repository": "babel/babel",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"dependencies": {
|
||||
|
||||
@@ -527,10 +527,6 @@ class BlockScoping {
|
||||
}
|
||||
|
||||
if (has.hasBreakContinue) {
|
||||
if (!loop) {
|
||||
throw new Error("Aren't in a loop and we're trying to reassign breaks and continues, something is going wrong here.");
|
||||
}
|
||||
|
||||
for (var key in has.map) {
|
||||
cases.push(t.switchCase(t.literal(key), [has.map[key]]));
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ function registerType(type: string, skipAliasCheck?: boolean) {
|
||||
}
|
||||
|
||||
export var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
|
||||
export var NATIVE_TYPE_NAMES = ["Array", "Object", "Number", "Boolean", "Date", "Array", "String", "Promise"];
|
||||
export var NATIVE_TYPE_NAMES = ["Array", "Object", "Number", "Boolean", "Date", "Array", "String", "Promise", "Set", "Map", "WeakMap", "WeakSet", "Uint16Array", "ArrayBuffer", "DataView", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Uint32Array", "Int32Array", "Float32Array", "Int16Array", "Float64Array"];
|
||||
export var FLATTENABLE_KEYS = ["body", "expressions"];
|
||||
export var FOR_INIT_KEYS = ["left", "init"];
|
||||
export var COMMENT_KEYS = ["leadingComments", "trailingComments"];
|
||||
|
||||
14
test/fixtures/transformation/es6-block-scoping/issue-1051/actual.js
vendored
Normal file
14
test/fixtures/transformation/es6-block-scoping/issue-1051/actual.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
foo.func1 = function() {
|
||||
if (cond1) {
|
||||
for (;;) {
|
||||
if (cond2) {
|
||||
function func2() {}
|
||||
function func3() {}
|
||||
func4(function() {
|
||||
func2();
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
22
test/fixtures/transformation/es6-block-scoping/issue-1051/expected.js
vendored
Normal file
22
test/fixtures/transformation/es6-block-scoping/issue-1051/expected.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
foo.func1 = function () {
|
||||
if (cond1) {
|
||||
for (;;) {
|
||||
if (cond2) {
|
||||
var _ret = (function () {
|
||||
var func2 = function () {};
|
||||
|
||||
var func3 = function () {};
|
||||
|
||||
func4(function () {
|
||||
func2();
|
||||
});
|
||||
return "break";
|
||||
})();
|
||||
|
||||
if (_ret === "break") break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user