mirror of
https://github.com/actions/labeler.git
synced 2025-12-16 23:23:03 +00:00
build
This commit is contained in:
24
node_modules/@babel/helper-split-export-declaration/lib/index.js
generated
vendored
24
node_modules/@babel/helper-split-export-declaration/lib/index.js
generated
vendored
@@ -5,21 +5,15 @@ 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; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; 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()) {
|
||||
throw new Error("Only export declarations can be splitted.");
|
||||
throw new Error("Only export declarations can be split.");
|
||||
}
|
||||
|
||||
const isDefault = exportDeclaration.isExportDefaultDeclaration();
|
||||
@@ -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;
|
||||
|
||||
45
node_modules/@babel/helper-split-export-declaration/package.json
generated
vendored
45
node_modules/@babel/helper-split-export-declaration/package.json
generated
vendored
@@ -1,39 +1,39 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@babel/helper-split-export-declaration@7.4.4",
|
||||
"/Users/pjquirk/Source/GitHub/actions/labeler"
|
||||
]
|
||||
],
|
||||
"_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.11.0",
|
||||
"_id": "@babel/helper-split-export-declaration@7.11.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==",
|
||||
"_integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
|
||||
"_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.11.0",
|
||||
"name": "@babel/helper-split-export-declaration",
|
||||
"escapedName": "@babel%2fhelper-split-export-declaration",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "7.4.4",
|
||||
"rawSpec": "^7.11.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.4.4"
|
||||
"fetchSpec": "^7.11.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/helper-module-transforms",
|
||||
"/@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/pjquirk/Source/GitHub/actions/labeler",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.4.4"
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
|
||||
"_shasum": "f8a491244acf6a676158ac42072911ba83ad099f",
|
||||
"_spec": "@babel/helper-split-export-declaration@^7.11.0",
|
||||
"_where": "/Users/dakale/dev/GitHub/actions/labeler/node_modules/@babel/helper-module-transforms",
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.11.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": ">",
|
||||
"gitHead": "2c88694388831b1e5b88e4bbed6781eb2be1edba",
|
||||
"homepage": "https://github.com/babel/babel#readme",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "@babel/helper-split-export-declaration",
|
||||
@@ -42,7 +42,8 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration"
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-split-export-declaration"
|
||||
},
|
||||
"version": "7.4.4"
|
||||
"version": "7.11.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user