@babel/plugin-proposal-export-default-from
Advanced tools
Comparing version 7.0.0-beta.47 to 7.0.0-beta.48
@@ -11,3 +11,3 @@ "use strict"; | ||
_helperPluginUtils = function _helperPluginUtils() { | ||
_helperPluginUtils = function () { | ||
return data; | ||
@@ -22,3 +22,3 @@ }; | ||
_pluginSyntaxExportDefaultFrom = function _pluginSyntaxExportDefaultFrom() { | ||
_pluginSyntaxExportDefaultFrom = function () { | ||
return data; | ||
@@ -33,3 +33,3 @@ }; | ||
_core = function _core() { | ||
_core = function () { | ||
return data; | ||
@@ -49,8 +49,14 @@ }; | ||
ExportNamedDeclaration(path) { | ||
const node = path.node, | ||
scope = path.scope; | ||
const specifiers = node.specifiers; | ||
const { | ||
node, | ||
scope | ||
} = path; | ||
const { | ||
specifiers | ||
} = node; | ||
if (!_core().types.isExportDefaultSpecifier(specifiers[0])) return; | ||
const specifier = specifiers.shift(); | ||
const exported = specifier.exported; | ||
const { | ||
exported | ||
} = specifier; | ||
const uid = scope.generateUidIdentifier(exported.name); | ||
@@ -57,0 +63,0 @@ 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)])]; |
{ | ||
"name": "@babel/plugin-proposal-export-default-from", | ||
"version": "7.0.0-beta.47", | ||
"version": "7.0.0-beta.48", | ||
"description": "Compile export default to ES2015", | ||
@@ -12,12 +12,12 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-export-default-from", | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "7.0.0-beta.47", | ||
"@babel/plugin-syntax-export-default-from": "7.0.0-beta.47" | ||
"@babel/helper-plugin-utils": "7.0.0-beta.48", | ||
"@babel/plugin-syntax-export-default-from": "7.0.0-beta.48" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "7.0.0-beta.47" | ||
"@babel/core": "7.0.0-beta.48" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.47", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.47" | ||
"@babel/core": "7.0.0-beta.48", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.48" | ||
} | ||
} |
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
55
3232
+ Added@babel/code-frame@7.0.0-beta.48(transitive)
+ Added@babel/core@7.0.0-beta.48(transitive)
+ Added@babel/generator@7.0.0-beta.48(transitive)
+ Added@babel/helper-function-name@7.0.0-beta.48(transitive)
+ Added@babel/helper-get-function-arity@7.0.0-beta.48(transitive)
+ Added@babel/helper-plugin-utils@7.0.0-beta.48(transitive)
+ Added@babel/helper-split-export-declaration@7.0.0-beta.48(transitive)
+ Added@babel/helpers@7.0.0-beta.48(transitive)
+ Added@babel/highlight@7.0.0-beta.48(transitive)
+ Added@babel/parser@7.0.0-beta.48(transitive)
+ Added@babel/plugin-syntax-export-default-from@7.0.0-beta.48(transitive)
+ Added@babel/template@7.0.0-beta.48(transitive)
+ Added@babel/traverse@7.0.0-beta.48(transitive)
+ Added@babel/types@7.0.0-beta.48(transitive)
- Removed@babel/code-frame@7.0.0-beta.47(transitive)
- Removed@babel/core@7.0.0-beta.47(transitive)
- Removed@babel/generator@7.0.0-beta.47(transitive)
- Removed@babel/helper-function-name@7.0.0-beta.47(transitive)
- Removed@babel/helper-get-function-arity@7.0.0-beta.47(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.47(transitive)
- Removed@babel/helper-split-export-declaration@7.0.0-beta.47(transitive)
- Removed@babel/helpers@7.0.0-beta.47(transitive)
- Removed@babel/highlight@7.0.0-beta.47(transitive)
- Removed@babel/plugin-syntax-export-default-from@7.0.0-beta.47(transitive)
- Removed@babel/template@7.0.0-beta.47(transitive)
- Removed@babel/traverse@7.0.0-beta.47(transitive)
- Removed@babel/types@7.0.0-beta.47(transitive)
- Removedbabylon@7.0.0-beta.47(transitive)
Updated@babel/plugin-syntax-export-default-from@7.0.0-beta.48