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

@babel/plugin-proposal-export-namespace-from

Package Overview
Dependencies
Maintainers
6
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-proposal-export-namespace-from - npm Package Compare versions

Comparing version 7.0.0-beta.42 to 7.0.0-beta.43

69

lib/index.js
"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");
var _pluginSyntaxExportNamespaceFrom = _interopRequireDefault(require("@babel/plugin-syntax-export-namespace-from"));
_helperPluginUtils = function () {
return data;
};
var _core = require("@babel/core");
return data;
}
function _pluginSyntaxExportNamespaceFrom() {
const data = _interopRequireDefault(require("@babel/plugin-syntax-export-namespace-from"));
_pluginSyntaxExportNamespaceFrom = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = (0, _helperPluginUtils.declare)(function (api) {
var _default = (0, _helperPluginUtils().declare)(api => {
api.assertVersion(7);
return {
inherits: _pluginSyntaxExportNamespaceFrom.default,
inherits: _pluginSyntaxExportNamespaceFrom().default,
visitor: {
ExportNamedDeclaration: function ExportNamedDeclaration(path) {
var node = path.node,
scope = path.scope;
var specifiers = node.specifiers;
var index = _core.types.isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;
if (!_core.types.isExportNamespaceSpecifier(specifiers[index])) return;
var nodes = [];
ExportNamedDeclaration(path) {
const {
node,
scope
} = path;
const {
specifiers
} = node;
const index = _core().types.isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;
if (!_core().types.isExportNamespaceSpecifier(specifiers[index])) return;
const nodes = [];
if (index === 1) {
nodes.push(_core.types.exportNamedDeclaration(null, [specifiers.shift()], node.source));
nodes.push(_core().types.exportNamedDeclaration(null, [specifiers.shift()], node.source));
}
var specifier = specifiers.shift();
var exported = specifier.exported;
var uid = scope.generateUidIdentifier(exported.name);
nodes.push(_core.types.importDeclaration([_core.types.importNamespaceSpecifier(uid)], _core.types.cloneNode(node.source)), _core.types.exportNamedDeclaration(null, [_core.types.exportSpecifier(_core.types.cloneNode(uid), exported)]));
const specifier = specifiers.shift();
const {
exported
} = specifier;
const uid = scope.generateUidIdentifier(exported.name);
nodes.push(_core().types.importDeclaration([_core().types.importNamespaceSpecifier(uid)], _core().types.cloneNode(node.source)), _core().types.exportNamedDeclaration(null, [_core().types.exportSpecifier(_core().types.cloneNode(uid), exported)]));

@@ -42,2 +74,3 @@ if (node.specifiers.length >= 1) {

}
}

@@ -44,0 +77,0 @@ };

{
"name": "@babel/plugin-proposal-export-namespace-from",
"version": "7.0.0-beta.42",
"version": "7.0.0-beta.43",
"description": "Compile export namespace to ES2015",

@@ -12,12 +12,12 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-export-namespace-from",

"dependencies": {
"@babel/helper-plugin-utils": "7.0.0-beta.42",
"@babel/plugin-syntax-export-namespace-from": "7.0.0-beta.42"
"@babel/helper-plugin-utils": "7.0.0-beta.43",
"@babel/plugin-syntax-export-namespace-from": "7.0.0-beta.43"
},
"peerDependencies": {
"@babel/core": "7.0.0-beta.42"
"@babel/core": "7.0.0-beta.43"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.42",
"@babel/helper-plugin-test-runner": "7.0.0-beta.42"
"@babel/core": "7.0.0-beta.43",
"@babel/helper-plugin-test-runner": "7.0.0-beta.43"
}
}
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