first
This commit is contained in:
22
node_modules/@babel/helper-module-transforms/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/helper-module-transforms/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
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.
|
19
node_modules/@babel/helper-module-transforms/README.md
generated
vendored
Normal file
19
node_modules/@babel/helper-module-transforms/README.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# @babel/helper-module-transforms
|
||||
|
||||
> Babel helper functions for implementing ES6 module transformations
|
||||
|
||||
See our website [@babel/helper-module-transforms](https://babeljs.io/docs/babel-helper-module-transforms) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-module-transforms
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-module-transforms
|
||||
```
|
52
node_modules/@babel/helper-module-transforms/lib/dynamic-import.js
generated
vendored
Normal file
52
node_modules/@babel/helper-module-transforms/lib/dynamic-import.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.buildDynamicImport = buildDynamicImport;
|
||||
var _core = require("@babel/core");
|
||||
{
|
||||
{
|
||||
{
|
||||
exports.getDynamicImportSource = function getDynamicImportSource(node) {
|
||||
const [source] = node.arguments;
|
||||
return _core.types.isStringLiteral(source) || _core.types.isTemplateLiteral(source) ? source : _core.template.expression.ast`\`\${${source}}\``;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
function buildDynamicImport(node, deferToThen, wrapWithPromise, builder) {
|
||||
const [specifier] = node.arguments;
|
||||
if (_core.types.isStringLiteral(specifier) || _core.types.isTemplateLiteral(specifier) && specifier.quasis.length === 0) {
|
||||
if (deferToThen) {
|
||||
return _core.template.expression.ast`
|
||||
Promise.resolve().then(() => ${builder(specifier)})
|
||||
`;
|
||||
} else return builder(specifier);
|
||||
}
|
||||
const specifierToString = _core.types.isTemplateLiteral(specifier) ? _core.types.identifier("specifier") : _core.types.templateLiteral([_core.types.templateElement({
|
||||
raw: ""
|
||||
}), _core.types.templateElement({
|
||||
raw: ""
|
||||
})], [_core.types.identifier("specifier")]);
|
||||
if (deferToThen) {
|
||||
return _core.template.expression.ast`
|
||||
(specifier =>
|
||||
new Promise(r => r(${specifierToString}))
|
||||
.then(s => ${builder(_core.types.identifier("s"))})
|
||||
)(${specifier})
|
||||
`;
|
||||
} else if (wrapWithPromise) {
|
||||
return _core.template.expression.ast`
|
||||
(specifier =>
|
||||
new Promise(r => r(${builder(specifierToString)}))
|
||||
)(${specifier})
|
||||
`;
|
||||
} else {
|
||||
return _core.template.expression.ast`
|
||||
(specifier => ${builder(specifierToString)})(${specifier})
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=dynamic-import.js.map
|
1
node_modules/@babel/helper-module-transforms/lib/dynamic-import.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-module-transforms/lib/dynamic-import.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_core","require","exports","getDynamicImportSource","node","source","arguments","t","isStringLiteral","isTemplateLiteral","template","expression","ast","buildDynamicImport","deferToThen","wrapWithPromise","builder","specifier","quasis","length","specifierToString","identifier","templateLiteral","templateElement","raw"],"sources":["../src/dynamic-import.ts"],"sourcesContent":["// Heavily inspired by\n// https://github.com/airbnb/babel-plugin-dynamic-import-node/blob/master/src/utils.js\n\nimport { types as t, template } from \"@babel/core\";\n\nif (!process.env.BABEL_8_BREAKING) {\n if (!USE_ESM) {\n if (!IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource = function getDynamicImportSource(\n node: t.CallExpression,\n ): t.StringLiteral | t.TemplateLiteral {\n const [source] = node.arguments;\n\n return t.isStringLiteral(source) || t.isTemplateLiteral(source)\n ? source\n : (template.expression.ast`\\`\\${${source}}\\`` as t.TemplateLiteral);\n };\n }\n }\n}\n\nexport function buildDynamicImport(\n node: t.CallExpression,\n deferToThen: boolean,\n wrapWithPromise: boolean,\n builder: (specifier: t.Expression) => t.Expression,\n): t.Expression {\n const [specifier] = node.arguments;\n\n if (\n t.isStringLiteral(specifier) ||\n (t.isTemplateLiteral(specifier) && specifier.quasis.length === 0)\n ) {\n if (deferToThen) {\n return template.expression.ast`\n Promise.resolve().then(() => ${builder(specifier)})\n `;\n } else return builder(specifier);\n }\n\n const specifierToString = t.isTemplateLiteral(specifier)\n ? t.identifier(\"specifier\")\n : t.templateLiteral(\n [t.templateElement({ raw: \"\" }), t.templateElement({ raw: \"\" })],\n [t.identifier(\"specifier\")],\n );\n\n if (deferToThen) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${specifierToString}))\n .then(s => ${builder(t.identifier(\"s\"))})\n )(${specifier})\n `;\n } else if (wrapWithPromise) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${builder(specifierToString)}))\n )(${specifier})\n `;\n } else {\n return template.expression.ast`\n (specifier => ${builder(specifierToString)})(${specifier})\n `;\n }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAEmC;EACnB;IACQ;MAElBC,OAAO,CAACC,sBAAsB,GAAG,SAASA,sBAAsBA,CAC9DC,IAAsB,EACe;QACrC,MAAM,CAACC,MAAM,CAAC,GAAGD,IAAI,CAACE,SAAS;QAE/B,OAAOC,WAAC,CAACC,eAAe,CAACH,MAAM,CAAC,IAAIE,WAAC,CAACE,iBAAiB,CAACJ,MAAM,CAAC,GAC3DA,MAAM,GACLK,cAAQ,CAACC,UAAU,CAACC,GAAI,QAAOP,MAAO,KAA0B;MACvE,CAAC;IACH;EACF;AACF;AAEO,SAASQ,kBAAkBA,CAChCT,IAAsB,EACtBU,WAAoB,EACpBC,eAAwB,EACxBC,OAAkD,EACpC;EACd,MAAM,CAACC,SAAS,CAAC,GAAGb,IAAI,CAACE,SAAS;EAElC,IACEC,WAAC,CAACC,eAAe,CAACS,SAAS,CAAC,IAC3BV,WAAC,CAACE,iBAAiB,CAACQ,SAAS,CAAC,IAAIA,SAAS,CAACC,MAAM,CAACC,MAAM,KAAK,CAAE,EACjE;IACA,IAAIL,WAAW,EAAE;MACf,OAAOJ,cAAQ,CAACC,UAAU,CAACC,GAAI;AACrC,uCAAuCI,OAAO,CAACC,SAAS,CAAE;AAC1D,OAAO;IACH,CAAC,MAAM,OAAOD,OAAO,CAACC,SAAS,CAAC;EAClC;EAEA,MAAMG,iBAAiB,GAAGb,WAAC,CAACE,iBAAiB,CAACQ,SAAS,CAAC,GACpDV,WAAC,CAACc,UAAU,CAAC,WAAW,CAAC,GACzBd,WAAC,CAACe,eAAe,CACf,CAACf,WAAC,CAACgB,eAAe,CAAC;IAAEC,GAAG,EAAE;EAAG,CAAC,CAAC,EAAEjB,WAAC,CAACgB,eAAe,CAAC;IAAEC,GAAG,EAAE;EAAG,CAAC,CAAC,CAAC,EAChE,CAACjB,WAAC,CAACc,UAAU,CAAC,WAAW,CAAC,CAC5B,CAAC;EAEL,IAAIP,WAAW,EAAE;IACf,OAAOJ,cAAQ,CAACC,UAAU,CAACC,GAAI;AACnC;AACA,6BAA6BQ,iBAAkB;AAC/C,uBAAuBJ,OAAO,CAACT,WAAC,CAACc,UAAU,CAAC,GAAG,CAAC,CAAE;AAClD,UAAUJ,SAAU;AACpB,KAAK;EACH,CAAC,MAAM,IAAIF,eAAe,EAAE;IAC1B,OAAOL,cAAQ,CAACC,UAAU,CAACC,GAAI;AACnC;AACA,6BAA6BI,OAAO,CAACI,iBAAiB,CAAE;AACxD,UAAUH,SAAU;AACpB,KAAK;EACH,CAAC,MAAM;IACL,OAAOP,cAAQ,CAACC,UAAU,CAACC,GAAI;AACnC,sBAAsBI,OAAO,CAACI,iBAAiB,CAAE,KAAIH,SAAU;AAC/D,KAAK;EACH;AACF"}
|
48
node_modules/@babel/helper-module-transforms/lib/get-module-name.js
generated
vendored
Normal file
48
node_modules/@babel/helper-module-transforms/lib/get-module-name.js
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = getModuleName;
|
||||
{
|
||||
const originalGetModuleName = getModuleName;
|
||||
exports.default = getModuleName = function getModuleName(rootOpts, pluginOpts) {
|
||||
var _pluginOpts$moduleId, _pluginOpts$moduleIds, _pluginOpts$getModule, _pluginOpts$moduleRoo;
|
||||
return originalGetModuleName(rootOpts, {
|
||||
moduleId: (_pluginOpts$moduleId = pluginOpts.moduleId) != null ? _pluginOpts$moduleId : rootOpts.moduleId,
|
||||
moduleIds: (_pluginOpts$moduleIds = pluginOpts.moduleIds) != null ? _pluginOpts$moduleIds : rootOpts.moduleIds,
|
||||
getModuleId: (_pluginOpts$getModule = pluginOpts.getModuleId) != null ? _pluginOpts$getModule : rootOpts.getModuleId,
|
||||
moduleRoot: (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot
|
||||
});
|
||||
};
|
||||
}
|
||||
function getModuleName(rootOpts, pluginOpts) {
|
||||
const {
|
||||
filename,
|
||||
filenameRelative = filename,
|
||||
sourceRoot = pluginOpts.moduleRoot
|
||||
} = rootOpts;
|
||||
const {
|
||||
moduleId,
|
||||
moduleIds = !!moduleId,
|
||||
getModuleId,
|
||||
moduleRoot = sourceRoot
|
||||
} = pluginOpts;
|
||||
if (!moduleIds) return null;
|
||||
if (moduleId != null && !getModuleId) {
|
||||
return moduleId;
|
||||
}
|
||||
let moduleName = moduleRoot != null ? moduleRoot + "/" : "";
|
||||
if (filenameRelative) {
|
||||
const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : "";
|
||||
moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, "");
|
||||
}
|
||||
moduleName = moduleName.replace(/\\/g, "/");
|
||||
if (getModuleId) {
|
||||
return getModuleId(moduleName) || moduleName;
|
||||
} else {
|
||||
return moduleName;
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-module-name.js.map
|
1
node_modules/@babel/helper-module-transforms/lib/get-module-name.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-module-transforms/lib/get-module-name.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["originalGetModuleName","getModuleName","exports","default","rootOpts","pluginOpts","_pluginOpts$moduleId","_pluginOpts$moduleIds","_pluginOpts$getModule","_pluginOpts$moduleRoo","moduleId","moduleIds","getModuleId","moduleRoot","filename","filenameRelative","sourceRoot","moduleName","sourceRootReplacer","RegExp","replace"],"sources":["../src/get-module-name.ts"],"sourcesContent":["type RootOptions = {\n filename?: string;\n filenameRelative?: string;\n sourceRoot?: string;\n};\n\nexport type PluginOptions = {\n moduleId?: string;\n moduleIds?: boolean;\n getModuleId?: (moduleName: string) => string | null | undefined;\n moduleRoot?: string;\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n const originalGetModuleName = getModuleName;\n\n // @ts-expect-error TS doesn't like reassigning a function.\n // eslint-disable-next-line no-func-assign\n getModuleName = function getModuleName(\n rootOpts: RootOptions & PluginOptions,\n pluginOpts: PluginOptions,\n ): string | null {\n return originalGetModuleName(rootOpts, {\n moduleId: pluginOpts.moduleId ?? rootOpts.moduleId,\n moduleIds: pluginOpts.moduleIds ?? rootOpts.moduleIds,\n getModuleId: pluginOpts.getModuleId ?? rootOpts.getModuleId,\n moduleRoot: pluginOpts.moduleRoot ?? rootOpts.moduleRoot,\n });\n };\n}\n\nexport default function getModuleName(\n rootOpts: RootOptions,\n pluginOpts: PluginOptions,\n): string | null {\n const {\n filename,\n filenameRelative = filename,\n sourceRoot = pluginOpts.moduleRoot,\n } = rootOpts;\n\n const {\n moduleId,\n moduleIds = !!moduleId,\n\n getModuleId,\n\n moduleRoot = sourceRoot,\n } = pluginOpts;\n\n if (!moduleIds) return null;\n\n // moduleId is n/a if a `getModuleId()` is provided\n if (moduleId != null && !getModuleId) {\n return moduleId;\n }\n\n let moduleName = moduleRoot != null ? moduleRoot + \"/\" : \"\";\n\n if (filenameRelative) {\n const sourceRootReplacer =\n sourceRoot != null ? new RegExp(\"^\" + sourceRoot + \"/?\") : \"\";\n\n moduleName += filenameRelative\n // remove sourceRoot from filename\n .replace(sourceRootReplacer, \"\")\n // remove extension\n .replace(/\\.(\\w*?)$/, \"\");\n }\n\n // normalize path separators\n moduleName = moduleName.replace(/\\\\/g, \"/\");\n\n if (getModuleId) {\n // If return is falsy, assume they want us to use our generated default name\n return getModuleId(moduleName) || moduleName;\n } else {\n return moduleName;\n }\n}\n"],"mappings":";;;;;;AAamC;EACjC,MAAMA,qBAAqB,GAAGC,aAAa;EAI3CC,OAAA,CAAAC,OAAA,GAAAF,aAAa,GAAG,SAASA,aAAaA,CACpCG,QAAqC,EACrCC,UAAyB,EACV;IAAA,IAAAC,oBAAA,EAAAC,qBAAA,EAAAC,qBAAA,EAAAC,qBAAA;IACf,OAAOT,qBAAqB,CAACI,QAAQ,EAAE;MACrCM,QAAQ,GAAAJ,oBAAA,GAAED,UAAU,CAACK,QAAQ,YAAAJ,oBAAA,GAAIF,QAAQ,CAACM,QAAQ;MAClDC,SAAS,GAAAJ,qBAAA,GAAEF,UAAU,CAACM,SAAS,YAAAJ,qBAAA,GAAIH,QAAQ,CAACO,SAAS;MACrDC,WAAW,GAAAJ,qBAAA,GAAEH,UAAU,CAACO,WAAW,YAAAJ,qBAAA,GAAIJ,QAAQ,CAACQ,WAAW;MAC3DC,UAAU,GAAAJ,qBAAA,GAAEJ,UAAU,CAACQ,UAAU,YAAAJ,qBAAA,GAAIL,QAAQ,CAACS;IAChD,CAAC,CAAC;EACJ,CAAC;AACH;AAEe,SAASZ,aAAaA,CACnCG,QAAqB,EACrBC,UAAyB,EACV;EACf,MAAM;IACJS,QAAQ;IACRC,gBAAgB,GAAGD,QAAQ;IAC3BE,UAAU,GAAGX,UAAU,CAACQ;EAC1B,CAAC,GAAGT,QAAQ;EAEZ,MAAM;IACJM,QAAQ;IACRC,SAAS,GAAG,CAAC,CAACD,QAAQ;IAEtBE,WAAW;IAEXC,UAAU,GAAGG;EACf,CAAC,GAAGX,UAAU;EAEd,IAAI,CAACM,SAAS,EAAE,OAAO,IAAI;EAG3B,IAAID,QAAQ,IAAI,IAAI,IAAI,CAACE,WAAW,EAAE;IACpC,OAAOF,QAAQ;EACjB;EAEA,IAAIO,UAAU,GAAGJ,UAAU,IAAI,IAAI,GAAGA,UAAU,GAAG,GAAG,GAAG,EAAE;EAE3D,IAAIE,gBAAgB,EAAE;IACpB,MAAMG,kBAAkB,GACtBF,UAAU,IAAI,IAAI,GAAG,IAAIG,MAAM,CAAC,GAAG,GAAGH,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE;IAE/DC,UAAU,IAAIF,gBAAgB,CAE3BK,OAAO,CAACF,kBAAkB,EAAE,EAAE,CAAC,CAE/BE,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;EAC7B;EAGAH,UAAU,GAAGA,UAAU,CAACG,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EAE3C,IAAIR,WAAW,EAAE;IAEf,OAAOA,WAAW,CAACK,UAAU,CAAC,IAAIA,UAAU;EAC9C,CAAC,MAAM;IACL,OAAOA,UAAU;EACnB;AACF"}
|
375
node_modules/@babel/helper-module-transforms/lib/index.js
generated
vendored
Normal file
375
node_modules/@babel/helper-module-transforms/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,375 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "buildDynamicImport", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _dynamicImport.buildDynamicImport;
|
||||
}
|
||||
});
|
||||
exports.buildNamespaceInitStatements = buildNamespaceInitStatements;
|
||||
exports.ensureStatementsHoisted = ensureStatementsHoisted;
|
||||
Object.defineProperty(exports, "getModuleName", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _getModuleName.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "hasExports", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _normalizeAndLoadMetadata.hasExports;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isModule", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _helperModuleImports.isModule;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isSideEffectImport", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _normalizeAndLoadMetadata.isSideEffectImport;
|
||||
}
|
||||
});
|
||||
exports.rewriteModuleStatementsAndPrepareHeader = rewriteModuleStatementsAndPrepareHeader;
|
||||
Object.defineProperty(exports, "rewriteThis", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _rewriteThis.default;
|
||||
}
|
||||
});
|
||||
exports.wrapInterop = wrapInterop;
|
||||
var _assert = require("assert");
|
||||
var _core = require("@babel/core");
|
||||
var _helperModuleImports = require("@babel/helper-module-imports");
|
||||
var _rewriteThis = require("./rewrite-this");
|
||||
var _rewriteLiveReferences = require("./rewrite-live-references");
|
||||
var _normalizeAndLoadMetadata = require("./normalize-and-load-metadata");
|
||||
var _dynamicImport = require("./dynamic-import");
|
||||
var _getModuleName = require("./get-module-name");
|
||||
const {
|
||||
booleanLiteral,
|
||||
callExpression,
|
||||
cloneNode,
|
||||
directive,
|
||||
directiveLiteral,
|
||||
expressionStatement,
|
||||
identifier,
|
||||
isIdentifier,
|
||||
memberExpression,
|
||||
stringLiteral,
|
||||
valueToNode,
|
||||
variableDeclaration,
|
||||
variableDeclarator
|
||||
} = _core.types;
|
||||
{
|
||||
{
|
||||
{
|
||||
exports.getDynamicImportSource = require("./dynamic-import").getDynamicImportSource;
|
||||
}
|
||||
}
|
||||
}
|
||||
function rewriteModuleStatementsAndPrepareHeader(path, {
|
||||
exportName,
|
||||
strict,
|
||||
allowTopLevelThis,
|
||||
strictMode,
|
||||
noInterop,
|
||||
importInterop = noInterop ? "none" : "babel",
|
||||
lazy,
|
||||
esNamespaceOnly,
|
||||
filename,
|
||||
constantReexports = arguments[1].loose,
|
||||
enumerableModuleMeta = arguments[1].loose,
|
||||
noIncompleteNsImportDetection
|
||||
}) {
|
||||
(0, _normalizeAndLoadMetadata.validateImportInteropOption)(importInterop);
|
||||
_assert((0, _helperModuleImports.isModule)(path), "Cannot process module statements in a script");
|
||||
path.node.sourceType = "script";
|
||||
const meta = (0, _normalizeAndLoadMetadata.default)(path, exportName, {
|
||||
importInterop,
|
||||
initializeReexports: constantReexports,
|
||||
lazy,
|
||||
esNamespaceOnly,
|
||||
filename
|
||||
});
|
||||
if (!allowTopLevelThis) {
|
||||
(0, _rewriteThis.default)(path);
|
||||
}
|
||||
(0, _rewriteLiveReferences.default)(path, meta);
|
||||
if (strictMode !== false) {
|
||||
const hasStrict = path.node.directives.some(directive => {
|
||||
return directive.value.value === "use strict";
|
||||
});
|
||||
if (!hasStrict) {
|
||||
path.unshiftContainer("directives", directive(directiveLiteral("use strict")));
|
||||
}
|
||||
}
|
||||
const headers = [];
|
||||
if ((0, _normalizeAndLoadMetadata.hasExports)(meta) && !strict) {
|
||||
headers.push(buildESModuleHeader(meta, enumerableModuleMeta));
|
||||
}
|
||||
const nameList = buildExportNameListDeclaration(path, meta);
|
||||
if (nameList) {
|
||||
meta.exportNameListName = nameList.name;
|
||||
headers.push(nameList.statement);
|
||||
}
|
||||
headers.push(...buildExportInitializationStatements(path, meta, constantReexports, noIncompleteNsImportDetection));
|
||||
return {
|
||||
meta,
|
||||
headers
|
||||
};
|
||||
}
|
||||
function ensureStatementsHoisted(statements) {
|
||||
statements.forEach(header => {
|
||||
header._blockHoist = 3;
|
||||
});
|
||||
}
|
||||
function wrapInterop(programPath, expr, type) {
|
||||
if (type === "none") {
|
||||
return null;
|
||||
}
|
||||
if (type === "node-namespace") {
|
||||
return callExpression(programPath.hub.addHelper("interopRequireWildcard"), [expr, booleanLiteral(true)]);
|
||||
} else if (type === "node-default") {
|
||||
return null;
|
||||
}
|
||||
let helper;
|
||||
if (type === "default") {
|
||||
helper = "interopRequireDefault";
|
||||
} else if (type === "namespace") {
|
||||
helper = "interopRequireWildcard";
|
||||
} else {
|
||||
throw new Error(`Unknown interop: ${type}`);
|
||||
}
|
||||
return callExpression(programPath.hub.addHelper(helper), [expr]);
|
||||
}
|
||||
function buildNamespaceInitStatements(metadata, sourceMetadata, constantReexports = false) {
|
||||
const statements = [];
|
||||
let srcNamespace = identifier(sourceMetadata.name);
|
||||
if (sourceMetadata.lazy) srcNamespace = callExpression(srcNamespace, []);
|
||||
for (const localName of sourceMetadata.importsNamespace) {
|
||||
if (localName === sourceMetadata.name) continue;
|
||||
statements.push(_core.template.statement`var NAME = SOURCE;`({
|
||||
NAME: localName,
|
||||
SOURCE: cloneNode(srcNamespace)
|
||||
}));
|
||||
}
|
||||
if (constantReexports) {
|
||||
statements.push(...buildReexportsFromMeta(metadata, sourceMetadata, true));
|
||||
}
|
||||
for (const exportName of sourceMetadata.reexportNamespace) {
|
||||
statements.push((sourceMetadata.lazy ? _core.template.statement`
|
||||
Object.defineProperty(EXPORTS, "NAME", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return NAMESPACE;
|
||||
}
|
||||
});
|
||||
` : _core.template.statement`EXPORTS.NAME = NAMESPACE;`)({
|
||||
EXPORTS: metadata.exportName,
|
||||
NAME: exportName,
|
||||
NAMESPACE: cloneNode(srcNamespace)
|
||||
}));
|
||||
}
|
||||
if (sourceMetadata.reexportAll) {
|
||||
const statement = buildNamespaceReexport(metadata, cloneNode(srcNamespace), constantReexports);
|
||||
statement.loc = sourceMetadata.reexportAll.loc;
|
||||
statements.push(statement);
|
||||
}
|
||||
return statements;
|
||||
}
|
||||
const ReexportTemplate = {
|
||||
constant: _core.template.statement`EXPORTS.EXPORT_NAME = NAMESPACE_IMPORT;`,
|
||||
constantComputed: _core.template.statement`EXPORTS["EXPORT_NAME"] = NAMESPACE_IMPORT;`,
|
||||
spec: _core.template.statement`
|
||||
Object.defineProperty(EXPORTS, "EXPORT_NAME", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return NAMESPACE_IMPORT;
|
||||
},
|
||||
});
|
||||
`
|
||||
};
|
||||
function buildReexportsFromMeta(meta, metadata, constantReexports) {
|
||||
const namespace = metadata.lazy ? callExpression(identifier(metadata.name), []) : identifier(metadata.name);
|
||||
const {
|
||||
stringSpecifiers
|
||||
} = meta;
|
||||
return Array.from(metadata.reexports, ([exportName, importName]) => {
|
||||
let NAMESPACE_IMPORT = cloneNode(namespace);
|
||||
if (importName === "default" && metadata.interop === "node-default") {} else if (stringSpecifiers.has(importName)) {
|
||||
NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, stringLiteral(importName), true);
|
||||
} else {
|
||||
NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, identifier(importName));
|
||||
}
|
||||
const astNodes = {
|
||||
EXPORTS: meta.exportName,
|
||||
EXPORT_NAME: exportName,
|
||||
NAMESPACE_IMPORT
|
||||
};
|
||||
if (constantReexports || isIdentifier(NAMESPACE_IMPORT)) {
|
||||
if (stringSpecifiers.has(exportName)) {
|
||||
return ReexportTemplate.constantComputed(astNodes);
|
||||
} else {
|
||||
return ReexportTemplate.constant(astNodes);
|
||||
}
|
||||
} else {
|
||||
return ReexportTemplate.spec(astNodes);
|
||||
}
|
||||
});
|
||||
}
|
||||
function buildESModuleHeader(metadata, enumerableModuleMeta = false) {
|
||||
return (enumerableModuleMeta ? _core.template.statement`
|
||||
EXPORTS.__esModule = true;
|
||||
` : _core.template.statement`
|
||||
Object.defineProperty(EXPORTS, "__esModule", {
|
||||
value: true,
|
||||
});
|
||||
`)({
|
||||
EXPORTS: metadata.exportName
|
||||
});
|
||||
}
|
||||
function buildNamespaceReexport(metadata, namespace, constantReexports) {
|
||||
return (constantReexports ? _core.template.statement`
|
||||
Object.keys(NAMESPACE).forEach(function(key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
VERIFY_NAME_LIST;
|
||||
if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
|
||||
|
||||
EXPORTS[key] = NAMESPACE[key];
|
||||
});
|
||||
` : _core.template.statement`
|
||||
Object.keys(NAMESPACE).forEach(function(key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
VERIFY_NAME_LIST;
|
||||
if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
|
||||
|
||||
Object.defineProperty(EXPORTS, key, {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return NAMESPACE[key];
|
||||
},
|
||||
});
|
||||
});
|
||||
`)({
|
||||
NAMESPACE: namespace,
|
||||
EXPORTS: metadata.exportName,
|
||||
VERIFY_NAME_LIST: metadata.exportNameListName ? (0, _core.template)`
|
||||
if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
|
||||
`({
|
||||
EXPORTS_LIST: metadata.exportNameListName
|
||||
}) : null
|
||||
});
|
||||
}
|
||||
function buildExportNameListDeclaration(programPath, metadata) {
|
||||
const exportedVars = Object.create(null);
|
||||
for (const data of metadata.local.values()) {
|
||||
for (const name of data.names) {
|
||||
exportedVars[name] = true;
|
||||
}
|
||||
}
|
||||
let hasReexport = false;
|
||||
for (const data of metadata.source.values()) {
|
||||
for (const exportName of data.reexports.keys()) {
|
||||
exportedVars[exportName] = true;
|
||||
}
|
||||
for (const exportName of data.reexportNamespace) {
|
||||
exportedVars[exportName] = true;
|
||||
}
|
||||
hasReexport = hasReexport || !!data.reexportAll;
|
||||
}
|
||||
if (!hasReexport || Object.keys(exportedVars).length === 0) return null;
|
||||
const name = programPath.scope.generateUidIdentifier("exportNames");
|
||||
delete exportedVars.default;
|
||||
return {
|
||||
name: name.name,
|
||||
statement: variableDeclaration("var", [variableDeclarator(name, valueToNode(exportedVars))])
|
||||
};
|
||||
}
|
||||
function buildExportInitializationStatements(programPath, metadata, constantReexports = false, noIncompleteNsImportDetection = false) {
|
||||
const initStatements = [];
|
||||
for (const [localName, data] of metadata.local) {
|
||||
if (data.kind === "import") {} else if (data.kind === "hoisted") {
|
||||
initStatements.push([data.names[0], buildInitStatement(metadata, data.names, identifier(localName))]);
|
||||
} else if (!noIncompleteNsImportDetection) {
|
||||
for (const exportName of data.names) {
|
||||
initStatements.push([exportName, null]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const data of metadata.source.values()) {
|
||||
if (!constantReexports) {
|
||||
const reexportsStatements = buildReexportsFromMeta(metadata, data, false);
|
||||
const reexports = [...data.reexports.keys()];
|
||||
for (let i = 0; i < reexportsStatements.length; i++) {
|
||||
initStatements.push([reexports[i], reexportsStatements[i]]);
|
||||
}
|
||||
}
|
||||
if (!noIncompleteNsImportDetection) {
|
||||
for (const exportName of data.reexportNamespace) {
|
||||
initStatements.push([exportName, null]);
|
||||
}
|
||||
}
|
||||
}
|
||||
initStatements.sort(([a], [b]) => {
|
||||
if (a < b) return -1;
|
||||
if (b < a) return 1;
|
||||
return 0;
|
||||
});
|
||||
const results = [];
|
||||
if (noIncompleteNsImportDetection) {
|
||||
for (const [, initStatement] of initStatements) {
|
||||
results.push(initStatement);
|
||||
}
|
||||
} else {
|
||||
const chunkSize = 100;
|
||||
for (let i = 0; i < initStatements.length; i += chunkSize) {
|
||||
let uninitializedExportNames = [];
|
||||
for (let j = 0; j < chunkSize && i + j < initStatements.length; j++) {
|
||||
const [exportName, initStatement] = initStatements[i + j];
|
||||
if (initStatement !== null) {
|
||||
if (uninitializedExportNames.length > 0) {
|
||||
results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode()));
|
||||
uninitializedExportNames = [];
|
||||
}
|
||||
results.push(initStatement);
|
||||
} else {
|
||||
uninitializedExportNames.push(exportName);
|
||||
}
|
||||
}
|
||||
if (uninitializedExportNames.length > 0) {
|
||||
results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
const InitTemplate = {
|
||||
computed: _core.template.expression`EXPORTS["NAME"] = VALUE`,
|
||||
default: _core.template.expression`EXPORTS.NAME = VALUE`
|
||||
};
|
||||
function buildInitStatement(metadata, exportNames, initExpr) {
|
||||
const {
|
||||
stringSpecifiers,
|
||||
exportName: EXPORTS
|
||||
} = metadata;
|
||||
return expressionStatement(exportNames.reduce((acc, exportName) => {
|
||||
const params = {
|
||||
EXPORTS,
|
||||
NAME: exportName,
|
||||
VALUE: acc
|
||||
};
|
||||
if (stringSpecifiers.has(exportName)) {
|
||||
return InitTemplate.computed(params);
|
||||
} else {
|
||||
return InitTemplate.default(params);
|
||||
}
|
||||
}, initExpr));
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/@babel/helper-module-transforms/lib/index.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-module-transforms/lib/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
354
node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js
generated
vendored
Normal file
354
node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js
generated
vendored
Normal file
@ -0,0 +1,354 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = normalizeModuleAndLoadMetadata;
|
||||
exports.hasExports = hasExports;
|
||||
exports.isSideEffectImport = isSideEffectImport;
|
||||
exports.validateImportInteropOption = validateImportInteropOption;
|
||||
var _path = require("path");
|
||||
var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
|
||||
var _helperSplitExportDeclaration = require("@babel/helper-split-export-declaration");
|
||||
function hasExports(metadata) {
|
||||
return metadata.hasExports;
|
||||
}
|
||||
function isSideEffectImport(source) {
|
||||
return source.imports.size === 0 && source.importsNamespace.size === 0 && source.reexports.size === 0 && source.reexportNamespace.size === 0 && !source.reexportAll;
|
||||
}
|
||||
function validateImportInteropOption(importInterop) {
|
||||
if (typeof importInterop !== "function" && importInterop !== "none" && importInterop !== "babel" && importInterop !== "node") {
|
||||
throw new Error(`.importInterop must be one of "none", "babel", "node", or a function returning one of those values (received ${importInterop}).`);
|
||||
}
|
||||
return importInterop;
|
||||
}
|
||||
function resolveImportInterop(importInterop, source, filename) {
|
||||
if (typeof importInterop === "function") {
|
||||
return validateImportInteropOption(importInterop(source, filename));
|
||||
}
|
||||
return importInterop;
|
||||
}
|
||||
function normalizeModuleAndLoadMetadata(programPath, exportName, {
|
||||
importInterop,
|
||||
initializeReexports = false,
|
||||
lazy = false,
|
||||
esNamespaceOnly = false,
|
||||
filename
|
||||
}) {
|
||||
if (!exportName) {
|
||||
exportName = programPath.scope.generateUidIdentifier("exports").name;
|
||||
}
|
||||
const stringSpecifiers = new Set();
|
||||
nameAnonymousExports(programPath);
|
||||
const {
|
||||
local,
|
||||
sources,
|
||||
hasExports
|
||||
} = getModuleMetadata(programPath, {
|
||||
initializeReexports,
|
||||
lazy
|
||||
}, stringSpecifiers);
|
||||
removeImportExportDeclarations(programPath);
|
||||
for (const [source, metadata] of sources) {
|
||||
if (metadata.importsNamespace.size > 0) {
|
||||
metadata.name = metadata.importsNamespace.values().next().value;
|
||||
}
|
||||
const resolvedInterop = resolveImportInterop(importInterop, source, filename);
|
||||
if (resolvedInterop === "none") {
|
||||
metadata.interop = "none";
|
||||
} else if (resolvedInterop === "node" && metadata.interop === "namespace") {
|
||||
metadata.interop = "node-namespace";
|
||||
} else if (resolvedInterop === "node" && metadata.interop === "default") {
|
||||
metadata.interop = "node-default";
|
||||
} else if (esNamespaceOnly && metadata.interop === "namespace") {
|
||||
metadata.interop = "default";
|
||||
}
|
||||
}
|
||||
return {
|
||||
exportName,
|
||||
exportNameListName: null,
|
||||
hasExports,
|
||||
local,
|
||||
source: sources,
|
||||
stringSpecifiers
|
||||
};
|
||||
}
|
||||
function getExportSpecifierName(path, stringSpecifiers) {
|
||||
if (path.isIdentifier()) {
|
||||
return path.node.name;
|
||||
} else if (path.isStringLiteral()) {
|
||||
const stringValue = path.node.value;
|
||||
if (!(0, _helperValidatorIdentifier.isIdentifierName)(stringValue)) {
|
||||
stringSpecifiers.add(stringValue);
|
||||
}
|
||||
return stringValue;
|
||||
} else {
|
||||
throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`);
|
||||
}
|
||||
}
|
||||
function assertExportSpecifier(path) {
|
||||
if (path.isExportSpecifier()) {
|
||||
return;
|
||||
} else if (path.isExportNamespaceSpecifier()) {
|
||||
throw path.buildCodeFrameError("Export namespace should be first transformed by `@babel/plugin-transform-export-namespace-from`.");
|
||||
} else {
|
||||
throw path.buildCodeFrameError("Unexpected export specifier type");
|
||||
}
|
||||
}
|
||||
function getModuleMetadata(programPath, {
|
||||
lazy,
|
||||
initializeReexports
|
||||
}, stringSpecifiers) {
|
||||
const localData = getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers);
|
||||
const sourceData = new Map();
|
||||
const getData = sourceNode => {
|
||||
const source = sourceNode.value;
|
||||
let data = sourceData.get(source);
|
||||
if (!data) {
|
||||
data = {
|
||||
name: programPath.scope.generateUidIdentifier((0, _path.basename)(source, (0, _path.extname)(source))).name,
|
||||
interop: "none",
|
||||
loc: null,
|
||||
imports: new Map(),
|
||||
importsNamespace: new Set(),
|
||||
reexports: new Map(),
|
||||
reexportNamespace: new Set(),
|
||||
reexportAll: null,
|
||||
lazy: false,
|
||||
referenced: false
|
||||
};
|
||||
sourceData.set(source, data);
|
||||
}
|
||||
return data;
|
||||
};
|
||||
let hasExports = false;
|
||||
programPath.get("body").forEach(child => {
|
||||
if (child.isImportDeclaration()) {
|
||||
const data = getData(child.node.source);
|
||||
if (!data.loc) data.loc = child.node.loc;
|
||||
child.get("specifiers").forEach(spec => {
|
||||
if (spec.isImportDefaultSpecifier()) {
|
||||
const localName = spec.get("local").node.name;
|
||||
data.imports.set(localName, "default");
|
||||
const reexport = localData.get(localName);
|
||||
if (reexport) {
|
||||
localData.delete(localName);
|
||||
reexport.names.forEach(name => {
|
||||
data.reexports.set(name, "default");
|
||||
});
|
||||
data.referenced = true;
|
||||
}
|
||||
} else if (spec.isImportNamespaceSpecifier()) {
|
||||
const localName = spec.get("local").node.name;
|
||||
data.importsNamespace.add(localName);
|
||||
const reexport = localData.get(localName);
|
||||
if (reexport) {
|
||||
localData.delete(localName);
|
||||
reexport.names.forEach(name => {
|
||||
data.reexportNamespace.add(name);
|
||||
});
|
||||
data.referenced = true;
|
||||
}
|
||||
} else if (spec.isImportSpecifier()) {
|
||||
const importName = getExportSpecifierName(spec.get("imported"), stringSpecifiers);
|
||||
const localName = spec.get("local").node.name;
|
||||
data.imports.set(localName, importName);
|
||||
const reexport = localData.get(localName);
|
||||
if (reexport) {
|
||||
localData.delete(localName);
|
||||
reexport.names.forEach(name => {
|
||||
data.reexports.set(name, importName);
|
||||
});
|
||||
data.referenced = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (child.isExportAllDeclaration()) {
|
||||
hasExports = true;
|
||||
const data = getData(child.node.source);
|
||||
if (!data.loc) data.loc = child.node.loc;
|
||||
data.reexportAll = {
|
||||
loc: child.node.loc
|
||||
};
|
||||
data.referenced = true;
|
||||
} else if (child.isExportNamedDeclaration() && child.node.source) {
|
||||
hasExports = true;
|
||||
const data = getData(child.node.source);
|
||||
if (!data.loc) data.loc = child.node.loc;
|
||||
child.get("specifiers").forEach(spec => {
|
||||
assertExportSpecifier(spec);
|
||||
const importName = getExportSpecifierName(spec.get("local"), stringSpecifiers);
|
||||
const exportName = getExportSpecifierName(spec.get("exported"), stringSpecifiers);
|
||||
data.reexports.set(exportName, importName);
|
||||
data.referenced = true;
|
||||
if (exportName === "__esModule") {
|
||||
throw spec.get("exported").buildCodeFrameError('Illegal export "__esModule".');
|
||||
}
|
||||
});
|
||||
} else if (child.isExportNamedDeclaration() || child.isExportDefaultDeclaration()) {
|
||||
hasExports = true;
|
||||
}
|
||||
});
|
||||
for (const metadata of sourceData.values()) {
|
||||
let needsDefault = false;
|
||||
let needsNamed = false;
|
||||
if (metadata.importsNamespace.size > 0) {
|
||||
needsDefault = true;
|
||||
needsNamed = true;
|
||||
}
|
||||
if (metadata.reexportAll) {
|
||||
needsNamed = true;
|
||||
}
|
||||
for (const importName of metadata.imports.values()) {
|
||||
if (importName === "default") needsDefault = true;else needsNamed = true;
|
||||
}
|
||||
for (const importName of metadata.reexports.values()) {
|
||||
if (importName === "default") needsDefault = true;else needsNamed = true;
|
||||
}
|
||||
if (needsDefault && needsNamed) {
|
||||
metadata.interop = "namespace";
|
||||
} else if (needsDefault) {
|
||||
metadata.interop = "default";
|
||||
}
|
||||
}
|
||||
for (const [source, metadata] of sourceData) {
|
||||
if (lazy !== false && !(isSideEffectImport(metadata) || metadata.reexportAll)) {
|
||||
if (lazy === true) {
|
||||
metadata.lazy = !/\./.test(source);
|
||||
} else if (Array.isArray(lazy)) {
|
||||
metadata.lazy = lazy.indexOf(source) !== -1;
|
||||
} else if (typeof lazy === "function") {
|
||||
metadata.lazy = lazy(source);
|
||||
} else {
|
||||
throw new Error(`.lazy must be a boolean, string array, or function`);
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
hasExports,
|
||||
local: localData,
|
||||
sources: sourceData
|
||||
};
|
||||
}
|
||||
function getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers) {
|
||||
const bindingKindLookup = new Map();
|
||||
programPath.get("body").forEach(child => {
|
||||
let kind;
|
||||
if (child.isImportDeclaration()) {
|
||||
kind = "import";
|
||||
} else {
|
||||
if (child.isExportDefaultDeclaration()) {
|
||||
child = child.get("declaration");
|
||||
}
|
||||
if (child.isExportNamedDeclaration()) {
|
||||
if (child.node.declaration) {
|
||||
child = child.get("declaration");
|
||||
} else if (initializeReexports && child.node.source && child.get("source").isStringLiteral()) {
|
||||
child.get("specifiers").forEach(spec => {
|
||||
assertExportSpecifier(spec);
|
||||
bindingKindLookup.set(spec.get("local").node.name, "block");
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (child.isFunctionDeclaration()) {
|
||||
kind = "hoisted";
|
||||
} else if (child.isClassDeclaration()) {
|
||||
kind = "block";
|
||||
} else if (child.isVariableDeclaration({
|
||||
kind: "var"
|
||||
})) {
|
||||
kind = "var";
|
||||
} else if (child.isVariableDeclaration()) {
|
||||
kind = "block";
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Object.keys(child.getOuterBindingIdentifiers()).forEach(name => {
|
||||
bindingKindLookup.set(name, kind);
|
||||
});
|
||||
});
|
||||
const localMetadata = new Map();
|
||||
const getLocalMetadata = idPath => {
|
||||
const localName = idPath.node.name;
|
||||
let metadata = localMetadata.get(localName);
|
||||
if (!metadata) {
|
||||
const kind = bindingKindLookup.get(localName);
|
||||
if (kind === undefined) {
|
||||
throw idPath.buildCodeFrameError(`Exporting local "${localName}", which is not declared.`);
|
||||
}
|
||||
metadata = {
|
||||
names: [],
|
||||
kind
|
||||
};
|
||||
localMetadata.set(localName, metadata);
|
||||
}
|
||||
return metadata;
|
||||
};
|
||||
programPath.get("body").forEach(child => {
|
||||
if (child.isExportNamedDeclaration() && (initializeReexports || !child.node.source)) {
|
||||
if (child.node.declaration) {
|
||||
const declaration = child.get("declaration");
|
||||
const ids = declaration.getOuterBindingIdentifierPaths();
|
||||
Object.keys(ids).forEach(name => {
|
||||
if (name === "__esModule") {
|
||||
throw declaration.buildCodeFrameError('Illegal export "__esModule".');
|
||||
}
|
||||
getLocalMetadata(ids[name]).names.push(name);
|
||||
});
|
||||
} else {
|
||||
child.get("specifiers").forEach(spec => {
|
||||
const local = spec.get("local");
|
||||
const exported = spec.get("exported");
|
||||
const localMetadata = getLocalMetadata(local);
|
||||
const exportName = getExportSpecifierName(exported, stringSpecifiers);
|
||||
if (exportName === "__esModule") {
|
||||
throw exported.buildCodeFrameError('Illegal export "__esModule".');
|
||||
}
|
||||
localMetadata.names.push(exportName);
|
||||
});
|
||||
}
|
||||
} else if (child.isExportDefaultDeclaration()) {
|
||||
const declaration = child.get("declaration");
|
||||
if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
|
||||
getLocalMetadata(declaration.get("id")).names.push("default");
|
||||
} else {
|
||||
throw declaration.buildCodeFrameError("Unexpected default expression export.");
|
||||
}
|
||||
}
|
||||
});
|
||||
return localMetadata;
|
||||
}
|
||||
function nameAnonymousExports(programPath) {
|
||||
programPath.get("body").forEach(child => {
|
||||
if (!child.isExportDefaultDeclaration()) return;
|
||||
(0, _helperSplitExportDeclaration.default)(child);
|
||||
});
|
||||
}
|
||||
function removeImportExportDeclarations(programPath) {
|
||||
programPath.get("body").forEach(child => {
|
||||
if (child.isImportDeclaration()) {
|
||||
child.remove();
|
||||
} else if (child.isExportNamedDeclaration()) {
|
||||
if (child.node.declaration) {
|
||||
child.node.declaration._blockHoist = child.node._blockHoist;
|
||||
child.replaceWith(child.node.declaration);
|
||||
} else {
|
||||
child.remove();
|
||||
}
|
||||
} else if (child.isExportDefaultDeclaration()) {
|
||||
const declaration = child.get("declaration");
|
||||
if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
|
||||
declaration._blockHoist = child.node._blockHoist;
|
||||
child.replaceWith(declaration);
|
||||
} else {
|
||||
throw declaration.buildCodeFrameError("Unexpected default expression export.");
|
||||
}
|
||||
} else if (child.isExportAllDeclaration()) {
|
||||
child.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=normalize-and-load-metadata.js.map
|
1
node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
349
node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js
generated
vendored
Normal file
349
node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js
generated
vendored
Normal file
@ -0,0 +1,349 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = rewriteLiveReferences;
|
||||
var _assert = require("assert");
|
||||
var _core = require("@babel/core");
|
||||
var _helperSimpleAccess = require("@babel/helper-simple-access");
|
||||
const {
|
||||
assignmentExpression,
|
||||
callExpression,
|
||||
cloneNode,
|
||||
expressionStatement,
|
||||
getOuterBindingIdentifiers,
|
||||
identifier,
|
||||
isMemberExpression,
|
||||
isVariableDeclaration,
|
||||
jsxIdentifier,
|
||||
jsxMemberExpression,
|
||||
memberExpression,
|
||||
numericLiteral,
|
||||
sequenceExpression,
|
||||
stringLiteral,
|
||||
variableDeclaration,
|
||||
variableDeclarator
|
||||
} = _core.types;
|
||||
function isInType(path) {
|
||||
do {
|
||||
switch (path.parent.type) {
|
||||
case "TSTypeAnnotation":
|
||||
case "TSTypeAliasDeclaration":
|
||||
case "TSTypeReference":
|
||||
case "TypeAnnotation":
|
||||
case "TypeAlias":
|
||||
return true;
|
||||
case "ExportSpecifier":
|
||||
return path.parentPath.parent.exportKind === "type";
|
||||
default:
|
||||
if (path.parentPath.isStatement() || path.parentPath.isExpression()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} while (path = path.parentPath);
|
||||
}
|
||||
function rewriteLiveReferences(programPath, metadata) {
|
||||
const imported = new Map();
|
||||
const exported = new Map();
|
||||
const requeueInParent = path => {
|
||||
programPath.requeue(path);
|
||||
};
|
||||
for (const [source, data] of metadata.source) {
|
||||
for (const [localName, importName] of data.imports) {
|
||||
imported.set(localName, [source, importName, null]);
|
||||
}
|
||||
for (const localName of data.importsNamespace) {
|
||||
imported.set(localName, [source, null, localName]);
|
||||
}
|
||||
}
|
||||
for (const [local, data] of metadata.local) {
|
||||
let exportMeta = exported.get(local);
|
||||
if (!exportMeta) {
|
||||
exportMeta = [];
|
||||
exported.set(local, exportMeta);
|
||||
}
|
||||
exportMeta.push(...data.names);
|
||||
}
|
||||
const rewriteBindingInitVisitorState = {
|
||||
metadata,
|
||||
requeueInParent,
|
||||
scope: programPath.scope,
|
||||
exported
|
||||
};
|
||||
programPath.traverse(rewriteBindingInitVisitor, rewriteBindingInitVisitorState);
|
||||
const bindingNames = new Set([...Array.from(imported.keys()), ...Array.from(exported.keys())]);
|
||||
{
|
||||
(0, _helperSimpleAccess.default)(programPath, bindingNames, false);
|
||||
}
|
||||
const rewriteReferencesVisitorState = {
|
||||
seen: new WeakSet(),
|
||||
metadata,
|
||||
requeueInParent,
|
||||
scope: programPath.scope,
|
||||
imported,
|
||||
exported,
|
||||
buildImportReference: ([source, importName, localName], identNode) => {
|
||||
const meta = metadata.source.get(source);
|
||||
meta.referenced = true;
|
||||
if (localName) {
|
||||
if (meta.lazy) {
|
||||
identNode = callExpression(identNode, []);
|
||||
}
|
||||
return identNode;
|
||||
}
|
||||
let namespace = identifier(meta.name);
|
||||
if (meta.lazy) namespace = callExpression(namespace, []);
|
||||
if (importName === "default" && meta.interop === "node-default") {
|
||||
return namespace;
|
||||
}
|
||||
const computed = metadata.stringSpecifiers.has(importName);
|
||||
return memberExpression(namespace, computed ? stringLiteral(importName) : identifier(importName), computed);
|
||||
}
|
||||
};
|
||||
programPath.traverse(rewriteReferencesVisitor, rewriteReferencesVisitorState);
|
||||
}
|
||||
const rewriteBindingInitVisitor = {
|
||||
Scope(path) {
|
||||
path.skip();
|
||||
},
|
||||
ClassDeclaration(path) {
|
||||
const {
|
||||
requeueInParent,
|
||||
exported,
|
||||
metadata
|
||||
} = this;
|
||||
const {
|
||||
id
|
||||
} = path.node;
|
||||
if (!id) throw new Error("Expected class to have a name");
|
||||
const localName = id.name;
|
||||
const exportNames = exported.get(localName) || [];
|
||||
if (exportNames.length > 0) {
|
||||
const statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName), path.scope));
|
||||
statement._blockHoist = path.node._blockHoist;
|
||||
requeueInParent(path.insertAfter(statement)[0]);
|
||||
}
|
||||
},
|
||||
VariableDeclaration(path) {
|
||||
const {
|
||||
requeueInParent,
|
||||
exported,
|
||||
metadata
|
||||
} = this;
|
||||
Object.keys(path.getOuterBindingIdentifiers()).forEach(localName => {
|
||||
const exportNames = exported.get(localName) || [];
|
||||
if (exportNames.length > 0) {
|
||||
const statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName), path.scope));
|
||||
statement._blockHoist = path.node._blockHoist;
|
||||
requeueInParent(path.insertAfter(statement)[0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
const buildBindingExportAssignmentExpression = (metadata, exportNames, localExpr, scope) => {
|
||||
const exportsObjectName = metadata.exportName;
|
||||
for (let currentScope = scope; currentScope != null; currentScope = currentScope.parent) {
|
||||
if (currentScope.hasOwnBinding(exportsObjectName)) {
|
||||
currentScope.rename(exportsObjectName);
|
||||
}
|
||||
}
|
||||
return (exportNames || []).reduce((expr, exportName) => {
|
||||
const {
|
||||
stringSpecifiers
|
||||
} = metadata;
|
||||
const computed = stringSpecifiers.has(exportName);
|
||||
return assignmentExpression("=", memberExpression(identifier(exportsObjectName), computed ? stringLiteral(exportName) : identifier(exportName), computed), expr);
|
||||
}, localExpr);
|
||||
};
|
||||
const buildImportThrow = localName => {
|
||||
return _core.template.expression.ast`
|
||||
(function() {
|
||||
throw new Error('"' + '${localName}' + '" is read-only.');
|
||||
})()
|
||||
`;
|
||||
};
|
||||
const rewriteReferencesVisitor = {
|
||||
ReferencedIdentifier(path) {
|
||||
const {
|
||||
seen,
|
||||
buildImportReference,
|
||||
scope,
|
||||
imported,
|
||||
requeueInParent
|
||||
} = this;
|
||||
if (seen.has(path.node)) return;
|
||||
seen.add(path.node);
|
||||
const localName = path.node.name;
|
||||
const importData = imported.get(localName);
|
||||
if (importData) {
|
||||
if (isInType(path)) {
|
||||
throw path.buildCodeFrameError(`Cannot transform the imported binding "${localName}" since it's also used in a type annotation. ` + `Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`);
|
||||
}
|
||||
const localBinding = path.scope.getBinding(localName);
|
||||
const rootBinding = scope.getBinding(localName);
|
||||
if (rootBinding !== localBinding) return;
|
||||
const ref = buildImportReference(importData, path.node);
|
||||
ref.loc = path.node.loc;
|
||||
if ((path.parentPath.isCallExpression({
|
||||
callee: path.node
|
||||
}) || path.parentPath.isOptionalCallExpression({
|
||||
callee: path.node
|
||||
}) || path.parentPath.isTaggedTemplateExpression({
|
||||
tag: path.node
|
||||
})) && isMemberExpression(ref)) {
|
||||
path.replaceWith(sequenceExpression([numericLiteral(0), ref]));
|
||||
} else if (path.isJSXIdentifier() && isMemberExpression(ref)) {
|
||||
const {
|
||||
object,
|
||||
property
|
||||
} = ref;
|
||||
path.replaceWith(jsxMemberExpression(jsxIdentifier(object.name), jsxIdentifier(property.name)));
|
||||
} else {
|
||||
path.replaceWith(ref);
|
||||
}
|
||||
requeueInParent(path);
|
||||
path.skip();
|
||||
}
|
||||
},
|
||||
UpdateExpression(path) {
|
||||
const {
|
||||
scope,
|
||||
seen,
|
||||
imported,
|
||||
exported,
|
||||
requeueInParent,
|
||||
buildImportReference
|
||||
} = this;
|
||||
if (seen.has(path.node)) return;
|
||||
seen.add(path.node);
|
||||
const arg = path.get("argument");
|
||||
if (arg.isMemberExpression()) return;
|
||||
const update = path.node;
|
||||
if (arg.isIdentifier()) {
|
||||
const localName = arg.node.name;
|
||||
if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
|
||||
return;
|
||||
}
|
||||
const exportedNames = exported.get(localName);
|
||||
const importData = imported.get(localName);
|
||||
if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) {
|
||||
if (importData) {
|
||||
path.replaceWith(assignmentExpression(update.operator[0] + "=", buildImportReference(importData, arg.node), buildImportThrow(localName)));
|
||||
} else if (update.prefix) {
|
||||
path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, cloneNode(update), path.scope));
|
||||
} else {
|
||||
const ref = scope.generateDeclaredUidIdentifier(localName);
|
||||
path.replaceWith(sequenceExpression([assignmentExpression("=", cloneNode(ref), cloneNode(update)), buildBindingExportAssignmentExpression(this.metadata, exportedNames, identifier(localName), path.scope), cloneNode(ref)]));
|
||||
}
|
||||
}
|
||||
}
|
||||
requeueInParent(path);
|
||||
path.skip();
|
||||
},
|
||||
AssignmentExpression: {
|
||||
exit(path) {
|
||||
const {
|
||||
scope,
|
||||
seen,
|
||||
imported,
|
||||
exported,
|
||||
requeueInParent,
|
||||
buildImportReference
|
||||
} = this;
|
||||
if (seen.has(path.node)) return;
|
||||
seen.add(path.node);
|
||||
const left = path.get("left");
|
||||
if (left.isMemberExpression()) return;
|
||||
if (left.isIdentifier()) {
|
||||
const localName = left.node.name;
|
||||
if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
|
||||
return;
|
||||
}
|
||||
const exportedNames = exported.get(localName);
|
||||
const importData = imported.get(localName);
|
||||
if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) {
|
||||
_assert(path.node.operator === "=", "Path was not simplified");
|
||||
const assignment = path.node;
|
||||
if (importData) {
|
||||
assignment.left = buildImportReference(importData, left.node);
|
||||
assignment.right = sequenceExpression([assignment.right, buildImportThrow(localName)]);
|
||||
}
|
||||
path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, assignment, path.scope));
|
||||
requeueInParent(path);
|
||||
}
|
||||
} else {
|
||||
const ids = left.getOuterBindingIdentifiers();
|
||||
const programScopeIds = Object.keys(ids).filter(localName => scope.getBinding(localName) === path.scope.getBinding(localName));
|
||||
const id = programScopeIds.find(localName => imported.has(localName));
|
||||
if (id) {
|
||||
path.node.right = sequenceExpression([path.node.right, buildImportThrow(id)]);
|
||||
}
|
||||
const items = [];
|
||||
programScopeIds.forEach(localName => {
|
||||
const exportedNames = exported.get(localName) || [];
|
||||
if (exportedNames.length > 0) {
|
||||
items.push(buildBindingExportAssignmentExpression(this.metadata, exportedNames, identifier(localName), path.scope));
|
||||
}
|
||||
});
|
||||
if (items.length > 0) {
|
||||
let node = sequenceExpression(items);
|
||||
if (path.parentPath.isExpressionStatement()) {
|
||||
node = expressionStatement(node);
|
||||
node._blockHoist = path.parentPath.node._blockHoist;
|
||||
}
|
||||
const statement = path.insertAfter(node)[0];
|
||||
requeueInParent(statement);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ForOfStatement|ForInStatement"(path) {
|
||||
const {
|
||||
scope,
|
||||
node
|
||||
} = path;
|
||||
const {
|
||||
left
|
||||
} = node;
|
||||
const {
|
||||
exported,
|
||||
imported,
|
||||
scope: programScope
|
||||
} = this;
|
||||
if (!isVariableDeclaration(left)) {
|
||||
let didTransformExport = false,
|
||||
importConstViolationName;
|
||||
const loopBodyScope = path.get("body").scope;
|
||||
for (const name of Object.keys(getOuterBindingIdentifiers(left))) {
|
||||
if (programScope.getBinding(name) === scope.getBinding(name)) {
|
||||
if (exported.has(name)) {
|
||||
didTransformExport = true;
|
||||
if (loopBodyScope.hasOwnBinding(name)) {
|
||||
loopBodyScope.rename(name);
|
||||
}
|
||||
}
|
||||
if (imported.has(name) && !importConstViolationName) {
|
||||
importConstViolationName = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!didTransformExport && !importConstViolationName) {
|
||||
return;
|
||||
}
|
||||
path.ensureBlock();
|
||||
const bodyPath = path.get("body");
|
||||
const newLoopId = scope.generateUidIdentifierBasedOnNode(left);
|
||||
path.get("left").replaceWith(variableDeclaration("let", [variableDeclarator(cloneNode(newLoopId))]));
|
||||
scope.registerDeclaration(path.get("left"));
|
||||
if (didTransformExport) {
|
||||
bodyPath.unshiftContainer("body", expressionStatement(assignmentExpression("=", left, newLoopId)));
|
||||
}
|
||||
if (importConstViolationName) {
|
||||
bodyPath.unshiftContainer("body", expressionStatement(buildImportThrow(importConstViolationName)));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=rewrite-live-references.js.map
|
1
node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
24
node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
generated
vendored
Normal file
24
node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = rewriteThis;
|
||||
var _helperEnvironmentVisitor = require("@babel/helper-environment-visitor");
|
||||
var _core = require("@babel/core");
|
||||
const {
|
||||
numericLiteral,
|
||||
unaryExpression
|
||||
} = _core.types;
|
||||
const rewriteThisVisitor = _core.traverse.visitors.merge([_helperEnvironmentVisitor.default, {
|
||||
ThisExpression(path) {
|
||||
path.replaceWith(unaryExpression("void", numericLiteral(0), true));
|
||||
}
|
||||
}]);
|
||||
function rewriteThis(programPath) {
|
||||
(0, _core.traverse)(programPath.node, Object.assign({}, rewriteThisVisitor, {
|
||||
noScope: true
|
||||
}));
|
||||
}
|
||||
|
||||
//# sourceMappingURL=rewrite-this.js.map
|
1
node_modules/@babel/helper-module-transforms/lib/rewrite-this.js.map
generated
vendored
Normal file
1
node_modules/@babel/helper-module-transforms/lib/rewrite-this.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_helperEnvironmentVisitor","require","_core","numericLiteral","unaryExpression","t","rewriteThisVisitor","traverse","visitors","merge","environmentVisitor","ThisExpression","path","replaceWith","rewriteThis","programPath","node","Object","assign","noScope"],"sources":["../src/rewrite-this.ts"],"sourcesContent":["import environmentVisitor from \"@babel/helper-environment-visitor\";\nimport { traverse, types as t } from \"@babel/core\";\nconst { numericLiteral, unaryExpression } = t;\n\nimport type { NodePath, Visitor } from \"@babel/traverse\";\n\n/**\n * A visitor to walk the tree, rewriting all `this` references in the top-level scope to be\n * `void 0` (undefined).\n */\nconst rewriteThisVisitor: Visitor = traverse.visitors.merge([\n environmentVisitor,\n {\n ThisExpression(path) {\n path.replaceWith(unaryExpression(\"void\", numericLiteral(0), true));\n },\n },\n]);\n\nexport default function rewriteThis(programPath: NodePath) {\n // Rewrite \"this\" to be \"undefined\".\n traverse(programPath.node, { ...rewriteThisVisitor, noScope: true });\n}\n"],"mappings":";;;;;;AAAA,IAAAA,yBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,MAAM;EAAEE,cAAc;EAAEC;AAAgB,CAAC,GAAGC,WAAC;AAQ7C,MAAMC,kBAA2B,GAAGC,cAAQ,CAACC,QAAQ,CAACC,KAAK,CAAC,CAC1DC,iCAAkB,EAClB;EACEC,cAAcA,CAACC,IAAI,EAAE;IACnBA,IAAI,CAACC,WAAW,CAACT,eAAe,CAAC,MAAM,EAAED,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;EACpE;AACF,CAAC,CACF,CAAC;AAEa,SAASW,WAAWA,CAACC,WAAqB,EAAE;EAEzD,IAAAR,cAAQ,EAACQ,WAAW,CAACC,IAAI,EAAAC,MAAA,CAAAC,MAAA,KAAOZ,kBAAkB;IAAEa,OAAO,EAAE;EAAI,EAAE,CAAC;AACtE"}
|
71
node_modules/@babel/helper-module-transforms/package.json
generated
vendored
Normal file
71
node_modules/@babel/helper-module-transforms/package.json
generated
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
"_from": "@babel/helper-module-transforms@^7.22.9",
|
||||
"_id": "@babel/helper-module-transforms@7.22.9",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==",
|
||||
"_location": "/@babel/helper-module-transforms",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@babel/helper-module-transforms@^7.22.9",
|
||||
"name": "@babel/helper-module-transforms",
|
||||
"escapedName": "@babel%2fhelper-module-transforms",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "^7.22.9",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^7.22.9"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/core",
|
||||
"/@babel/plugin-transform-modules-amd",
|
||||
"/@babel/plugin-transform-modules-commonjs",
|
||||
"/@babel/plugin-transform-modules-systemjs",
|
||||
"/@babel/plugin-transform-modules-umd"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz",
|
||||
"_shasum": "92dfcb1fbbb2bc62529024f72d942a8c97142129",
|
||||
"_spec": "@babel/helper-module-transforms@^7.22.9",
|
||||
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\@babel\\core",
|
||||
"author": {
|
||||
"name": "The Babel Team",
|
||||
"url": "https://babel.dev/team"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@babel/helper-environment-visitor": "^7.22.5",
|
||||
"@babel/helper-module-imports": "^7.22.5",
|
||||
"@babel/helper-simple-access": "^7.22.5",
|
||||
"@babel/helper-split-export-declaration": "^7.22.6",
|
||||
"@babel/helper-validator-identifier": "^7.22.5"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Babel helper functions for implementing ES6 module transformations",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.9",
|
||||
"@babel/traverse": "^7.22.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-helper-module-transforms",
|
||||
"license": "MIT",
|
||||
"main": "./lib/index.js",
|
||||
"name": "@babel/helper-module-transforms",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-module-transforms"
|
||||
},
|
||||
"type": "commonjs",
|
||||
"version": "7.22.9"
|
||||
}
|
Reference in New Issue
Block a user