@babel/helper-split-export-declaration
Advanced tools
Comparing version 7.0.0-beta.46 to 7.0.0-beta.47
@@ -9,3 +9,3 @@ "use strict"; | ||
function t() { | ||
var data = _interopRequireWildcard(require("@babel/types")); | ||
const data = _interopRequireWildcard(require("@babel/types")); | ||
@@ -26,11 +26,11 @@ t = function t() { | ||
var isDefault = exportDeclaration.isExportDefaultDeclaration(); | ||
var declaration = exportDeclaration.get("declaration"); | ||
var isClassDeclaration = declaration.isClassDeclaration(); | ||
const isDefault = exportDeclaration.isExportDefaultDeclaration(); | ||
const declaration = exportDeclaration.get("declaration"); | ||
const isClassDeclaration = declaration.isClassDeclaration(); | ||
if (isDefault) { | ||
var standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration; | ||
var scope = declaration.isScope() ? declaration.scope.parent : declaration.scope; | ||
var id = declaration.node.id; | ||
var needBindingRegistration = false; | ||
const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration; | ||
const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope; | ||
let id = declaration.node.id; | ||
let needBindingRegistration = false; | ||
@@ -46,4 +46,4 @@ if (!id) { | ||
var updatedDeclaration = standaloneDeclaration ? declaration : t().variableDeclaration("var", [t().variableDeclarator(t().cloneNode(id), declaration.node)]); | ||
var updatedExportDeclaration = t().exportNamedDeclaration(null, [t().exportSpecifier(t().cloneNode(id), t().identifier("default"))]); | ||
const updatedDeclaration = standaloneDeclaration ? declaration : t().variableDeclaration("var", [t().variableDeclarator(t().cloneNode(id), declaration.node)]); | ||
const updatedExportDeclaration = t().exportNamedDeclaration(null, [t().exportSpecifier(t().cloneNode(id), t().identifier("default"))]); | ||
exportDeclaration.insertAfter(updatedExportDeclaration); | ||
@@ -63,7 +63,7 @@ exportDeclaration.replaceWith(updatedDeclaration); | ||
var bindingIdentifiers = declaration.getOuterBindingIdentifiers(); | ||
var specifiers = Object.keys(bindingIdentifiers).map(function (name) { | ||
const bindingIdentifiers = declaration.getOuterBindingIdentifiers(); | ||
const specifiers = Object.keys(bindingIdentifiers).map(name => { | ||
return t().exportSpecifier(t().identifier(name), t().identifier(name)); | ||
}); | ||
var aliasDeclar = t().exportNamedDeclaration(null, specifiers); | ||
const aliasDeclar = t().exportNamedDeclaration(null, specifiers); | ||
exportDeclaration.insertAfter(aliasDeclar); | ||
@@ -70,0 +70,0 @@ exportDeclaration.replaceWith(declaration.node); |
{ | ||
"name": "@babel/helper-split-export-declaration", | ||
"version": "7.0.0-beta.46", | ||
"version": "7.0.0-beta.47", | ||
"description": "", | ||
@@ -9,4 +9,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration", | ||
"dependencies": { | ||
"@babel/types": "7.0.0-beta.46" | ||
"@babel/types": "7.0.0-beta.47" | ||
} | ||
} |
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
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
3542
0
+ Added@babel/types@7.0.0-beta.47(transitive)
- Removed@babel/types@7.0.0-beta.46(transitive)
Updated@babel/types@7.0.0-beta.47