Compare commits

...

12 Commits

Author SHA1 Message Date
Sebastian McKenzie
658dde768e v5.1.2 2015-04-13 00:52:43 -07:00
Sebastian McKenzie
8df1d81ca4 fix iterable runtime name 2015-04-13 00:51:50 -07:00
Sebastian McKenzie
a505e4a121 aAdd getIterator and isIterable to babel-runtime build script - fixes #1243 2015-04-13 00:48:19 -07:00
Sebastian McKenzie
71eafdcac7 5.1.1 2015-04-13 00:14:47 -07:00
Sebastian McKenzie
65060b0c97 v5.1.1 2015-04-13 00:13:52 -07:00
Sebastian McKenzie
09883962f1 add item to 5.1.0 changelog 2015-04-13 00:13:05 -07:00
Sebastian McKenzie
1583262807 add missing runtime symbol definitions - fixes #1242 2015-04-13 00:12:59 -07:00
Sebastian McKenzie
04c7cd5c0c add note to 5.1.0 changelog 2015-04-12 21:29:29 -07:00
Sebastian McKenzie
3f6969f4f8 5.1.0 2015-04-12 21:23:21 -07:00
Sebastian McKenzie
23db842cb8 v5.1.0 2015-04-12 21:22:25 -07:00
Sebastian McKenzie
41c82e00f9 add 5.1.0 changelog 2015-04-12 21:21:35 -07:00
Sebastian McKenzie
766099e783 5.0.13 2015-04-12 21:21:31 -07:00
11 changed files with 71 additions and 10 deletions

View File

@@ -13,6 +13,40 @@ _Note: Gaps between patch versions are faulty/broken releases._
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
## 5.1.2
* **Bug Fix**
* Add `getIterator` and `isIterable` to `babel-runtime` build script.
## 5.1.1
* **Bug Fix**
* Add missing runtime symbol definitions.
## 5.1.0
* **Bug Fix**
* Fix super reference when using decorators.
* Don't do array unpack optimisation when member expressions are present.
* Add missing descriptors for undecorated class properties.
* Don't consider `arguments` and `eval` valid function names when doing function name inferrence.
* Fix scope tracking of constants in loop heads.
* Parse `AwaitExpression` as a unary instead of an assignment.
* Fix regex evaluation when attempting static evaluation.
* Don't emit tokens when doing a lookahead.
* Add missing `test` declaration to `utility.deadCodeElimination` transformer.
* **Internal**
* Upgrade `regenerator` to the latest and use my branch with the hope of eventually switching to vanilla regenerator.
* Add support for the replacement of for loop `init`s with statements.
* Upgrade dependencies.
* **Polish**
* When adding the scope IIFE when using default parameters, don't shadow the function expression, just `apply` `this` and `arguments` if necessary.
* Use path basename as non-default import fallback.
* **New Feature**
* Add [trailing function comma proposal](https://github.com/jeffmo/es-trailing-function-commas). Thanks [@AluisioASG](https://github.com/AluisioASG)!
* Add support for object literal decorators.
* Make core-js modular when using the `runtime` transformer.
## 5.0.12
* **Bug Fix**

View File

@@ -1,7 +1,7 @@
{
"name": "babel-core",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.0.13",
"version": "5.1.2",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"repository": "babel/babel",

View File

@@ -1,13 +1,13 @@
{
"name": "babel",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.0.12",
"version": "5.1.1",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"repository": "babel/babel",
"preferGlobal": true,
"dependencies": {
"babel-core": "^5.0.12",
"babel-core": "^5.1.1",
"chokidar": "^1.0.0",
"commander": "^2.6.0",
"fs-readdir-recursive": "^0.1.0",
@@ -22,4 +22,4 @@
"babel-node": "./bin/babel-node",
"babel-external-helpers": "./bin/babel-external-helpers"
}
}
}

View File

@@ -1,7 +1,7 @@
{
"name": "babel-runtime",
"description": "babel selfContained runtime",
"version": "5.0.12",
"version": "5.1.1",
"repository": "babel/babel",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"dependencies": {

View File

@@ -77,7 +77,7 @@ writeFile("regenerator/runtime.js", selfContainify(readFile("regenerator-babel/r
var coreDefinitions = require("../lib/babel/transformation/transformers/other/runtime/definitions");
var paths = [];
var paths = ["is-iterable", "get-iterator"];
each(coreDefinitions.builtins, function (path) {
paths.push(path);

View File

@@ -7,6 +7,7 @@
"Set": "set",
"WeakSet": "weak-set"
},
"methods": {
"Array": {
"concat": "array/concat",
@@ -94,6 +95,21 @@
"addLocale": "date/add-locale",
"formatUTC": "date/format-utc",
"format": "date/format"
},
"Symbol": {
"for": "symbol/for",
"hasInstance": "symbol/for-instance",
"is-concat-spreadable": "symbol/is-concat-spreadable",
"iterator": "symbol/iterator",
"keyFor": "symbol/key-for",
"match": "symbol/match",
"replace": "symbol/replace",
"search": "symbol/search",
"species": "symbol/species",
"split": "symbol/split",
"toPrimitive": "symbol/to-primitive",
"toStringTag": "symbol/to-string-tag",
"unscopables": "symbol/unscopables"
}
}
}

View File

@@ -51,7 +51,7 @@ var astVisitor = {
var left = node.left;
if (!isSymbolIterator(left)) return;
return t.callExpression(file.addImport(`${RUNTIME_MODULE_NAME}/core-js/is-iterator`, "isIterable", true), [node.right]);
return t.callExpression(file.addImport(`${RUNTIME_MODULE_NAME}/core-js/is-iterable`, "isIterable", true), [node.right]);
}
}
};

View File

@@ -713,6 +713,11 @@ export default class TraversalPath {
var search = [this.node];
var i = 0;
function matches(name) {
var part = parts[i];
return part === "*" || name === part;
}
while (search.length) {
var node = search.shift();
@@ -722,10 +727,10 @@ export default class TraversalPath {
if (t.isIdentifier(node)) {
// this part doesn't match
if (parts[i] !== node.name) return false;
if (!matches(node.name)) return false;
} else if (t.isLiteral(node)) {
// this part doesn't match
if (parts[i] !== node.value) return false;
if (!matches(node.value)) return false;
} else if (t.isMemberExpression(node)) {
if (node.computed && !t.isLiteral(node.property)) {
// we can't deal with this

View File

@@ -1,5 +1,5 @@
"use strict";
var _isIterable = require("babel-runtime/core-js/is-iterator")["default"];
var _isIterable = require("babel-runtime/core-js/is-iterable")["default"];
_isIterable(Object(arr));

View File

@@ -0,0 +1 @@
Symbol.iterator;

View File

@@ -0,0 +1,5 @@
"use strict";
var _Symbol$iterator = require("babel-runtime/core-js/symbol/iterator")["default"];
_Symbol$iterator;