@babel/helper-define-polyfill-provider
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -38,9 +38,18 @@ "use strict"; | ||
} | ||
function analyzeMemberExpression(path) { | ||
const key = (0, _utils.resolveKey)(path.get("property"), path.node.computed); | ||
return { | ||
key, | ||
handleAsMemberExpression: !!key && key !== "prototype" | ||
}; | ||
} | ||
return { | ||
// Symbol(), new Promise | ||
ReferencedIdentifier(path) { | ||
if (path.parentPath.isMemberExpression({ | ||
const { | ||
parentPath | ||
} = path; | ||
if (parentPath.isMemberExpression({ | ||
object: path.node | ||
})) { | ||
// Handled in the MemberExpression visitor | ||
}) && analyzeMemberExpression(parentPath).handleAsMemberExpression) { | ||
return; | ||
@@ -51,4 +60,7 @@ } | ||
MemberExpression(path) { | ||
const key = (0, _utils.resolveKey)(path.get("property"), path.node.computed); | ||
if (!key || key === "prototype") return; | ||
const { | ||
key, | ||
handleAsMemberExpression | ||
} = analyzeMemberExpression(path); | ||
if (!handleAsMemberExpression) return; | ||
const object = path.get("object"); | ||
@@ -55,0 +67,0 @@ let objectIsGlobalIdentifier = object.isIdentifier(); |
{ | ||
"name": "@babel/helper-define-polyfill-provider", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Babel helper to create your own polyfill provider", | ||
@@ -58,3 +58,3 @@ "repository": { | ||
}, | ||
"gitHead": "58703f07c9cff9f27d145215265042094739a175" | ||
"gitHead": "1ce88db2507db2ef3d2ed2a2f920a3cf0b9364b5" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
220557
2567