@babel/helper-module-transforms
Advanced tools
Comparing version 7.1.0 to 7.2.2
@@ -33,9 +33,3 @@ "use strict"; | ||
function hasExports(metadata) { | ||
const { | ||
local, | ||
source | ||
} = metadata; | ||
return local.size > 0 || Array.from(source).some(([, meta]) => { | ||
return meta.reexports.size > 0 || meta.reexportNamespace.size > 0 || !!meta.reexportAll; | ||
}); | ||
return metadata.hasExports; | ||
} | ||
@@ -60,3 +54,4 @@ | ||
local, | ||
source | ||
source, | ||
hasExports | ||
} = getModuleMetadata(programPath, { | ||
@@ -83,2 +78,3 @@ loose, | ||
exportNameListName: null, | ||
hasExports, | ||
local, | ||
@@ -118,2 +114,3 @@ source | ||
let hasExports = false; | ||
programPath.get("body").forEach(child => { | ||
@@ -161,2 +158,3 @@ if (child.isImportDeclaration()) { | ||
} else if (child.isExportAllDeclaration()) { | ||
hasExports = true; | ||
const data = getData(child.node.source); | ||
@@ -168,2 +166,3 @@ if (!data.loc) data.loc = child.node.loc; | ||
} else if (child.isExportNamedDeclaration() && child.node.source) { | ||
hasExports = true; | ||
const data = getData(child.node.source); | ||
@@ -184,2 +183,4 @@ if (!data.loc) data.loc = child.node.loc; | ||
}); | ||
} else if (child.isExportNamedDeclaration() || child.isExportDefaultDeclaration()) { | ||
hasExports = true; | ||
} | ||
@@ -231,2 +232,3 @@ }); | ||
return { | ||
hasExports, | ||
local: localData, | ||
@@ -233,0 +235,0 @@ source: sourceData |
{ | ||
"name": "@babel/helper-module-transforms", | ||
"version": "7.1.0", | ||
"version": "7.2.2", | ||
"description": "Babel helper functions for implementing ES6 module transformations", | ||
@@ -17,6 +17,6 @@ "author": "Logan Smyth <loganfsmyth@gmail.com>", | ||
"@babel/helper-split-export-declaration": "^7.0.0", | ||
"@babel/template": "^7.1.0", | ||
"@babel/types": "^7.0.0", | ||
"@babel/template": "^7.2.2", | ||
"@babel/types": "^7.2.2", | ||
"lodash": "^4.17.10" | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
31144
838
1
Updated@babel/template@^7.2.2
Updated@babel/types@^7.2.2