babel-core
Advanced tools
Comparing version 4.7.9 to 4.7.10
@@ -16,2 +16,9 @@ # Changelog | ||
## 4.7.10 | ||
* **Internal** | ||
* Deprecate `playground.methodBinding` and `playground.objectGetterMemoization`. | ||
* **Bug Fix** | ||
* Fix `inputSourceMap` option. Thanks [@Rich-Harris](https://github.com/Rich-Harris)! | ||
## 4.7.9 | ||
@@ -18,0 +25,0 @@ |
@@ -242,3 +242,3 @@ "use strict"; | ||
if (opts.inputSourceMap === false) { | ||
if (opts.inputSourceMap !== false) { | ||
var inputMap = convertSourceMap.fromSource(code); | ||
@@ -245,0 +245,0 @@ if (inputMap) { |
@@ -31,2 +31,3 @@ "use strict"; | ||
build: function build(node, file) { | ||
console.error("The memoization operator is deprecated and will be removed in 5.0.0"); | ||
return t.unaryExpression("!", t.callExpression(t.memberExpression(file.addHelper("has-own"), t.identifier("call")), [node.object, node.property]), true); | ||
@@ -33,0 +34,0 @@ } |
@@ -25,2 +25,4 @@ "use strict"; | ||
console.error("Object getter memoization is deprecated and will be removed in 5.0.0"); | ||
var value = node.value; | ||
@@ -27,0 +29,0 @@ t.ensureBlock(value); |
@@ -80,26 +80,2 @@ "use strict"; | ||
Binding.prototype.getValueIfImmutable = function getValueIfImmutable() { | ||
// can't guarantee this value is the same | ||
if (this.reassigned) return; | ||
var node = this.path.node; | ||
if (t.isVariableDeclarator(node)) { | ||
if (t.isIdentifier(node.id)) { | ||
node = node.init; | ||
} else { | ||
// otherwise it's probably a destructuring like: | ||
// var { foo } = "foo"; | ||
return; | ||
} | ||
} | ||
if (t.isImmutable(node)) { | ||
return node; | ||
} | ||
}; | ||
/** | ||
* Description | ||
*/ | ||
Binding.prototype.isCompatibleWithType = function isCompatibleWithType(newType) { | ||
@@ -106,0 +82,0 @@ return false; |
{ | ||
"name": "babel-core", | ||
"description": "Turn ES6 code into readable vanilla ES5 with source maps", | ||
"version": "4.7.9", | ||
"version": "4.7.10", | ||
"author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://babeljs.io/", |
25
test.js
@@ -1,22 +0,3 @@ | ||
// inline | ||
for (var num of [1, 2, 3]) {} | ||
// inferred | ||
var nums = [1, 2, 3] | ||
for (var num of nums) {} | ||
// declarator type | ||
var nums: Array = [1, 2, 3]; | ||
for (var num of nums) {} | ||
// function return type | ||
function foo(): Array {} | ||
for (var num of foo()) {} | ||
// method in object with return type | ||
var bar = { foo(): Array {} }; | ||
for (var num of bar.foo()) {} | ||
// nested method in object with return type | ||
var bar2 = { bar: { foo(): Array {} } }; | ||
for (var num of bar2.bar.foo()) {} | ||
var obj = { b: { c: { "a": 1 } } }; | ||
obj.foo = "lol"; | ||
obj.b.c.a * 5; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21
1918421
171
15811