Fix async lifecycle ordering, add _spa_init boot phase, update to jqhtml _load_only/_load_render_only flags
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
208
node_modules/@babel/helper-define-polyfill-provider/esm/index.browser.mjs
generated
vendored
208
node_modules/@babel/helper-define-polyfill-provider/esm/index.browser.mjs
generated
vendored
@@ -60,6 +60,10 @@ function resolveKey(path, computed = false) {
|
||||
if (typeof value === "string") return value;
|
||||
}
|
||||
}
|
||||
function resolveInstance(obj) {
|
||||
const source = resolveSource(obj);
|
||||
return source.placement === "prototype" ? source.id : null;
|
||||
}
|
||||
function resolveSource(obj) {
|
||||
if (obj.isMemberExpression() && obj.get("property").isIdentifier({
|
||||
name: "prototype"
|
||||
@@ -85,22 +89,23 @@ function resolveSource(obj) {
|
||||
}
|
||||
const path = resolve$1(obj);
|
||||
switch (path == null ? void 0 : path.type) {
|
||||
case "NullLiteral":
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
case "RegExpLiteral":
|
||||
return {
|
||||
id: "RegExp",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "FunctionExpression":
|
||||
return {
|
||||
id: "Function",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "StringLiteral":
|
||||
case "TemplateLiteral":
|
||||
return {
|
||||
id: "String",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "NumberLiteral":
|
||||
case "NumericLiteral":
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
@@ -110,6 +115,11 @@ function resolveSource(obj) {
|
||||
id: "Boolean",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "BigIntLiteral":
|
||||
return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "ObjectExpression":
|
||||
return {
|
||||
id: "Object",
|
||||
@@ -120,6 +130,192 @@ function resolveSource(obj) {
|
||||
id: "Array",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "FunctionExpression":
|
||||
case "ArrowFunctionExpression":
|
||||
case "ClassExpression":
|
||||
return {
|
||||
id: "Function",
|
||||
placement: "prototype"
|
||||
};
|
||||
// new Constructor() -> resolve the constructor name
|
||||
case "NewExpression":
|
||||
{
|
||||
const calleeId = resolveId(path.get("callee"));
|
||||
if (calleeId) return {
|
||||
id: calleeId,
|
||||
placement: "prototype"
|
||||
};
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// Unary expressions -> result type depends on operator
|
||||
case "UnaryExpression":
|
||||
{
|
||||
const {
|
||||
operator
|
||||
} = path.node;
|
||||
if (operator === "typeof") return {
|
||||
id: "String",
|
||||
placement: "prototype"
|
||||
};
|
||||
if (operator === "!" || operator === "delete") return {
|
||||
id: "Boolean",
|
||||
placement: "prototype"
|
||||
};
|
||||
// Unary + always produces Number (throws on BigInt)
|
||||
if (operator === "+") return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
// Unary - and ~ can produce Number or BigInt depending on operand
|
||||
if (operator === "-" || operator === "~") {
|
||||
const arg = resolveInstance(path.get("argument"));
|
||||
if (arg === "BigInt") return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
if (arg !== null) return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// ++i, i++ produce Number or BigInt depending on the argument
|
||||
case "UpdateExpression":
|
||||
{
|
||||
const arg = resolveInstance(path.get("argument"));
|
||||
if (arg === "BigInt") return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
if (arg !== null) return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// Binary expressions -> result type depends on operator
|
||||
case "BinaryExpression":
|
||||
{
|
||||
const {
|
||||
operator
|
||||
} = path.node;
|
||||
if (operator === "==" || operator === "!=" || operator === "===" || operator === "!==" || operator === "<" || operator === ">" || operator === "<=" || operator === ">=" || operator === "instanceof" || operator === "in") {
|
||||
return {
|
||||
id: "Boolean",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
// >>> always produces Number
|
||||
if (operator === ">>>") {
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
// Arithmetic and bitwise operators can produce Number or BigInt
|
||||
if (operator === "-" || operator === "*" || operator === "/" || operator === "%" || operator === "**" || operator === "&" || operator === "|" || operator === "^" || operator === "<<" || operator === ">>") {
|
||||
const left = resolveInstance(path.get("left"));
|
||||
const right = resolveInstance(path.get("right"));
|
||||
if (left === "BigInt" && right === "BigInt") {
|
||||
return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
if (left !== null && right !== null) {
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// + depends on operand types: string wins, otherwise number or bigint
|
||||
if (operator === "+") {
|
||||
const left = resolveInstance(path.get("left"));
|
||||
const right = resolveInstance(path.get("right"));
|
||||
if (left === "String" || right === "String") {
|
||||
return {
|
||||
id: "String",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
if (left === "Number" && right === "Number") {
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
if (left === "BigInt" && right === "BigInt") {
|
||||
return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// (a, b, c) -> the result is the last expression
|
||||
case "SequenceExpression":
|
||||
{
|
||||
const expressions = path.get("expressions");
|
||||
return resolveSource(expressions[expressions.length - 1]);
|
||||
}
|
||||
// a = b -> the result is the right side
|
||||
case "AssignmentExpression":
|
||||
{
|
||||
if (path.node.operator === "=") {
|
||||
return resolveSource(path.get("right"));
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// a ? b : c -> if both branches resolve to the same type, use it
|
||||
case "ConditionalExpression":
|
||||
{
|
||||
const consequent = resolveSource(path.get("consequent"));
|
||||
const alternate = resolveSource(path.get("alternate"));
|
||||
if (consequent.id && consequent.id === alternate.id) {
|
||||
return consequent;
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// (expr) -> unwrap parenthesized expressions
|
||||
case "ParenthesizedExpression":
|
||||
return resolveSource(path.get("expression"));
|
||||
// TypeScript / Flow type wrappers -> unwrap to the inner expression
|
||||
case "TSAsExpression":
|
||||
case "TSSatisfiesExpression":
|
||||
case "TSNonNullExpression":
|
||||
case "TSInstantiationExpression":
|
||||
case "TSTypeAssertion":
|
||||
case "TypeCastExpression":
|
||||
return resolveSource(path.get("expression"));
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
|
||||
2
node_modules/@babel/helper-define-polyfill-provider/esm/index.browser.mjs.map
generated
vendored
2
node_modules/@babel/helper-define-polyfill-provider/esm/index.browser.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
208
node_modules/@babel/helper-define-polyfill-provider/esm/index.node.mjs
generated
vendored
208
node_modules/@babel/helper-define-polyfill-provider/esm/index.node.mjs
generated
vendored
@@ -64,6 +64,10 @@ function resolveKey(path, computed = false) {
|
||||
if (typeof value === "string") return value;
|
||||
}
|
||||
}
|
||||
function resolveInstance(obj) {
|
||||
const source = resolveSource(obj);
|
||||
return source.placement === "prototype" ? source.id : null;
|
||||
}
|
||||
function resolveSource(obj) {
|
||||
if (obj.isMemberExpression() && obj.get("property").isIdentifier({
|
||||
name: "prototype"
|
||||
@@ -89,22 +93,23 @@ function resolveSource(obj) {
|
||||
}
|
||||
const path = resolve$1(obj);
|
||||
switch (path == null ? void 0 : path.type) {
|
||||
case "NullLiteral":
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
case "RegExpLiteral":
|
||||
return {
|
||||
id: "RegExp",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "FunctionExpression":
|
||||
return {
|
||||
id: "Function",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "StringLiteral":
|
||||
case "TemplateLiteral":
|
||||
return {
|
||||
id: "String",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "NumberLiteral":
|
||||
case "NumericLiteral":
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
@@ -114,6 +119,11 @@ function resolveSource(obj) {
|
||||
id: "Boolean",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "BigIntLiteral":
|
||||
return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "ObjectExpression":
|
||||
return {
|
||||
id: "Object",
|
||||
@@ -124,6 +134,192 @@ function resolveSource(obj) {
|
||||
id: "Array",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "FunctionExpression":
|
||||
case "ArrowFunctionExpression":
|
||||
case "ClassExpression":
|
||||
return {
|
||||
id: "Function",
|
||||
placement: "prototype"
|
||||
};
|
||||
// new Constructor() -> resolve the constructor name
|
||||
case "NewExpression":
|
||||
{
|
||||
const calleeId = resolveId(path.get("callee"));
|
||||
if (calleeId) return {
|
||||
id: calleeId,
|
||||
placement: "prototype"
|
||||
};
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// Unary expressions -> result type depends on operator
|
||||
case "UnaryExpression":
|
||||
{
|
||||
const {
|
||||
operator
|
||||
} = path.node;
|
||||
if (operator === "typeof") return {
|
||||
id: "String",
|
||||
placement: "prototype"
|
||||
};
|
||||
if (operator === "!" || operator === "delete") return {
|
||||
id: "Boolean",
|
||||
placement: "prototype"
|
||||
};
|
||||
// Unary + always produces Number (throws on BigInt)
|
||||
if (operator === "+") return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
// Unary - and ~ can produce Number or BigInt depending on operand
|
||||
if (operator === "-" || operator === "~") {
|
||||
const arg = resolveInstance(path.get("argument"));
|
||||
if (arg === "BigInt") return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
if (arg !== null) return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// ++i, i++ produce Number or BigInt depending on the argument
|
||||
case "UpdateExpression":
|
||||
{
|
||||
const arg = resolveInstance(path.get("argument"));
|
||||
if (arg === "BigInt") return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
if (arg !== null) return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// Binary expressions -> result type depends on operator
|
||||
case "BinaryExpression":
|
||||
{
|
||||
const {
|
||||
operator
|
||||
} = path.node;
|
||||
if (operator === "==" || operator === "!=" || operator === "===" || operator === "!==" || operator === "<" || operator === ">" || operator === "<=" || operator === ">=" || operator === "instanceof" || operator === "in") {
|
||||
return {
|
||||
id: "Boolean",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
// >>> always produces Number
|
||||
if (operator === ">>>") {
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
// Arithmetic and bitwise operators can produce Number or BigInt
|
||||
if (operator === "-" || operator === "*" || operator === "/" || operator === "%" || operator === "**" || operator === "&" || operator === "|" || operator === "^" || operator === "<<" || operator === ">>") {
|
||||
const left = resolveInstance(path.get("left"));
|
||||
const right = resolveInstance(path.get("right"));
|
||||
if (left === "BigInt" && right === "BigInt") {
|
||||
return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
if (left !== null && right !== null) {
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// + depends on operand types: string wins, otherwise number or bigint
|
||||
if (operator === "+") {
|
||||
const left = resolveInstance(path.get("left"));
|
||||
const right = resolveInstance(path.get("right"));
|
||||
if (left === "String" || right === "String") {
|
||||
return {
|
||||
id: "String",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
if (left === "Number" && right === "Number") {
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
if (left === "BigInt" && right === "BigInt") {
|
||||
return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// (a, b, c) -> the result is the last expression
|
||||
case "SequenceExpression":
|
||||
{
|
||||
const expressions = path.get("expressions");
|
||||
return resolveSource(expressions[expressions.length - 1]);
|
||||
}
|
||||
// a = b -> the result is the right side
|
||||
case "AssignmentExpression":
|
||||
{
|
||||
if (path.node.operator === "=") {
|
||||
return resolveSource(path.get("right"));
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// a ? b : c -> if both branches resolve to the same type, use it
|
||||
case "ConditionalExpression":
|
||||
{
|
||||
const consequent = resolveSource(path.get("consequent"));
|
||||
const alternate = resolveSource(path.get("alternate"));
|
||||
if (consequent.id && consequent.id === alternate.id) {
|
||||
return consequent;
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// (expr) -> unwrap parenthesized expressions
|
||||
case "ParenthesizedExpression":
|
||||
return resolveSource(path.get("expression"));
|
||||
// TypeScript / Flow type wrappers -> unwrap to the inner expression
|
||||
case "TSAsExpression":
|
||||
case "TSSatisfiesExpression":
|
||||
case "TSNonNullExpression":
|
||||
case "TSInstantiationExpression":
|
||||
case "TSTypeAssertion":
|
||||
case "TypeCastExpression":
|
||||
return resolveSource(path.get("expression"));
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
|
||||
2
node_modules/@babel/helper-define-polyfill-provider/esm/index.node.mjs.map
generated
vendored
2
node_modules/@babel/helper-define-polyfill-provider/esm/index.node.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
209
node_modules/@babel/helper-define-polyfill-provider/lib/utils.js
generated
vendored
209
node_modules/@babel/helper-define-polyfill-provider/lib/utils.js
generated
vendored
@@ -6,6 +6,7 @@ exports.getImportSource = getImportSource;
|
||||
exports.getRequireSource = getRequireSource;
|
||||
exports.has = has;
|
||||
exports.intersection = intersection;
|
||||
exports.resolveInstance = resolveInstance;
|
||||
exports.resolveKey = resolveKey;
|
||||
exports.resolveSource = resolveSource;
|
||||
var _babel = _interopRequireWildcard(require("@babel/core"));
|
||||
@@ -68,6 +69,10 @@ function resolveKey(path, computed = false) {
|
||||
if (typeof value === "string") return value;
|
||||
}
|
||||
}
|
||||
function resolveInstance(obj) {
|
||||
const source = resolveSource(obj);
|
||||
return source.placement === "prototype" ? source.id : null;
|
||||
}
|
||||
function resolveSource(obj) {
|
||||
if (obj.isMemberExpression() && obj.get("property").isIdentifier({
|
||||
name: "prototype"
|
||||
@@ -93,22 +98,23 @@ function resolveSource(obj) {
|
||||
}
|
||||
const path = resolve(obj);
|
||||
switch (path == null ? void 0 : path.type) {
|
||||
case "NullLiteral":
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
case "RegExpLiteral":
|
||||
return {
|
||||
id: "RegExp",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "FunctionExpression":
|
||||
return {
|
||||
id: "Function",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "StringLiteral":
|
||||
case "TemplateLiteral":
|
||||
return {
|
||||
id: "String",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "NumberLiteral":
|
||||
case "NumericLiteral":
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
@@ -118,6 +124,11 @@ function resolveSource(obj) {
|
||||
id: "Boolean",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "BigIntLiteral":
|
||||
return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "ObjectExpression":
|
||||
return {
|
||||
id: "Object",
|
||||
@@ -128,6 +139,192 @@ function resolveSource(obj) {
|
||||
id: "Array",
|
||||
placement: "prototype"
|
||||
};
|
||||
case "FunctionExpression":
|
||||
case "ArrowFunctionExpression":
|
||||
case "ClassExpression":
|
||||
return {
|
||||
id: "Function",
|
||||
placement: "prototype"
|
||||
};
|
||||
// new Constructor() -> resolve the constructor name
|
||||
case "NewExpression":
|
||||
{
|
||||
const calleeId = resolveId(path.get("callee"));
|
||||
if (calleeId) return {
|
||||
id: calleeId,
|
||||
placement: "prototype"
|
||||
};
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// Unary expressions -> result type depends on operator
|
||||
case "UnaryExpression":
|
||||
{
|
||||
const {
|
||||
operator
|
||||
} = path.node;
|
||||
if (operator === "typeof") return {
|
||||
id: "String",
|
||||
placement: "prototype"
|
||||
};
|
||||
if (operator === "!" || operator === "delete") return {
|
||||
id: "Boolean",
|
||||
placement: "prototype"
|
||||
};
|
||||
// Unary + always produces Number (throws on BigInt)
|
||||
if (operator === "+") return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
// Unary - and ~ can produce Number or BigInt depending on operand
|
||||
if (operator === "-" || operator === "~") {
|
||||
const arg = resolveInstance(path.get("argument"));
|
||||
if (arg === "BigInt") return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
if (arg !== null) return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// ++i, i++ produce Number or BigInt depending on the argument
|
||||
case "UpdateExpression":
|
||||
{
|
||||
const arg = resolveInstance(path.get("argument"));
|
||||
if (arg === "BigInt") return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
if (arg !== null) return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// Binary expressions -> result type depends on operator
|
||||
case "BinaryExpression":
|
||||
{
|
||||
const {
|
||||
operator
|
||||
} = path.node;
|
||||
if (operator === "==" || operator === "!=" || operator === "===" || operator === "!==" || operator === "<" || operator === ">" || operator === "<=" || operator === ">=" || operator === "instanceof" || operator === "in") {
|
||||
return {
|
||||
id: "Boolean",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
// >>> always produces Number
|
||||
if (operator === ">>>") {
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
// Arithmetic and bitwise operators can produce Number or BigInt
|
||||
if (operator === "-" || operator === "*" || operator === "/" || operator === "%" || operator === "**" || operator === "&" || operator === "|" || operator === "^" || operator === "<<" || operator === ">>") {
|
||||
const left = resolveInstance(path.get("left"));
|
||||
const right = resolveInstance(path.get("right"));
|
||||
if (left === "BigInt" && right === "BigInt") {
|
||||
return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
if (left !== null && right !== null) {
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// + depends on operand types: string wins, otherwise number or bigint
|
||||
if (operator === "+") {
|
||||
const left = resolveInstance(path.get("left"));
|
||||
const right = resolveInstance(path.get("right"));
|
||||
if (left === "String" || right === "String") {
|
||||
return {
|
||||
id: "String",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
if (left === "Number" && right === "Number") {
|
||||
return {
|
||||
id: "Number",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
if (left === "BigInt" && right === "BigInt") {
|
||||
return {
|
||||
id: "BigInt",
|
||||
placement: "prototype"
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// (a, b, c) -> the result is the last expression
|
||||
case "SequenceExpression":
|
||||
{
|
||||
const expressions = path.get("expressions");
|
||||
return resolveSource(expressions[expressions.length - 1]);
|
||||
}
|
||||
// a = b -> the result is the right side
|
||||
case "AssignmentExpression":
|
||||
{
|
||||
if (path.node.operator === "=") {
|
||||
return resolveSource(path.get("right"));
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// a ? b : c -> if both branches resolve to the same type, use it
|
||||
case "ConditionalExpression":
|
||||
{
|
||||
const consequent = resolveSource(path.get("consequent"));
|
||||
const alternate = resolveSource(path.get("alternate"));
|
||||
if (consequent.id && consequent.id === alternate.id) {
|
||||
return consequent;
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
placement: null
|
||||
};
|
||||
}
|
||||
// (expr) -> unwrap parenthesized expressions
|
||||
case "ParenthesizedExpression":
|
||||
return resolveSource(path.get("expression"));
|
||||
// TypeScript / Flow type wrappers -> unwrap to the inner expression
|
||||
case "TSAsExpression":
|
||||
case "TSSatisfiesExpression":
|
||||
case "TSNonNullExpression":
|
||||
case "TSInstantiationExpression":
|
||||
case "TSTypeAssertion":
|
||||
case "TypeCastExpression":
|
||||
return resolveSource(path.get("expression"));
|
||||
}
|
||||
return {
|
||||
id: null,
|
||||
|
||||
4
node_modules/@babel/helper-define-polyfill-provider/package.json
generated
vendored
4
node_modules/@babel/helper-define-polyfill-provider/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helper-define-polyfill-provider",
|
||||
"version": "0.6.6",
|
||||
"version": "0.6.7",
|
||||
"description": "Babel helper to create your own polyfill provider",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -55,5 +55,5 @@
|
||||
"webpack": "^4.47.0",
|
||||
"webpack-cli": "^3.3.12"
|
||||
},
|
||||
"gitHead": "9b040e303af7d703a57f16d46538d1b0d5462237"
|
||||
"gitHead": "35d742c19e250d8908b0fb77340191f268706161"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "babel-plugin-polyfill-corejs3",
|
||||
"version": "0.14.0",
|
||||
"version": "0.14.1",
|
||||
"description": "A Babel plugin to inject imports to core-js@3 polyfills",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -26,7 +26,7 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-define-polyfill-provider": "^0.6.6",
|
||||
"@babel/helper-define-polyfill-provider": "^0.6.7",
|
||||
"core-js-compat": "^3.48.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -45,5 +45,5 @@
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
|
||||
},
|
||||
"gitHead": "9b040e303af7d703a57f16d46538d1b0d5462237"
|
||||
"gitHead": "35d742c19e250d8908b0fb77340191f268706161"
|
||||
}
|
||||
Reference in New Issue
Block a user