Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
26
my-app/node_modules/@babel/helper-define-polyfill-provider/lib/visitors/entry.js
generated
vendored
Executable file
26
my-app/node_modules/@babel/helper-define-polyfill-provider/lib/visitors/entry.js
generated
vendored
Executable file
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
var _utils = require("../utils");
|
||||
var _default = callProvider => ({
|
||||
ImportDeclaration(path) {
|
||||
const source = (0, _utils.getImportSource)(path);
|
||||
if (!source) return;
|
||||
callProvider({
|
||||
kind: "import",
|
||||
source
|
||||
}, path);
|
||||
},
|
||||
Program(path) {
|
||||
path.get("body").forEach(bodyPath => {
|
||||
const source = (0, _utils.getRequireSource)(bodyPath);
|
||||
if (!source) return;
|
||||
callProvider({
|
||||
kind: "import",
|
||||
source
|
||||
}, bodyPath);
|
||||
});
|
||||
}
|
||||
});
|
||||
exports.default = _default;
|
9
my-app/node_modules/@babel/helper-define-polyfill-provider/lib/visitors/index.js
generated
vendored
Executable file
9
my-app/node_modules/@babel/helper-define-polyfill-provider/lib/visitors/index.js
generated
vendored
Executable file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.usage = exports.entry = void 0;
|
||||
var _usage = _interopRequireDefault(require("./usage"));
|
||||
exports.usage = _usage.default;
|
||||
var _entry = _interopRequireDefault(require("./entry"));
|
||||
exports.entry = _entry.default;
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
91
my-app/node_modules/@babel/helper-define-polyfill-provider/lib/visitors/usage.js
generated
vendored
Executable file
91
my-app/node_modules/@babel/helper-define-polyfill-provider/lib/visitors/usage.js
generated
vendored
Executable file
|
@ -0,0 +1,91 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
var _utils = require("../utils");
|
||||
var _default = callProvider => {
|
||||
function property(object, key, placement, path) {
|
||||
return callProvider({
|
||||
kind: "property",
|
||||
object,
|
||||
key,
|
||||
placement
|
||||
}, path);
|
||||
}
|
||||
return {
|
||||
// Symbol(), new Promise
|
||||
ReferencedIdentifier(path) {
|
||||
const {
|
||||
node: {
|
||||
name
|
||||
},
|
||||
scope
|
||||
} = path;
|
||||
if (scope.getBindingIdentifier(name)) return;
|
||||
callProvider({
|
||||
kind: "global",
|
||||
name
|
||||
}, path);
|
||||
},
|
||||
MemberExpression(path) {
|
||||
const key = (0, _utils.resolveKey)(path.get("property"), path.node.computed);
|
||||
if (!key || key === "prototype") return;
|
||||
const object = path.get("object");
|
||||
if (object.isIdentifier()) {
|
||||
const binding = object.scope.getBinding(object.node.name);
|
||||
if (binding && binding.path.isImportNamespaceSpecifier()) return;
|
||||
}
|
||||
const source = (0, _utils.resolveSource)(object);
|
||||
return property(source.id, key, source.placement, path);
|
||||
},
|
||||
ObjectPattern(path) {
|
||||
const {
|
||||
parentPath,
|
||||
parent
|
||||
} = path;
|
||||
let obj;
|
||||
|
||||
// const { keys, values } = Object
|
||||
if (parentPath.isVariableDeclarator()) {
|
||||
obj = parentPath.get("init");
|
||||
// ({ keys, values } = Object)
|
||||
} else if (parentPath.isAssignmentExpression()) {
|
||||
obj = parentPath.get("right");
|
||||
// !function ({ keys, values }) {...} (Object)
|
||||
// resolution does not work after properties transform :-(
|
||||
} else if (parentPath.isFunction()) {
|
||||
const grand = parentPath.parentPath;
|
||||
if (grand.isCallExpression() || grand.isNewExpression()) {
|
||||
if (grand.node.callee === parent) {
|
||||
obj = grand.get("arguments")[path.key];
|
||||
}
|
||||
}
|
||||
}
|
||||
let id = null;
|
||||
let placement = null;
|
||||
if (obj) ({
|
||||
id,
|
||||
placement
|
||||
} = (0, _utils.resolveSource)(obj));
|
||||
for (const prop of path.get("properties")) {
|
||||
if (prop.isObjectProperty()) {
|
||||
const key = (0, _utils.resolveKey)(prop.get("key"));
|
||||
if (key) property(id, key, placement, prop);
|
||||
}
|
||||
}
|
||||
},
|
||||
BinaryExpression(path) {
|
||||
if (path.node.operator !== "in") return;
|
||||
const source = (0, _utils.resolveSource)(path.get("right"));
|
||||
const key = (0, _utils.resolveKey)(path.get("left"), true);
|
||||
if (!key) return;
|
||||
callProvider({
|
||||
kind: "in",
|
||||
object: source.id,
|
||||
key,
|
||||
placement: source.placement
|
||||
}, path);
|
||||
}
|
||||
};
|
||||
};
|
||||
exports.default = _default;
|
Loading…
Add table
Add a link
Reference in a new issue