babel-plugin-transform-es2015-object-super
Advanced tools
Comparing version 7.0.0-alpha.15 to 7.0.0-alpha.16
@@ -7,3 +7,2 @@ "use strict"; | ||
var t = _ref.types; | ||
return { | ||
@@ -13,2 +12,3 @@ visitor: { | ||
var objectRef = void 0; | ||
var getObjectRef = function getObjectRef() { | ||
@@ -20,4 +20,4 @@ return objectRef = objectRef || path.scope.generateUidIdentifier("obj"); | ||
if (!propertyPath.isMethod()) return; | ||
var propPaths = path.get("properties"); | ||
var propPaths = path.get("properties"); | ||
for (var _iterator = propPaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { | ||
@@ -36,3 +36,2 @@ var _ref2; | ||
var propPath = _ref2; | ||
if (propPath.isObjectProperty()) propPath = propPath.get("value"); | ||
@@ -44,3 +43,5 @@ replacePropertySuper(propPath, propPath.node, path.scope, getObjectRef, state); | ||
if (objectRef) { | ||
path.scope.push({ id: objectRef }); | ||
path.scope.push({ | ||
id: objectRef | ||
}); | ||
path.replaceWith(t.assignmentExpression("=", objectRef, path.node)); | ||
@@ -68,4 +69,3 @@ } | ||
}); | ||
replaceSupers.replace(); | ||
} |
{ | ||
"name": "babel-plugin-transform-es2015-object-super", | ||
"version": "7.0.0-alpha.15", | ||
"version": "7.0.0-alpha.16", | ||
"description": "Compile ES2015 object super to ES5", | ||
@@ -12,7 +12,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-object-super", | ||
"dependencies": { | ||
"babel-helper-replace-supers": "7.0.0-alpha.15" | ||
"babel-helper-replace-supers": "7.0.0-alpha.16" | ||
}, | ||
"devDependencies": { | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.15" | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.16" | ||
} | ||
} |
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
3886
52
+ Addedansi-styles@3.2.1(transitive)
+ Addedbabel-code-frame@7.0.0-alpha.16(transitive)
+ Addedbabel-helper-function-name@7.0.0-alpha.16(transitive)
+ Addedbabel-helper-get-function-arity@7.0.0-alpha.16(transitive)
+ Addedbabel-helper-optimise-call-expression@7.0.0-alpha.16(transitive)
+ Addedbabel-helper-replace-supers@7.0.0-alpha.16(transitive)
+ Addedbabel-messages@7.0.0-alpha.16(transitive)
+ Addedbabel-template@7.0.0-alpha.16(transitive)
+ Addedbabel-traverse@7.0.0-alpha.16(transitive)
+ Addedbabel-types@7.0.0-alpha.16(transitive)
+ Addedbabylon@7.0.0-beta.17(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedglobals@10.4.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedto-fast-properties@2.0.0(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedbabel-code-frame@7.0.0-alpha.15(transitive)
- Removedbabel-helper-function-name@7.0.0-alpha.15(transitive)
- Removedbabel-helper-get-function-arity@7.0.0-alpha.15(transitive)
- Removedbabel-helper-optimise-call-expression@7.0.0-alpha.15(transitive)
- Removedbabel-helper-replace-supers@7.0.0-alpha.15(transitive)
- Removedbabel-messages@7.0.0-alpha.15(transitive)
- Removedbabel-template@7.0.0-alpha.15(transitive)
- Removedbabel-traverse@7.0.0-alpha.15(transitive)
- Removedbabel-types@7.0.0-alpha.15(transitive)
- Removedbabylon@7.0.0-beta.13(transitive)
- Removedchalk@1.1.3(transitive)
- Removedglobals@9.18.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedto-fast-properties@1.0.3(transitive)