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.5.2 to 7.7.4

42

lib/index.js

@@ -8,39 +8,15 @@ "use strict";

function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");
var _helperPluginUtils = require("@babel/helper-plugin-utils");
_helperPluginUtils = function () {
return data;
};
var _pluginSyntaxExportNamespaceFrom = _interopRequireDefault(require("@babel/plugin-syntax-export-namespace-from"));
return data;
}
var _core = require("@babel/core");
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)(api => {
var _default = (0, _helperPluginUtils.declare)(api => {
api.assertVersion(7);
return {
name: "proposal-export-namespace-from",
inherits: _pluginSyntaxExportNamespaceFrom().default,
inherits: _pluginSyntaxExportNamespaceFrom.default,
visitor: {

@@ -55,8 +31,8 @@ ExportNamedDeclaration(path) {

} = node;
const index = _core().types.isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;
if (!_core().types.isExportNamespaceSpecifier(specifiers[index])) return;
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));
}

@@ -69,3 +45,3 @@

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)]));
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)]));

@@ -72,0 +48,0 @@ if (node.specifiers.length >= 1) {

{
"name": "@babel/plugin-proposal-export-namespace-from",
"version": "7.5.2",
"version": "7.7.4",
"description": "Compile export namespace to ES2015",

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

"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-syntax-export-namespace-from": "^7.2.0"
"@babel/plugin-syntax-export-namespace-from": "^7.7.4"
},

@@ -23,6 +23,6 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/helper-plugin-test-runner": "^7.0.0"
"@babel/core": "^7.7.4",
"@babel/helper-plugin-test-runner": "^7.7.4"
},
"gitHead": "0dbf99bedb1d82b8414685181416c19336dd0d96"
"gitHead": "75767d87cb147709b9bd9b99bf44daa6688874a9"
}
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