Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/helper-split-export-declaration

Package Overview
Dependencies
Maintainers
5
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-split-export-declaration - npm Package Compare versions

Comparing version 7.0.0-beta.46 to 7.0.0-beta.47

26

lib/index.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc