Update metadata

This commit is contained in:
Imran Ismail
2019-09-05 12:08:20 +08:00
parent 6e5c237523
commit 56c04146d7
1454 changed files with 204046 additions and 234789 deletions

View File

@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = splitExportDeclaration;
function t() {
const data = _interopRequireWildcard(require("@babel/types"));
var t = _interopRequireWildcard(require("@babel/types"));
t = function () {
return data;
};
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
return data;
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function splitExportDeclaration(exportDeclaration) {
if (!exportDeclaration.isExportDeclaration()) {
@@ -37,12 +31,12 @@ function splitExportDeclaration(exportDeclaration) {
id = scope.generateUidIdentifier("default");
if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
declaration.node.id = t().cloneNode(id);
declaration.node.id = t.cloneNode(id);
}
}
const updatedDeclaration = standaloneDeclaration ? declaration : t().variableDeclaration("var", [t().variableDeclarator(t().cloneNode(id), declaration.node)]);
const updatedExportDeclaration = t().exportNamedDeclaration(null, [t().exportSpecifier(t().cloneNode(id), t().identifier("default"))]);
const updatedDeclaration = standaloneDeclaration ? declaration : t.variableDeclaration("var", [t.variableDeclarator(t.cloneNode(id), declaration.node)]);
const updatedExportDeclaration = t.exportNamedDeclaration(null, [t.exportSpecifier(t.cloneNode(id), t.identifier("default"))]);
exportDeclaration.insertAfter(updatedExportDeclaration);
exportDeclaration.replaceWith(updatedDeclaration);
@@ -59,9 +53,9 @@ function splitExportDeclaration(exportDeclaration) {
const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
const specifiers = Object.keys(bindingIdentifiers).map(name => {
return t().exportSpecifier(t().identifier(name), t().identifier(name));
return t.exportSpecifier(t.identifier(name), t.identifier(name));
});
const aliasDeclar = t().exportNamedDeclaration(null, specifiers);
const aliasDeclar = t.exportNamedDeclaration(null, specifiers);
exportDeclaration.insertAfter(aliasDeclar);
exportDeclaration.replaceWith(declaration.node);
return exportDeclaration;

View File

@@ -1,39 +1,35 @@
{
"_args": [
[
"@babel/helper-split-export-declaration@7.4.4",
"/Users/imranismail/Projects/setup-kustomize"
]
],
"_development": true,
"_from": "@babel/helper-split-export-declaration@7.4.4",
"_id": "@babel/helper-split-export-declaration@7.4.4",
"_from": "@babel/helper-split-export-declaration@^7.7.0",
"_id": "@babel/helper-split-export-declaration@7.7.0",
"_inBundle": false,
"_integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==",
"_integrity": "sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA==",
"_location": "/@babel/helper-split-export-declaration",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "@babel/helper-split-export-declaration@7.4.4",
"raw": "@babel/helper-split-export-declaration@^7.7.0",
"name": "@babel/helper-split-export-declaration",
"escapedName": "@babel%2fhelper-split-export-declaration",
"scope": "@babel",
"rawSpec": "7.4.4",
"rawSpec": "^7.7.0",
"saveSpec": null,
"fetchSpec": "7.4.4"
"fetchSpec": "^7.7.0"
},
"_requiredBy": [
"/@babel/traverse"
],
"_resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz",
"_spec": "7.4.4",
"_where": "/Users/imranismail/Projects/setup-kustomize",
"_resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz",
"_shasum": "1365e74ea6c614deeb56ebffabd71006a0eb2300",
"_spec": "@babel/helper-split-export-declaration@^7.7.0",
"_where": "/Users/imranismail/Projects/setup-kustomize/node_modules/@babel/traverse",
"bundleDependencies": false,
"dependencies": {
"@babel/types": "^7.4.4"
"@babel/types": "^7.7.0"
},
"deprecated": false,
"description": ">",
"gitHead": "2c88694388831b1e5b88e4bbed6781eb2be1edba",
"gitHead": "97faa83953cb87e332554fa559a4956d202343ea",
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/helper-split-export-declaration",
@@ -44,5 +40,5 @@
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration"
},
"version": "7.4.4"
"version": "7.7.0"
}