Comparing version 0.4.1 to 0.4.2
@@ -121,2 +121,11 @@ const {walk} = require("estree-walker"); | ||
function analyzeTag(node) { | ||
if ( | ||
node.tag.type === "Identifier" && | ||
(!context.scope || context.scope.isRootVar(node.tag.name)) | ||
) { | ||
context.callableIds.add(node.tag.name); | ||
} | ||
} | ||
function analyze() { | ||
@@ -161,2 +170,4 @@ walk(context.ast, { | ||
analyzeCallable(node); | ||
} else if (node.type === "TaggedTemplateExpression") { | ||
analyzeTag(node); | ||
} | ||
@@ -163,0 +174,0 @@ if (!context.nested && !context.topLevel.isTop()) { |
{ | ||
"name": "cjs-es", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Transform CommonJS module into ES module.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -232,2 +232,6 @@ cjs-es | ||
* 0.4.2 (Apr 30, 2018) | ||
- Fix: template tag is callable. | ||
* 0.4.1 (Apr 30, 2018) | ||
@@ -234,0 +238,0 @@ |
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
34056
845
287