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

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

Package Overview
Dependencies
Maintainers
4
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 7.18.9 to 7.18.10

23

lib/index.js

@@ -21,19 +21,21 @@ "use strict";

ExportNamedDeclaration(path) {
var _exported$name;
const {
node,
scope
node
} = path;
const {
specifiers
specifiers,
source
} = node;
if (!_core.types.isExportDefaultSpecifier(specifiers[0])) return;
const specifier = specifiers.shift();
const {
exported
} = specifier;
const uid = scope.generateUidIdentifier((_exported$name = exported.name) != null ? _exported$name : exported.value);
const nodes = [_core.types.importDeclaration([_core.types.importDefaultSpecifier(uid)], _core.types.cloneNode(node.source)), _core.types.exportNamedDeclaration(null, [_core.types.exportSpecifier(_core.types.cloneNode(uid), exported)])];
} = specifiers.shift();
if (specifiers.every(s => _core.types.isExportSpecifier(s))) {
specifiers.unshift(_core.types.exportSpecifier(_core.types.identifier("default"), exported));
return;
}
const nodes = [_core.types.exportNamedDeclaration(null, [_core.types.exportSpecifier(_core.types.identifier("default"), exported)], _core.types.cloneNode(source))];
if (specifiers.length >= 1) {

@@ -43,4 +45,3 @@ nodes.push(node);

const [importDeclaration] = path.replaceWithMultiple(nodes);
path.scope.registerDeclaration(importDeclaration);
path.replaceWithMultiple(nodes);
}

@@ -47,0 +48,0 @@

{
"name": "@babel/plugin-proposal-export-default-from",
"version": "7.18.9",
"version": "7.18.10",
"description": "Compile export default to ES2015",

@@ -27,3 +27,3 @@ "repository": {

"devDependencies": {
"@babel/core": "^7.18.9",
"@babel/core": "^7.18.10",
"@babel/helper-plugin-test-runner": "^7.18.6"

@@ -30,0 +30,0 @@ },

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