Commit 0ae470fd authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

Merge branch 'MLAB-670' into 'testing'

Update required modules

See merge request !162
parents cad730bf d27c335f
Pipeline #6650 passed with stage
in 4 seconds
{
"name": "@babel/plugin-proposal-dynamic-import",
"version": "7.18.6",
"description": "Transform import() expressions",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-plugin-proposal-dynamic-import"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"keywords": [
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.18.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@babel/helper-plugin-test-runner": "^7.18.6"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}
\ No newline at end of file
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# @babel/plugin-proposal-export-namespace-from
> Compile export namespace to ES2015
See our website [@babel/plugin-proposal-export-namespace-from](https://babeljs.io/docs/en/babel-plugin-proposal-export-namespace-from) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-proposal-export-namespace-from
```
or using yarn:
```sh
yarn add @babel/plugin-proposal-export-namespace-from --dev
```
"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 => {
api.assertVersion(7);
return {
name: "proposal-export-namespace-from",
inherits: _pluginSyntaxExportNamespaceFrom.default,
visitor: {
ExportNamedDeclaration(path) {
var _exported$name;
const {
node,
scope
} = path;
const {
specifiers
} = node;
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));
}
const specifier = specifiers.shift();
const {
exported
} = specifier;
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)]));
if (node.specifiers.length >= 1) {
nodes.push(node);
}
const [importDeclaration] = path.replaceWithMultiple(nodes);
path.scope.registerDeclaration(importDeclaration);
}
}
};
});
exports.default = _default;
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment