@babel/plugin-proposal-export-namespace-from
Advanced tools
Comparing version 7.21.4-esm.3 to 7.21.4-esm.4
@@ -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.3", | ||
"version": "7.21.4-esm.4", | ||
"description": "Compile export namespace to ES2015", | ||
@@ -19,3 +19,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "7.21.4-esm.3", | ||
"@babel/helper-plugin-utils": "7.21.4-esm.4", | ||
"@babel/plugin-syntax-export-namespace-from": "^7.8.3" | ||
@@ -27,4 +27,4 @@ }, | ||
"devDependencies": { | ||
"@babel/core": "7.21.4-esm.3", | ||
"@babel/helper-plugin-test-runner": "7.21.4-esm.3" | ||
"@babel/core": "7.21.4-esm.4", | ||
"@babel/helper-plugin-test-runner": "7.21.4-esm.4" | ||
}, | ||
@@ -31,0 +31,0 @@ "homepage": "https://babel.dev/docs/en/next/babel-plugin-proposal-export-namespace-from", |
Sorry, the diff of this file is not supported yet
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
6
7757
40
+ Added@babel/helper-plugin-utils@7.21.4-esm.4(transitive)
- Removed@babel/helper-plugin-utils@7.21.4-esm.3(transitive)