Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
55
Maintainers
4
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.21.4-esm to 7.21.4-esm.1

25

lib/index.js

@@ -1,15 +0,9 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _pluginSyntaxExportNamespaceFrom = require("@babel/plugin-syntax-export-namespace-from");
var _core = require("@babel/core");
var _default = (0, _helperPluginUtils.declare)(api => {
import { declare } from "@babel/helper-plugin-utils";
import syntaxExportNamespaceFrom from "@babel/plugin-syntax-export-namespace-from";
import { types as t } from "@babel/core";
export default declare(api => {
api.assertVersion(7);
return {
name: "proposal-export-namespace-from",
inherits: _pluginSyntaxExportNamespaceFrom.default,
inherits: syntaxExportNamespaceFrom.default,
visitor: {

@@ -25,7 +19,7 @@ ExportNamedDeclaration(path) {

} = node;
const index = _core.types.isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;
if (!_core.types.isExportNamespaceSpecifier(specifiers[index])) return;
const index = t.isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;
if (!t.isExportNamespaceSpecifier(specifiers[index])) return;
const nodes = [];
if (index === 1) {
nodes.push(_core.types.exportNamedDeclaration(null, [specifiers.shift()], node.source));
nodes.push(t.exportNamedDeclaration(null, [specifiers.shift()], node.source));
}

@@ -37,3 +31,3 @@ const specifier = specifiers.shift();

const uid = scope.generateUidIdentifier((_exported$name = exported.name) != null ? _exported$name : exported.value);
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(t.importDeclaration([t.importNamespaceSpecifier(uid)], t.cloneNode(node.source)), t.exportNamedDeclaration(null, [t.exportSpecifier(t.cloneNode(uid), exported)]));
if (node.specifiers.length >= 1) {

@@ -48,4 +42,3 @@ nodes.push(node);

});
exports.default = _default;
//# sourceMappingURL=index.js.map
{
"name": "@babel/plugin-proposal-export-namespace-from",
"version": "7.21.4-esm",
"version": "7.21.4-esm.1",
"description": "Compile export namespace to ES2015",

@@ -19,11 +19,11 @@ "repository": {

"dependencies": {
"@babel/helper-plugin-utils": "^7.21.4-esm",
"@babel/helper-plugin-utils": "^7.21.4-esm.1",
"@babel/plugin-syntax-export-namespace-from": "^7.8.3"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0 || 7.21.4-esm"
"@babel/core": "^7.0.0-0 || 7.21.4-esm.1"
},
"devDependencies": {
"@babel/core": "^7.21.4-esm",
"@babel/helper-plugin-test-runner": "^7.21.4-esm"
"@babel/core": "^7.21.4-esm.1",
"@babel/helper-plugin-test-runner": "^7.21.4-esm.1"
},

@@ -35,3 +35,3 @@ "homepage": "https://babel.dev/docs/en/next/babel-plugin-proposal-export-namespace-from",

"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
"type": "module"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc