diff --git a/compiled/eslint-plugin-react-hooks/index.js b/compiled/eslint-plugin-react-hooks/index.js index 376b5358cb..36e2e758d2 100644 --- a/compiled/eslint-plugin-react-hooks/index.js +++ b/compiled/eslint-plugin-react-hooks/index.js @@ -17681,8 +17681,8 @@ class CompilerDiagnostic { get category() { return this.options.category; } - withDetail(detail) { - this.options.details.push(detail); + withDetails(...details) { + this.options.details.push(...details); return this; } primaryLocation() { @@ -17692,6 +17692,7 @@ class CompilerDiagnostic { : null; } printErrorMessage(source, options) { + var _a, _b; const buffer = [ printErrorSummary(this.category, this.reason), '\n\n', @@ -17706,10 +17707,10 @@ class CompilerDiagnostic { } let codeFrame; try { - codeFrame = printCodeFrame(source, loc, detail.message); + codeFrame = printCodeFrame(source, loc, (_a = detail.message) !== null && _a !== void 0 ? _a : ''); } catch (e) { - codeFrame = detail.message; + codeFrame = (_b = detail.message) !== null && _b !== void 0 ? _b : ''; } buffer.push('\n\n'); if (loc.filename != null) { @@ -17812,7 +17813,11 @@ class CompilerError extends Error { static invariant(condition, options) { if (!condition) { const errors = new CompilerError(); - errors.pushErrorDetail(new CompilerErrorDetail(Object.assign(Object.assign({}, options), { category: ErrorCategory.Invariant }))); + errors.pushDiagnostic(CompilerDiagnostic.create({ + reason: options.reason, + description: options.description, + category: ErrorCategory.Invariant, + }).withDetails(...options.details)); throw errors; } } @@ -18303,11 +18308,25 @@ function insertAdditionalFunctionDeclaration(fnPath, compiled, programContext, g const compiledParams = fnPath.node.params; CompilerError.invariant(originalFnName != null && compiled.id != null, { reason: 'Expected function declarations that are referenced elsewhere to have a named identifier', - loc: (_a = fnPath.node.loc) !== null && _a !== void 0 ? _a : null, + description: null, + details: [ + { + kind: 'error', + loc: (_a = fnPath.node.loc) !== null && _a !== void 0 ? _a : null, + message: null, + }, + ], }); CompilerError.invariant(originalFnParams.length === compiledParams.length, { reason: 'Expected React Compiler optimized function declarations to have the same number of parameters as source', - loc: (_b = fnPath.node.loc) !== null && _b !== void 0 ? _b : null, + description: null, + details: [ + { + kind: 'error', + loc: (_b = fnPath.node.loc) !== null && _b !== void 0 ? _b : null, + message: null, + }, + ], }); const gatingCondition = libExports$1.identifier(programContext.newUid(`${gatingFunctionIdentifierName}_result`)); const unoptimizedFnName = libExports$1.identifier(programContext.newUid(`${originalFnName.name}_unoptimized`)); @@ -18342,7 +18361,13 @@ function insertGatedFunctionDeclaration(fnPath, compiled, programContext, gating CompilerError.invariant(compiled.type === 'FunctionDeclaration', { reason: 'Expected compiled node type to match input type', description: `Got ${compiled.type} but expected FunctionDeclaration`, - loc: (_a = fnPath.node.loc) !== null && _a !== void 0 ? _a : null, + details: [ + { + kind: 'error', + loc: (_a = fnPath.node.loc) !== null && _a !== void 0 ? _a : null, + message: null, + }, + ], }); insertAdditionalFunctionDeclaration(fnPath, compiled, programContext, gatingImportedName); } @@ -18392,7 +18417,13 @@ function makeTypeId(id) { CompilerError.invariant(id >= 0 && Number.isInteger(id), { reason: 'Expected instruction id to be a non-negative integer', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return id; @@ -18593,8 +18624,14 @@ function makeIdentifierName(name) { else { CompilerError.invariant(libExports$1.isValidIdentifier(name), { reason: `Expected a valid identifier name`, - loc: GeneratedSource, description: `\`${name}\` is not a valid JavaScript identifier`, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], suggestions: null, }); } @@ -18606,8 +18643,14 @@ function makeIdentifierName(name) { function promoteTemporary(identifier) { CompilerError.invariant(identifier.name === null, { reason: `Expected a temporary (unnamed) identifier`, - loc: GeneratedSource, description: `Identifier already has a name, \`${identifier.name}\``, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], suggestions: null, }); identifier.name = { @@ -18621,8 +18664,14 @@ function isPromotedTemporary(name) { function promoteTemporaryJsxTag(identifier) { CompilerError.invariant(identifier.name === null, { reason: `Expected a temporary (unnamed) identifier`, - loc: GeneratedSource, description: `Identifier already has a name, \`${identifier.name}\``, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], suggestions: null, }); identifier.name = { @@ -18710,7 +18759,13 @@ function isMutableEffect(effect, location) { CompilerError.invariant(false, { reason: 'Unexpected unknown effect', description: null, - loc: location, + details: [ + { + kind: 'error', + loc: location, + message: null, + }, + ], suggestions: null, }); } @@ -18744,7 +18799,13 @@ function makeBlockId(id) { CompilerError.invariant(id >= 0 && Number.isInteger(id), { reason: 'Expected block id to be a non-negative integer', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return id; @@ -18753,7 +18814,13 @@ function makeScopeId(id) { CompilerError.invariant(id >= 0 && Number.isInteger(id), { reason: 'Expected block id to be a non-negative integer', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return id; @@ -18762,7 +18829,13 @@ function makeIdentifierId(id) { CompilerError.invariant(id >= 0 && Number.isInteger(id), { reason: 'Expected identifier id to be a non-negative integer', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return id; @@ -18771,7 +18844,13 @@ function makeDeclarationId(id) { CompilerError.invariant(id >= 0 && Number.isInteger(id), { reason: 'Expected declaration id to be a non-negative integer', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return id; @@ -18780,7 +18859,13 @@ function makeInstructionId(id) { CompilerError.invariant(id >= 0 && Number.isInteger(id), { reason: 'Expected instruction id to be a non-negative integer', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return id; @@ -19359,7 +19444,13 @@ function printInstructionValue(instrValue) { CompilerError.invariant(instrValue.subexprs.length === instrValue.quasis.length - 1, { reason: 'Bad assumption about quasi length.', description: null, - loc: instrValue.loc, + details: [ + { + kind: 'error', + loc: instrValue.loc, + message: null, + }, + ], suggestions: null, }); for (let i = 0; i < instrValue.subexprs.length; i++) { @@ -19544,8 +19635,15 @@ function printManualMemoDependency(val, nameOnly) { else { CompilerError.invariant(((_a = val.root.value.identifier.name) === null || _a === void 0 ? void 0 : _a.kind) === 'named', { reason: 'DepsValidation: expected named local variable in depslist', + description: null, suggestions: null, - loc: val.root.value.loc, + details: [ + { + kind: 'error', + loc: val.root.value.loc, + message: null, + }, + ], }); rootStr = nameOnly ? val.root.value.identifier.name.value @@ -20792,7 +20890,14 @@ class ScopeBlockTraversal { const top = __classPrivateFieldGet(this, _ScopeBlockTraversal_activeScopes, "f").at(-1); CompilerError.invariant(blockInfo.scope.id === top, { reason: 'Expected traversed block fallthrough to match top-most active scope', - loc: (_b = (_a = block.instructions[0]) === null || _a === void 0 ? void 0 : _a.loc) !== null && _b !== void 0 ? _b : block.terminal.id, + description: null, + details: [ + { + kind: 'error', + loc: (_b = (_a = block.instructions[0]) === null || _a === void 0 ? void 0 : _a.loc) !== null && _b !== void 0 ? _b : block.terminal.id, + message: null, + }, + ], }); __classPrivateFieldGet(this, _ScopeBlockTraversal_activeScopes, "f").pop(); } @@ -20801,7 +20906,14 @@ class ScopeBlockTraversal { CompilerError.invariant(!this.blockInfos.has(block.terminal.block) && !this.blockInfos.has(block.terminal.fallthrough), { reason: 'Expected unique scope blocks and fallthroughs', - loc: block.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: block.terminal.loc, + message: null, + }, + ], }); this.blockInfos.set(block.terminal.block, { kind: 'begin', @@ -20840,13 +20952,25 @@ function assertConsistentIdentifiers(fn) { CompilerError.invariant(instr.lvalue.identifier.name === null, { reason: `Expected all lvalues to be temporaries`, description: `Found named lvalue \`${instr.lvalue.identifier.name}\``, - loc: instr.lvalue.loc, + details: [ + { + kind: 'error', + loc: instr.lvalue.loc, + message: null, + }, + ], suggestions: null, }); CompilerError.invariant(!assignments.has(instr.lvalue.identifier.id), { reason: `Expected lvalues to be assigned exactly once`, description: `Found duplicate assignment of '${printPlace(instr.lvalue)}'`, - loc: instr.lvalue.loc, + details: [ + { + kind: 'error', + loc: instr.lvalue.loc, + message: null, + }, + ], suggestions: null, }); assignments.add(instr.lvalue.identifier.id); @@ -20871,7 +20995,13 @@ function validate(identifiers, identifier, loc = null) { CompilerError.invariant(identifier === previous, { reason: `Duplicate identifier object`, description: `Found duplicate identifier object for id ${identifier.id}`, - loc: loc !== null && loc !== void 0 ? loc : GeneratedSource, + details: [ + { + kind: 'error', + loc: loc !== null && loc !== void 0 ? loc : GeneratedSource, + message: null, + }, + ], suggestions: null, }); } @@ -20884,7 +21014,13 @@ function assertTerminalSuccessorsExist(fn) { CompilerError.invariant(fn.body.blocks.has(successor), { reason: `Terminal successor references unknown block`, description: `Block bb${successor} does not exist for terminal '${printTerminal(block.terminal)}'`, - loc: (_a = block.terminal.loc) !== null && _a !== void 0 ? _a : GeneratedSource, + details: [ + { + kind: 'error', + loc: (_a = block.terminal.loc) !== null && _a !== void 0 ? _a : GeneratedSource, + message: null, + }, + ], suggestions: null, }); return successor; @@ -20898,12 +21034,24 @@ function assertTerminalPredsExist(fn) { CompilerError.invariant(predBlock != null, { reason: 'Expected predecessor block to exist', description: `Block ${block.id} references non-existent ${pred}`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); CompilerError.invariant([...eachTerminalSuccessor(predBlock.terminal)].includes(block.id), { reason: 'Terminal successor does not reference correct predecessor', description: `Block bb${block.id} has bb${predBlock.id} as a predecessor, but bb${predBlock.id}'s successors do not include bb${block.id}`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); } } @@ -20955,7 +21103,13 @@ function recursivelyTraverseItems(items, getRange, context, enter, exit) { CompilerError.invariant(disjoint || nested, { reason: 'Invalid nesting in program blocks or scopes', description: `Items overlap but are not nested: ${maybeParentRange.start}:${maybeParentRange.end}(${currRange.start}:${currRange.end})`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); if (disjoint) { exit(maybeParent, context); @@ -21026,7 +21180,13 @@ function validateMutableRange(place, range, description) { CompilerError.invariant((range.start === 0 && range.end === 0) || range.end > range.start, { reason: `Invalid mutable range: [${range.start}:${range.end}]`, description: `${printPlace(place)} in ${description}`, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: null, + }, + ], }); } @@ -21328,7 +21488,13 @@ class HIRBuilder { last.breakBlock === breakBlock, { reason: 'Mismatched label', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return value; @@ -21347,7 +21513,13 @@ class HIRBuilder { last.breakBlock === breakBlock, { reason: 'Mismatched label', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return value; @@ -21368,7 +21540,13 @@ class HIRBuilder { last.breakBlock === breakBlock, { reason: 'Mismatched loops', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return value; @@ -21385,7 +21563,13 @@ class HIRBuilder { CompilerError.invariant(false, { reason: 'Expected a loop or switch to be in scope', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); } @@ -21401,7 +21585,13 @@ class HIRBuilder { CompilerError.invariant(false, { reason: 'Continue may only refer to a labeled loop', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); } @@ -21409,7 +21599,13 @@ class HIRBuilder { CompilerError.invariant(false, { reason: 'Expected a loop to be in scope', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); } @@ -21473,7 +21669,13 @@ function getReversePostorderedBlocks(func) { CompilerError.invariant(block != null, { reason: '[HIRBuilder] Unexpected null block', description: `expected block ${blockId} to exist`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); const successors = [...eachTerminalSuccessor(block.terminal)].reverse(); const fallthrough = terminalFallthrough(block.terminal); @@ -21515,7 +21717,13 @@ function markInstructionIds(func) { CompilerError.invariant(!visited.has(instr), { reason: `${printInstruction(instr)} already visited!`, description: null, - loc: instr.loc, + details: [ + { + kind: 'error', + loc: instr.loc, + message: null, + }, + ], suggestions: null, }); visited.add(instr); @@ -21537,7 +21745,13 @@ function markPredecessors(func) { CompilerError.invariant(block != null, { reason: 'unexpected missing block', description: `block ${blockId}`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); if (prevBlock) { block.preds.add(prevBlock.id); @@ -21646,7 +21860,13 @@ function parseAliasingSignatureConfig(typeConfig, moduleName, loc) { CompilerError.invariant(!lifetimes.has(temp), { reason: `Invalid type configuration for module`, description: `Expected aliasing signature to have unique names for receiver, params, rest, returns, and temporaries in module '${moduleName}'`, - loc, + details: [ + { + kind: 'error', + loc, + message: null, + }, + ], }); const place = signatureArgument(lifetimes.size); lifetimes.set(temp, place); @@ -21657,7 +21877,13 @@ function parseAliasingSignatureConfig(typeConfig, moduleName, loc) { CompilerError.invariant(place != null, { reason: `Invalid type configuration for module`, description: `Expected aliasing signature effects to reference known names from receiver/params/rest/returns/temporaries, but '${temp}' is not a known name in '${moduleName}'`, - loc, + details: [ + { + kind: 'error', + loc, + message: null, + }, + ], }); return place; } @@ -21770,7 +21996,13 @@ function addShape(registry, id, properties, functionType) { CompilerError.invariant(!registry.has(id), { reason: `[ObjectShape] Could not add shape to registry: name ${id} already exists.`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); registry.set(id, shape); @@ -22708,7 +22940,7 @@ function lower(func, env, bindings = null, capturedRefs = new Map()) { category: ErrorCategory.Invariant, reason: 'Could not find binding', description: `[BuildHIR] Could not find binding for param \`${param.node.name}\`.`, - }).withDetail({ + }).withDetails({ kind: 'error', loc: (_a = param.node.loc) !== null && _a !== void 0 ? _a : null, message: 'Could not find binding', @@ -22757,7 +22989,7 @@ function lower(func, env, bindings = null, capturedRefs = new Map()) { category: ErrorCategory.Todo, reason: `Handle ${param.node.type} parameters`, description: `[BuildHIR] Add support for ${param.node.type} parameters.`, - }).withDetail({ + }).withDetails({ kind: 'error', loc: (_j = param.node.loc) !== null && _j !== void 0 ? _j : null, message: 'Unsupported parameter type', @@ -22787,7 +23019,7 @@ function lower(func, env, bindings = null, capturedRefs = new Map()) { category: ErrorCategory.Syntax, reason: `Unexpected function body kind`, description: `Expected function body to be an expression or a block statement, got \`${body.type}\`.`, - }).withDetail({ + }).withDetails({ kind: 'error', loc: (_a = body.node.loc) !== null && _a !== void 0 ? _a : null, message: 'Expected a block statement or expression', @@ -22973,7 +23205,13 @@ function lowerStatement(builder, stmtPath, label = null) { reason: 'Expected to find binding for hoisted identifier', description: `Could not find a binding for ${id.node.name}`, suggestions: null, - loc: (_e = id.node.loc) !== null && _e !== void 0 ? _e : GeneratedSource, + details: [ + { + kind: 'error', + loc: (_e = id.node.loc) !== null && _e !== void 0 ? _e : GeneratedSource, + message: null, + }, + ], }); if (builder.environment.isHoistedIdentifier(binding.identifier)) { continue; @@ -23011,7 +23249,14 @@ function lowerStatement(builder, stmtPath, label = null) { const identifier = builder.resolveIdentifier(id); CompilerError.invariant(identifier.kind === 'Identifier', { reason: 'Expected hoisted binding to be a local identifier, not a global', - loc: (_h = id.node.loc) !== null && _h !== void 0 ? _h : GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: (_h = id.node.loc) !== null && _h !== void 0 ? _h : GeneratedSource, + message: null, + }, + ], }); const place = { effect: Effect.Unknown, @@ -23445,7 +23690,13 @@ function lowerStatement(builder, stmtPath, label = null) { CompilerError.invariant(stmt.get('id').type === 'Identifier', { reason: 'function declarations must have a name', description: null, - loc: (_9 = stmt.node.loc) !== null && _9 !== void 0 ? _9 : null, + details: [ + { + kind: 'error', + loc: (_9 = stmt.node.loc) !== null && _9 !== void 0 ? _9 : null, + message: null, + }, + ], suggestions: null, }); const id = stmt.get('id'); @@ -23518,7 +23769,13 @@ function lowerStatement(builder, stmtPath, label = null) { CompilerError.invariant(declarations.length === 1, { reason: `Expected only one declaration in the init of a ForOfStatement, got ${declarations.length}`, description: null, - loc: (_15 = left.node.loc) !== null && _15 !== void 0 ? _15 : null, + details: [ + { + kind: 'error', + loc: (_15 = left.node.loc) !== null && _15 !== void 0 ? _15 : null, + message: null, + }, + ], suggestions: null, }); const id = declarations[0].get('id'); @@ -23527,8 +23784,15 @@ function lowerStatement(builder, stmtPath, label = null) { } else { CompilerError.invariant(left.isLVal(), { - loc: leftLoc, reason: 'Expected ForOf init to be a variable declaration or lval', + description: null, + details: [ + { + kind: 'error', + loc: leftLoc, + message: null, + }, + ], }); const assign = lowerAssignment(builder, leftLoc, InstructionKind.Reassign, left, advanceIterator, 'Assignment'); test = lowerValueToTemporary(builder, assign); @@ -23585,7 +23849,13 @@ function lowerStatement(builder, stmtPath, label = null) { CompilerError.invariant(declarations.length === 1, { reason: `Expected only one declaration in the init of a ForInStatement, got ${declarations.length}`, description: null, - loc: (_19 = left.node.loc) !== null && _19 !== void 0 ? _19 : null, + details: [ + { + kind: 'error', + loc: (_19 = left.node.loc) !== null && _19 !== void 0 ? _19 : null, + message: null, + }, + ], suggestions: null, }); const id = declarations[0].get('id'); @@ -23594,8 +23864,15 @@ function lowerStatement(builder, stmtPath, label = null) { } else { CompilerError.invariant(left.isLVal(), { - loc: leftLoc, reason: 'Expected ForIn init to be a variable declaration or lval', + description: null, + details: [ + { + kind: 'error', + loc: leftLoc, + message: null, + }, + ], }); const assign = lowerAssignment(builder, leftLoc, InstructionKind.Reassign, left, nextPropertyTemp, 'Assignment'); test = lowerValueToTemporary(builder, assign); @@ -24468,7 +24745,13 @@ function lowerExpression(builder, exprPath) { CompilerError.invariant(namePath.isJSXNamespacedName(), { reason: 'Refinement', description: null, - loc: (_z = namePath.node.loc) !== null && _z !== void 0 ? _z : null, + details: [ + { + kind: 'error', + loc: (_z = namePath.node.loc) !== null && _z !== void 0 ? _z : null, + message: null, + }, + ], suggestions: null, }); const namespace = namePath.node.namespace.name; @@ -24521,8 +24804,14 @@ function lowerExpression(builder, exprPath) { if (tagIdentifier != null) { CompilerError.invariant(tagIdentifier.kind !== 'Identifier', { reason: `<${tagName}> tags should be module-level imports`, - loc: (_4 = openingIdentifier.node.loc) !== null && _4 !== void 0 ? _4 : GeneratedSource, description: null, + details: [ + { + kind: 'error', + loc: (_4 = openingIdentifier.node.loc) !== null && _4 !== void 0 ? _4 : GeneratedSource, + message: null, + }, + ], suggestions: null, }); } @@ -24616,7 +24905,13 @@ function lowerExpression(builder, exprPath) { CompilerError.invariant(expr.get('quasi').get('quasis').length == 1, { reason: "there should be only one quasi as we don't support interpolations yet", description: null, - loc: (_8 = expr.node.loc) !== null && _8 !== void 0 ? _8 : null, + details: [ + { + kind: 'error', + loc: (_8 = expr.node.loc) !== null && _8 !== void 0 ? _8 : null, + message: null, + }, + ], suggestions: null, }); const value = expr.get('quasi').get('quasis').at(0).node.value; @@ -24978,7 +25273,13 @@ function lowerOptionalMemberExpression(builder, expr, parentAlternate) { CompilerError.invariant(object !== null, { reason: 'Satisfy type checker', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); builder.enterReserved(consequent, () => { @@ -25418,7 +25719,13 @@ function lowerJsxMemberExpression(builder, exprPath) { CompilerError.invariant(object.isJSXIdentifier(), { reason: `TypeScript refinement fail: expected 'JsxIdentifier', got \`${object.node.type}\``, description: null, - loc: (_b = object.node.loc) !== null && _b !== void 0 ? _b : null, + details: [ + { + kind: 'error', + loc: (_b = object.node.loc) !== null && _b !== void 0 ? _b : null, + message: null, + }, + ], suggestions: null, }); const kind = getLoadKind(builder, object); @@ -25452,7 +25759,13 @@ function lowerJsxElement(builder, exprPath) { CompilerError.invariant(expression.isExpression(), { reason: `(BuildHIR::lowerJsxElement) Expected Expression but found ${expression.type}!`, description: null, - loc: (_b = expression.node.loc) !== null && _b !== void 0 ? _b : null, + details: [ + { + kind: 'error', + loc: (_b = expression.node.loc) !== null && _b !== void 0 ? _b : null, + message: null, + }, + ], suggestions: null, }); return lowerExpressionToTemporary(builder, expression); @@ -25756,7 +26069,13 @@ function lowerAssignment(builder, loc, kind, lvaluePath, value, assignmentKind) CompilerError.invariant(kind === InstructionKind.Reassign, { reason: 'MemberExpression may only appear in an assignment expression', description: null, - loc: (_e = lvaluePath.node.loc) !== null && _e !== void 0 ? _e : null, + details: [ + { + kind: 'error', + loc: (_e = lvaluePath.node.loc) !== null && _e !== void 0 ? _e : null, + message: null, + }, + ], suggestions: null, }); const lvalue = lvaluePath; @@ -26327,7 +26646,14 @@ function pushEndScopeTerminal(scope, context) { const fallthroughId = context.fallthroughs.get(scope.id); CompilerError.invariant(fallthroughId != null, { reason: 'Expected scope to exist', - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); context.rewrites.push({ kind: 'EndScope', @@ -29935,7 +30261,13 @@ class PostDominator { CompilerError.invariant(dominator !== undefined, { reason: 'Unknown node', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return dominator === id ? null : dominator; @@ -29972,7 +30304,13 @@ function computeImmediateDominators(graph) { CompilerError.invariant(newIdom !== null, { reason: `At least one predecessor must have been visited for block ${id}`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); for (const pred of node.preds) { @@ -31134,7 +31472,13 @@ function makeTypeParameterId(id) { CompilerError.invariant(id >= 0 && Number.isInteger(id), { reason: 'Expected TypeParameterId to be a non-negative integer', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return id; @@ -31212,7 +31556,14 @@ function convertFlowType(flowType, loc) { else { CompilerError.invariant(false, { reason: `Unsupported property kind ${prop.kind}`, - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); } } @@ -31254,7 +31605,14 @@ function convertFlowType(flowType, loc) { else { CompilerError.invariant(false, { reason: `Unsupported property kind ${prop.kind}`, - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); } } @@ -31271,7 +31629,14 @@ function convertFlowType(flowType, loc) { else { CompilerError.invariant(false, { reason: `Unsupported property kind ${prop.kind}`, - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); } } @@ -31279,7 +31644,14 @@ function convertFlowType(flowType, loc) { } CompilerError.invariant(false, { reason: `Unsupported class instance type ${flowType.def.type.kind}`, - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); } case 'Fun': @@ -31316,7 +31688,14 @@ function convertFlowType(flowType, loc) { else { CompilerError.invariant(false, { reason: `Unsupported component props type ${propsType.type.kind}`, - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); } return Resolved.component(props, children, platform); @@ -31414,7 +31793,14 @@ class FlowTypeEnv { init(env, source) { CompilerError.invariant(env.config.flowTypeProvider != null, { reason: 'Expected flowDumpTypes to be defined in environment config', - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); let stdout; if (source === lastFlowSource) { @@ -31777,7 +32163,13 @@ class Environment { CompilerError.invariant(!__classPrivateFieldGet(this, _Environment_globals, "f").has(hookName), { reason: `[Globals] Found existing definition in global registry for custom hook ${hookName}`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); __classPrivateFieldGet(this, _Environment_globals, "f").set(hookName, addHook(__classPrivateFieldGet(this, _Environment_shapes, "f"), { @@ -31803,7 +32195,14 @@ class Environment { __classPrivateFieldSet(this, _Environment_flowTypeEnvironment, new FlowTypeEnv(), "f"); CompilerError.invariant(code != null, { reason: 'Expected Environment to be initialized with source code when a Flow type provider is specified', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); __classPrivateFieldGet(this, _Environment_flowTypeEnvironment, "f").init(this, code); } @@ -31814,7 +32213,14 @@ class Environment { get typeContext() { CompilerError.invariant(__classPrivateFieldGet(this, _Environment_flowTypeEnvironment, "f") != null, { reason: 'Flow type environment not initialized', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); return __classPrivateFieldGet(this, _Environment_flowTypeEnvironment, "f"); } @@ -31957,7 +32363,13 @@ class Environment { CompilerError.invariant(shape !== undefined, { reason: `[HIR] Forget internal error: cannot resolve shape ${shapeId}`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return (_a = shape.properties.get('*')) !== null && _a !== void 0 ? _a : null; @@ -31975,7 +32387,13 @@ class Environment { CompilerError.invariant(shape !== undefined, { reason: `[HIR] Forget internal error: cannot resolve shape ${shapeId}`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); if (typeof property === 'string') { @@ -31997,7 +32415,13 @@ class Environment { CompilerError.invariant(shape !== undefined, { reason: `[HIR] Forget internal error: cannot resolve shape ${shapeId}`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return shape.functionType; @@ -32113,7 +32537,13 @@ function mergeConsecutiveBlocks(fn) { CompilerError.invariant(predecessor !== undefined, { reason: `Expected predecessor ${predecessorId} to exist`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); if (predecessor.terminal.kind !== 'goto' || predecessor.kind !== 'block') { @@ -32123,7 +32553,13 @@ function mergeConsecutiveBlocks(fn) { CompilerError.invariant(phi.operands.size === 1, { reason: `Found a block with a single predecessor but where a phi has multiple (${phi.operands.size}) operands`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); const operand = Array.from(phi.operands.values())[0]; @@ -32199,7 +32635,13 @@ class DisjointSet { CompilerError.invariant(first != null, { reason: 'Expected set to be non-empty', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); let root = this.find(first); @@ -32330,7 +32772,13 @@ function inferReactiveScopeVariables(fn) { }); CompilerError.invariant(false, { reason: `Invalid mutable range for scope`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], description: `Scope @${scope.id} has range [${scope.range.start}:${scope.range.end}] but the valid range is [1:${maxInstruction + 1}]`, }); } @@ -32671,14 +33119,28 @@ function pruneUnusedLabelsHIR(fn) { const fallthrough = fn.body.blocks.get(fallthroughId); CompilerError.invariant(next.phis.size === 0 && fallthrough.phis.size === 0, { reason: 'Unexpected phis when merging label blocks', - loc: label.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: label.terminal.loc, + message: null, + }, + ], }); CompilerError.invariant(next.preds.size === 1 && fallthrough.preds.size === 1 && next.preds.has(originalLabelId) && fallthrough.preds.has(nextId), { reason: 'Unexpected block predecessors when merging label blocks', - loc: label.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: label.terminal.loc, + message: null, + }, + ], }); label.instructions.push(...next.instructions, ...fallthrough.instructions); label.terminal = fallthrough.terminal; @@ -32822,7 +33284,13 @@ function handleAssignment(currentFn, identifiers, lvalPath) { CompilerError.invariant(valuePath.isLVal(), { reason: `[FindContextIdentifiers] Expected object property value to be an LVal, got: ${valuePath.type}`, description: null, - loc: (_a = valuePath.node.loc) !== null && _a !== void 0 ? _a : GeneratedSource, + details: [ + { + kind: 'error', + loc: (_a = valuePath.node.loc) !== null && _a !== void 0 ? _a : GeneratedSource, + message: null, + }, + ], suggestions: null, }); handleAssignment(currentFn, identifiers, valuePath); @@ -32831,7 +33299,13 @@ function handleAssignment(currentFn, identifiers, lvalPath) { CompilerError.invariant(property.isRestElement(), { reason: `[FindContextIdentifiers] Invalid assumptions for babel types.`, description: null, - loc: (_b = property.node.loc) !== null && _b !== void 0 ? _b : GeneratedSource, + details: [ + { + kind: 'error', + loc: (_b = property.node.loc) !== null && _b !== void 0 ? _b : GeneratedSource, + message: null, + }, + ], suggestions: null, }); handleAssignment(currentFn, identifiers, property); @@ -32902,7 +33376,13 @@ function eliminateRedundantPhi(fn, sharedRewrites) { CompilerError.invariant(same !== null, { reason: 'Expected phis to be non-empty', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); rewrites.set(phi.place.identifier, same); @@ -32968,7 +33448,13 @@ class SSABuilder { CompilerError.invariant(__classPrivateFieldGet(this, _SSABuilder_current, "f") !== null, { reason: 'we need to be in a block to access state!', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return __classPrivateFieldGet(this, _SSABuilder_states, "f").get(__classPrivateFieldGet(this, _SSABuilder_current, "f")); @@ -33096,7 +33582,13 @@ function enterSSAImpl(func, builder, rootEntry) { CompilerError.invariant(!visitedBlocks.has(block), { reason: `found a cycle! visiting bb${block.id} again`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); visitedBlocks.add(block); @@ -33105,7 +33597,13 @@ function enterSSAImpl(func, builder, rootEntry) { CompilerError.invariant(func.context.length === 0, { reason: `Expected function context to be empty for outer function declarations`, description: null, - loc: func.loc, + details: [ + { + kind: 'error', + loc: func.loc, + message: null, + }, + ], suggestions: null, }); func.params = func.params.map(param => { @@ -33130,7 +33628,13 @@ function enterSSAImpl(func, builder, rootEntry) { CompilerError.invariant(entry.preds.size === 0, { reason: 'Expected function expression entry block to have zero predecessors', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); entry.preds.add(blockId); @@ -33198,7 +33702,13 @@ function rewriteInstructionKindsBasedOnReassignment(fn) { CompilerError.invariant(!declarations.has(lvalue.place.identifier.declarationId), { reason: `Expected variable not to be defined prior to declaration`, description: `${printPlace(lvalue.place)} was already defined`, - loc: lvalue.place.loc, + details: [ + { + kind: 'error', + loc: lvalue.place.loc, + message: null, + }, + ], }); declarations.set(lvalue.place.identifier.declarationId, lvalue); break; @@ -33211,7 +33721,13 @@ function rewriteInstructionKindsBasedOnReassignment(fn) { CompilerError.invariant(!declarations.has(lvalue.place.identifier.declarationId), { reason: `Expected variable not to be defined prior to declaration`, description: `${printPlace(lvalue.place)} was already defined`, - loc: lvalue.place.loc, + details: [ + { + kind: 'error', + loc: lvalue.place.loc, + message: null, + }, + ], }); declarations.set(lvalue.place.identifier.declarationId, lvalue); lvalue.kind = InstructionKind.Const; @@ -33231,7 +33747,13 @@ function rewriteInstructionKindsBasedOnReassignment(fn) { CompilerError.invariant(kind === null || kind === InstructionKind.Const, { reason: `Expected consistent kind for destructuring`, description: `other places were \`${kind}\` but '${printPlace(place)}' is const`, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: 'Expected consistent kind for destructuring', + }, + ], suggestions: null, }); kind = InstructionKind.Const; @@ -33242,14 +33764,26 @@ function rewriteInstructionKindsBasedOnReassignment(fn) { CompilerError.invariant(block.kind !== 'value', { reason: `TODO: Handle reassignment in a value block where the original declaration was removed by dead code elimination (DCE)`, description: null, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: null, + }, + ], suggestions: null, }); declarations.set(place.identifier.declarationId, lvalue); CompilerError.invariant(kind === null || kind === InstructionKind.Const, { reason: `Expected consistent kind for destructuring`, description: `Other places were \`${kind}\` but '${printPlace(place)}' is const`, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: 'Expected consistent kind for destructuring', + }, + ], suggestions: null, }); kind = InstructionKind.Const; @@ -33258,7 +33792,13 @@ function rewriteInstructionKindsBasedOnReassignment(fn) { CompilerError.invariant(kind === null || kind === InstructionKind.Reassign, { reason: `Expected consistent kind for destructuring`, description: `Other places were \`${kind}\` but '${printPlace(place)}' is reassigned`, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: 'Expected consistent kind for destructuring', + }, + ], suggestions: null, }); kind = InstructionKind.Reassign; @@ -33269,7 +33809,13 @@ function rewriteInstructionKindsBasedOnReassignment(fn) { CompilerError.invariant(kind !== null, { reason: 'Expected at least one operand', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); lvalue.kind = kind; @@ -33282,7 +33828,13 @@ function rewriteInstructionKindsBasedOnReassignment(fn) { CompilerError.invariant(declaration !== undefined, { reason: `Expected variable to have been defined`, description: `No declaration for ${printPlace(lvalue)}`, - loc: lvalue.loc, + details: [ + { + kind: 'error', + loc: lvalue.loc, + message: null, + }, + ], }); declaration.kind = InstructionKind.Let; break; @@ -33384,7 +33936,14 @@ function evaluatePhi(phi, constants) { case 'Primitive': { CompilerError.invariant(value.kind === 'Primitive', { reason: 'value kind expected to be Primitive', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); if (operandValue.value !== value.value) { @@ -33395,7 +33954,14 @@ function evaluatePhi(phi, constants) { case 'LoadGlobal': { CompilerError.invariant(value.kind === 'LoadGlobal', { reason: 'value kind expected to be LoadGlobal', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); if (operandValue.binding.name !== value.binding.name) { @@ -34024,7 +34590,13 @@ function pruneMaybeThrows(fn) { const mappedTerminal = terminalMapping.get(predecessor); CompilerError.invariant(mappedTerminal != null, { reason: `Expected non-existing phi operand's predecessor to have been mapped to a new terminal`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], description: `Could not find mapping for predecessor bb${predecessor} in block bb${block.id} for phi ${printPlace(phi.place)}`, suggestions: null, }); @@ -34541,7 +35113,14 @@ function createPropsProperties(fn, instr, nextInstructions, propAttributes, chil const spreadProp = jsxSpreadAttributes[0]; CompilerError.invariant(spreadProp.kind === 'JsxSpreadAttribute', { reason: 'Spread prop attribute must be of kind JSXSpreadAttribute', - loc: instr.loc, + description: null, + details: [ + { + kind: 'error', + loc: instr.loc, + message: null, + }, + ], }); propsProperty = { kind: 'ObjectProperty', @@ -34610,8 +35189,15 @@ function findScopesToMerge(fn) { const lvalueScope = lvalue.identifier.scope; CompilerError.invariant(operandScope != null && lvalueScope != null, { reason: 'Internal error: Expected all ObjectExpressions and ObjectMethods to have non-null scope.', + description: null, suggestions: null, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); mergeScopesBuilder.union([operandScope, lvalueScope]); } @@ -35151,9 +35737,15 @@ class CheckInstructionsAgainstScopesVisitor extends ReactiveFunctionVisitor { state.has(scope.id) && !this.activeScopes.has(scope.id)) { CompilerError.invariant(false, { - description: `Instruction [${id}] is part of scope @${scope.id}, but that scope has already completed.`, - loc: place.loc, reason: 'Encountered an instruction that should be part of a scope, but where that scope has already completed', + description: `Instruction [${id}] is part of scope @${scope.id}, but that scope has already completed.`, + details: [ + { + kind: 'error', + loc: place.loc, + message: null, + }, + ], suggestions: null, }); } @@ -35177,7 +35769,14 @@ let Visitor$a = class Visitor extends ReactiveFunctionVisitor { if (terminal.kind === 'break' || terminal.kind === 'continue') { CompilerError.invariant(seenLabels.has(terminal.target), { reason: 'Unexpected break to invalid label', - loc: stmt.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: stmt.terminal.loc, + message: null, + }, + ], }); } } @@ -35213,7 +35812,13 @@ class Driver { CompilerError.invariant(!this.cx.emitted.has(block.id), { reason: `Cannot emit the same block twice: bb${block.id}`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); this.cx.emitted.add(block.id); @@ -35268,7 +35873,14 @@ class Driver { if (this.cx.isScheduled(terminal.consequent)) { CompilerError.invariant(false, { reason: `Unexpected 'if' where the consequent is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } else { @@ -35279,7 +35891,14 @@ class Driver { if (this.cx.isScheduled(alternateId)) { CompilerError.invariant(false, { reason: `Unexpected 'if' where the alternate is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } else { @@ -35325,7 +35944,14 @@ class Driver { if (this.cx.isScheduled(case_.block)) { CompilerError.invariant(case_.block === terminal.fallthrough, { reason: `Unexpected 'switch' where a case is already scheduled and block is not the fallthrough`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); return; } @@ -35376,7 +36002,14 @@ class Driver { else { CompilerError.invariant(false, { reason: `Unexpected 'do-while' where the loop is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } const testValue = this.visitValueBlock(terminal.test, terminal.loc).value; @@ -35421,7 +36054,14 @@ class Driver { else { CompilerError.invariant(false, { reason: `Unexpected 'while' where the loop is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } this.cx.unscheduleAll(scheduleIds); @@ -35492,7 +36132,14 @@ class Driver { else { CompilerError.invariant(false, { reason: `Unexpected 'for' where the loop is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } this.cx.unscheduleAll(scheduleIds); @@ -35581,7 +36228,14 @@ class Driver { else { CompilerError.invariant(false, { reason: `Unexpected 'for-of' where the loop is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } this.cx.unscheduleAll(scheduleIds); @@ -35644,7 +36298,14 @@ class Driver { else { CompilerError.invariant(false, { reason: `Unexpected 'for-in' where the loop is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } this.cx.unscheduleAll(scheduleIds); @@ -35679,7 +36340,14 @@ class Driver { if (this.cx.isScheduled(terminal.alternate)) { CompilerError.invariant(false, { reason: `Unexpected 'branch' where the alternate is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } else { @@ -35712,7 +36380,14 @@ class Driver { if (this.cx.isScheduled(terminal.block)) { CompilerError.invariant(false, { reason: `Unexpected 'label' where the block is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } else { @@ -35837,7 +36512,14 @@ class Driver { if (this.cx.isScheduled(terminal.block)) { CompilerError.invariant(false, { reason: `Unexpected 'scope' where the block is already scheduled`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); } else { @@ -35861,7 +36543,13 @@ class Driver { CompilerError.invariant(false, { reason: 'Unexpected unsupported terminal', description: null, - loc: terminal.loc, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], suggestions: null, }); } @@ -35892,7 +36580,13 @@ class Driver { defaultBlock.terminal.test.identifier.id, { reason: 'Expected branch block to end in an instruction that sets the test value', description: null, - loc: instr.lvalue.loc, + details: [ + { + kind: 'error', + loc: instr.lvalue.loc, + message: null, + }, + ], suggestions: null, }); return { @@ -35925,7 +36619,13 @@ class Driver { CompilerError.invariant(false, { reason: 'Expected goto value block to have at least one instruction', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); } @@ -36156,14 +36856,27 @@ class Driver { CompilerError.invariant(false, { reason: 'Expected a break target', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); } if (this.cx.scopeFallthroughs.has(target.block)) { CompilerError.invariant(target.type === 'implicit', { reason: 'Expected reactive scope to implicitly break to fallthrough', - loc, + description: null, + details: [ + { + kind: 'error', + loc, + message: null, + }, + ], }); return null; } @@ -36184,7 +36897,13 @@ class Driver { CompilerError.invariant(target !== null, { reason: `Expected continue target to be scheduled for bb${block}`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return { @@ -36226,7 +36945,13 @@ let Context$3 = class Context { CompilerError.invariant(!__classPrivateFieldGet(this, _Context_scheduled, "f").has(block), { reason: `Break block is already scheduled: bb${block}`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); __classPrivateFieldGet(this, _Context_scheduled, "f").add(block); @@ -36241,7 +36966,13 @@ let Context$3 = class Context { CompilerError.invariant(!__classPrivateFieldGet(this, _Context_scheduled, "f").has(continueBlock), { reason: `Continue block is already scheduled: bb${continueBlock}`, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); __classPrivateFieldGet(this, _Context_scheduled, "f").add(continueBlock); @@ -36266,7 +36997,13 @@ let Context$3 = class Context { CompilerError.invariant(last !== undefined && last.id === scheduleId, { reason: 'Can only unschedule the last target', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); if (last.type !== 'loop' || last.ownsBlock !== null) { @@ -36312,7 +37049,13 @@ let Context$3 = class Context { CompilerError.invariant(false, { reason: 'Expected a break target', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); } @@ -36583,7 +37326,14 @@ function codegenFunction(fn, { uniqueIdentifiers, fbtOperands, }) { else { CompilerError.invariant(globalGating != null, { reason: 'Bad config not caught! Expected at least one of gating or globalGating', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); ifTest = globalGating; @@ -36726,10 +37476,16 @@ function codegenBlock(cx, block) { continue; } CompilerError.invariant(temp.get(key) === value, { - loc: null, reason: 'Expected temporary value to be unchanged', description: null, suggestions: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); } cx.temp = temp; @@ -36830,7 +37586,13 @@ function codegenReactiveScope(cx, statements, scope, block) { CompilerError.invariant(identifier.name != null, { reason: `Expected scope declaration identifier to be named`, description: `Declaration \`${printIdentifier(identifier)}\` is unnamed in scope @${scope.id}`, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); const name = convertIdentifier(identifier); @@ -36860,7 +37622,13 @@ function codegenReactiveScope(cx, statements, scope, block) { CompilerError.invariant(firstOutputIndex !== null, { reason: `Expected scope to have at least one declaration`, description: `Scope '@${scope.id}' has no declarations`, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); testCondition = libExports$1.binaryExpression('===', libExports$1.memberExpression(libExports$1.identifier(cx.synthesizeName('$')), libExports$1.numericLiteral(firstOutputIndex), true), libExports$1.callExpression(libExports$1.memberExpression(libExports$1.identifier('Symbol'), libExports$1.identifier('for')), [libExports$1.stringLiteral(MEMO_CACHE_SENTINEL)])); @@ -36869,7 +37637,13 @@ function codegenReactiveScope(cx, statements, scope, block) { CompilerError.invariant(cx.env.config.enableChangeDetectionForDebugging == null, { reason: `Expected to not have both change detection enabled and memoization disabled`, description: `Incompatible config options`, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); testCondition = libExports$1.logicalExpression('||', testCondition, libExports$1.booleanLiteral(true)); } @@ -36957,8 +37731,14 @@ function codegenReactiveScope(cx, statements, scope, block) { CompilerError.invariant(earlyReturnValue.value.name !== null && earlyReturnValue.value.name.kind === 'named', { reason: `Expected early return value to be promoted to a named variable`, - loc: earlyReturnValue.loc, description: null, + details: [ + { + kind: 'error', + loc: earlyReturnValue.loc, + message: null, + }, + ], suggestions: null, }); const name = earlyReturnValue.value.name.value; @@ -36992,7 +37772,13 @@ function codegenTerminal(cx, terminal) { CompilerError.invariant(terminal.init.kind === 'SequenceExpression', { reason: `Expected a sequence expression init for for..in`, description: `Got \`${terminal.init.kind}\` expression instead`, - loc: terminal.init.loc, + details: [ + { + kind: 'error', + loc: terminal.init.loc, + message: null, + }, + ], suggestions: null, }); if (terminal.init.instructions.length !== 2) { @@ -37027,7 +37813,13 @@ function codegenTerminal(cx, terminal) { CompilerError.invariant(false, { reason: `Expected a StoreLocal or Destructure to be assigned to the collection`, description: `Found ${iterableItem.value.kind}`, - loc: iterableItem.value.loc, + details: [ + { + kind: 'error', + loc: iterableItem.value.loc, + message: null, + }, + ], suggestions: null, }); } @@ -37043,7 +37835,13 @@ function codegenTerminal(cx, terminal) { CompilerError.invariant(false, { reason: 'Destructure should never be Reassign as it would be an Object/ArrayPattern', description: null, - loc: iterableItem.loc, + details: [ + { + kind: 'error', + loc: iterableItem.loc, + message: null, + }, + ], suggestions: null, }); case InstructionKind.Catch: @@ -37054,7 +37852,13 @@ function codegenTerminal(cx, terminal) { CompilerError.invariant(false, { reason: `Unexpected ${iterableItem.value.lvalue.kind} variable in for..in collection`, description: null, - loc: iterableItem.loc, + details: [ + { + kind: 'error', + loc: iterableItem.loc, + message: null, + }, + ], suggestions: null, }); default: @@ -37070,14 +37874,26 @@ function codegenTerminal(cx, terminal) { terminal.init.instructions[0].value.kind === 'GetIterator', { reason: `Expected a single-expression sequence expression init for for..of`, description: `Got \`${terminal.init.kind}\` expression instead`, - loc: terminal.init.loc, + details: [ + { + kind: 'error', + loc: terminal.init.loc, + message: null, + }, + ], suggestions: null, }); const iterableCollection = terminal.init.instructions[0].value; CompilerError.invariant(terminal.test.kind === 'SequenceExpression', { reason: `Expected a sequence expression test for for..of`, description: `Got \`${terminal.init.kind}\` expression instead`, - loc: terminal.test.loc, + details: [ + { + kind: 'error', + loc: terminal.test.loc, + message: null, + }, + ], suggestions: null, }); if (terminal.test.instructions.length !== 2) { @@ -37111,7 +37927,13 @@ function codegenTerminal(cx, terminal) { CompilerError.invariant(false, { reason: `Expected a StoreLocal or Destructure to be assigned to the collection`, description: `Found ${iterableItem.value.kind}`, - loc: iterableItem.value.loc, + details: [ + { + kind: 'error', + loc: iterableItem.value.loc, + message: null, + }, + ], suggestions: null, }); } @@ -37132,7 +37954,13 @@ function codegenTerminal(cx, terminal) { CompilerError.invariant(false, { reason: `Unexpected ${iterableItem.value.lvalue.kind} variable in for..of collection`, description: null, - loc: iterableItem.loc, + details: [ + { + kind: 'error', + loc: iterableItem.loc, + message: null, + }, + ], suggestions: null, }); default: @@ -37243,7 +38071,13 @@ function codegenInstructionNullable(cx, instr) { CompilerError.invariant(false, { reason: 'Encountered a destructuring operation where some identifiers are already declared (reassignments) but others are not (declarations)', description: null, - loc: instr.loc, + details: [ + { + kind: 'error', + loc: instr.loc, + message: null, + }, + ], suggestions: null, }); } @@ -37257,7 +38091,13 @@ function codegenInstructionNullable(cx, instr) { CompilerError.invariant(instr.lvalue === null, { reason: `Const declaration cannot be referenced as an expression`, description: null, - loc: instr.value.loc, + details: [ + { + kind: 'error', + loc: instr.value.loc, + message: `this is ${kind}`, + }, + ], suggestions: null, }); return createVariableDeclaration(instr.loc, 'const', [ @@ -37268,20 +38108,38 @@ function codegenInstructionNullable(cx, instr) { CompilerError.invariant(instr.lvalue === null, { reason: `Function declaration cannot be referenced as an expression`, description: null, - loc: instr.value.loc, + details: [ + { + kind: 'error', + loc: instr.value.loc, + message: `this is ${kind}`, + }, + ], suggestions: null, }); const genLvalue = codegenLValue(cx, lvalue); CompilerError.invariant(genLvalue.type === 'Identifier', { reason: 'Expected an identifier as a function declaration lvalue', description: null, - loc: instr.value.loc, + details: [ + { + kind: 'error', + loc: instr.value.loc, + message: null, + }, + ], suggestions: null, }); CompilerError.invariant((value === null || value === void 0 ? void 0 : value.type) === 'FunctionExpression', { reason: 'Expected a function as a function declaration value', description: `Got ${value == null ? String(value) : value.type} at ${printInstruction(instr)}`, - loc: instr.value.loc, + details: [ + { + kind: 'error', + loc: instr.value.loc, + message: null, + }, + ], suggestions: null, }); return createFunctionDeclaration(instr.loc, genLvalue, value.params, value.body, value.generator, value.async); @@ -37290,7 +38148,13 @@ function codegenInstructionNullable(cx, instr) { CompilerError.invariant(instr.lvalue === null, { reason: `Const declaration cannot be referenced as an expression`, description: null, - loc: instr.value.loc, + details: [ + { + kind: 'error', + loc: instr.value.loc, + message: 'this is const', + }, + ], suggestions: null, }); return createVariableDeclaration(instr.loc, 'let', [ @@ -37301,7 +38165,13 @@ function codegenInstructionNullable(cx, instr) { CompilerError.invariant(value !== null, { reason: 'Expected a value for reassignment', description: null, - loc: instr.value.loc, + details: [ + { + kind: 'error', + loc: instr.value.loc, + message: null, + }, + ], suggestions: null, }); const expr = libExports$1.assignmentExpression('=', codegenLValue(cx, lvalue), value); @@ -37331,7 +38201,13 @@ function codegenInstructionNullable(cx, instr) { CompilerError.invariant(false, { reason: `Expected ${kind} to have been pruned in PruneHoistedContexts`, description: null, - loc: instr.loc, + details: [ + { + kind: 'error', + loc: instr.loc, + message: null, + }, + ], suggestions: null, }); } @@ -37350,7 +38226,14 @@ function codegenInstructionNullable(cx, instr) { else if (instr.value.kind === 'ObjectMethod') { CompilerError.invariant(instr.lvalue, { reason: 'Expected object methods to have a temp lvalue', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); cx.objectMethods.set(instr.lvalue.identifier.id, instr.value); @@ -37389,7 +38272,13 @@ function codegenForInit(cx, init) { CompilerError.invariant(instr.type === 'VariableDeclaration' && (instr.kind === 'let' || instr.kind === 'const'), { reason: 'Expected a variable declaration', - loc: init.loc, + details: [ + { + kind: 'error', + loc: init.loc, + message: null, + }, + ], description: `Got ${instr.type}`, suggestions: null, }); @@ -37401,7 +38290,13 @@ function codegenForInit(cx, init) { }); CompilerError.invariant(declarators.length > 0, { reason: 'Expected a variable declaration', - loc: init.loc, + details: [ + { + kind: 'error', + loc: init.loc, + message: null, + }, + ], description: null, suggestions: null, }); @@ -37605,7 +38500,13 @@ function codegenInstructionValue(cx, instrValue) { CompilerError.invariant(libExports$1.isExpression(optionalValue.callee), { reason: 'v8 intrinsics are validated during lowering', description: null, - loc: (_a = optionalValue.callee.loc) !== null && _a !== void 0 ? _a : null, + details: [ + { + kind: 'error', + loc: (_a = optionalValue.callee.loc) !== null && _a !== void 0 ? _a : null, + message: null, + }, + ], suggestions: null, }); value = libExports$1.optionalCallExpression(optionalValue.callee, optionalValue.arguments, instrValue.optional); @@ -37617,7 +38518,13 @@ function codegenInstructionValue(cx, instrValue) { CompilerError.invariant(libExports$1.isExpression(property), { reason: 'Private names are validated during lowering', description: null, - loc: (_b = property.loc) !== null && _b !== void 0 ? _b : null, + details: [ + { + kind: 'error', + loc: (_b = property.loc) !== null && _b !== void 0 ? _b : null, + message: null, + }, + ], suggestions: null, }); value = libExports$1.optionalMemberExpression(optionalValue.object, property, optionalValue.computed, instrValue.optional); @@ -37627,7 +38534,13 @@ function codegenInstructionValue(cx, instrValue) { CompilerError.invariant(false, { reason: 'Expected an optional value to resolve to a call expression or member expression', description: `Got a \`${optionalValue.type}\``, - loc: instrValue.loc, + details: [ + { + kind: 'error', + loc: instrValue.loc, + message: null, + }, + ], suggestions: null, }); } @@ -37639,17 +38552,28 @@ function codegenInstructionValue(cx, instrValue) { const memberExpr = codegenPlaceToExpression(cx, instrValue.property); CompilerError.invariant(libExports$1.isMemberExpression(memberExpr) || libExports$1.isOptionalMemberExpression(memberExpr), { - reason: '[Codegen] Internal error: MethodCall::property must be an unpromoted + unmemoized MemberExpression. ' + - `Got a \`${memberExpr.type}\``, + reason: '[Codegen] Internal error: MethodCall::property must be an unpromoted + unmemoized MemberExpression', description: null, - loc: (_c = memberExpr.loc) !== null && _c !== void 0 ? _c : null, + details: [ + { + kind: 'error', + loc: (_c = memberExpr.loc) !== null && _c !== void 0 ? _c : null, + message: `Got: '${memberExpr.type}'`, + }, + ], suggestions: null, }); CompilerError.invariant(libExports$1.isNodesEquivalent(memberExpr.object, codegenPlaceToExpression(cx, instrValue.receiver)), { reason: '[Codegen] Internal error: Forget should always generate MethodCall::property ' + 'as a MemberExpression of MethodCall::receiver', description: null, - loc: (_d = memberExpr.loc) !== null && _d !== void 0 ? _d : null, + details: [ + { + kind: 'error', + loc: (_d = memberExpr.loc) !== null && _d !== void 0 ? _d : null, + message: null, + }, + ], suggestions: null, }); const args = instrValue.args.map(arg => codegenArgument(cx, arg)); @@ -37679,7 +38603,14 @@ function codegenInstructionValue(cx, instrValue) { const method = cx.objectMethods.get(property.place.identifier.id); CompilerError.invariant(method, { reason: 'Expected ObjectMethod instruction', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); const loweredFunc = method.loweredFunc; @@ -37727,7 +38658,13 @@ function codegenInstructionValue(cx, instrValue) { CompilerError.invariant(tagValue.type === 'StringLiteral', { reason: `Expected JSX tag to be an identifier or string, got \`${tagValue.type}\``, description: null, - loc: (_f = tagValue.loc) !== null && _f !== void 0 ? _f : null, + details: [ + { + kind: 'error', + loc: (_f = tagValue.loc) !== null && _f !== void 0 ? _f : null, + message: null, + }, + ], suggestions: null, }); if (tagValue.value.indexOf(':') >= 0) { @@ -37742,7 +38679,13 @@ function codegenInstructionValue(cx, instrValue) { if (tagValue.type === 'StringLiteral' && SINGLE_CHILD_FBT_TAGS.has(tagValue.value)) { CompilerError.invariant(instrValue.children != null, { - loc: instrValue.loc, + details: [ + { + kind: 'error', + loc: instrValue.loc, + message: null, + }, + ], reason: 'Expected fbt element to have children', suggestions: null, description: null, @@ -37947,7 +38890,13 @@ function codegenInstructionValue(cx, instrValue) { CompilerError.invariant(instrValue.lvalue.kind === InstructionKind.Reassign, { reason: `Unexpected StoreLocal in codegenInstructionValue`, description: null, - loc: instrValue.loc, + details: [ + { + kind: 'error', + loc: instrValue.loc, + message: null, + }, + ], suggestions: null, }); value = libExports$1.assignmentExpression('=', codegenLValue(cx, instrValue.lvalue.place), codegenPlaceToExpression(cx, instrValue.value)); @@ -37968,7 +38917,13 @@ function codegenInstructionValue(cx, instrValue) { CompilerError.invariant(false, { reason: `Unexpected ${instrValue.kind} in codegenInstructionValue`, description: null, - loc: instrValue.loc, + details: [ + { + kind: 'error', + loc: instrValue.loc, + message: null, + }, + ], suggestions: null, }); } @@ -38052,7 +39007,13 @@ function convertMemberExpressionToJsx(expr) { CompilerError.invariant(expr.property.type === 'Identifier', { reason: 'Expected JSX member expression property to be a string', description: null, - loc: (_a = expr.loc) !== null && _a !== void 0 ? _a : null, + details: [ + { + kind: 'error', + loc: (_a = expr.loc) !== null && _a !== void 0 ? _a : null, + message: null, + }, + ], suggestions: null, }); const property = libExports$1.jsxIdentifier(expr.property.name); @@ -38063,7 +39024,13 @@ function convertMemberExpressionToJsx(expr) { CompilerError.invariant(expr.object.type === 'MemberExpression', { reason: 'Expected JSX member expression to be an identifier or nested member expression', description: null, - loc: (_b = expr.object.loc) !== null && _b !== void 0 ? _b : null, + details: [ + { + kind: 'error', + loc: (_b = expr.object.loc) !== null && _b !== void 0 ? _b : null, + message: null, + }, + ], suggestions: null, }); const object = convertMemberExpressionToJsx(expr.object); @@ -38083,7 +39050,13 @@ function codegenObjectPropertyKey(cx, key) { CompilerError.invariant(libExports$1.isExpression(expr), { reason: 'Expected object property key to be an expression', description: null, - loc: key.name.loc, + details: [ + { + kind: 'error', + loc: key.name.loc, + message: null, + }, + ], suggestions: null, }); return expr; @@ -38191,7 +39164,13 @@ function codegenPlace(cx, place) { CompilerError.invariant(place.identifier.name !== null || tmp !== undefined, { reason: `[Codegen] No value found for temporary`, description: `Value for '${printPlace(place)}' was not set in the codegen context`, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: null, + }, + ], suggestions: null, }); const identifier = convertIdentifier(place.identifier); @@ -38201,7 +39180,13 @@ function codegenPlace(cx, place) { function convertIdentifier(identifier) { CompilerError.invariant(identifier.name !== null && identifier.name.kind === 'named', { reason: `Expected temporaries to be promoted to named identifiers in an earlier pass`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], description: `identifier ${identifier.id} is unnamed`, suggestions: null, }); @@ -38211,7 +39196,14 @@ function compareScopeDependency(a, b) { var _a, _b; CompilerError.invariant(((_a = a.identifier.name) === null || _a === void 0 ? void 0 : _a.kind) === 'named' && ((_b = b.identifier.name) === null || _b === void 0 ? void 0 : _b.kind) === 'named', { reason: '[Codegen] Expected named identifier for dependency', - loc: a.identifier.loc, + description: null, + details: [ + { + kind: 'error', + loc: a.identifier.loc, + message: null, + }, + ], }); const aName = [ a.identifier.name.value, @@ -38232,7 +39224,14 @@ function compareScopeDeclaration(a, b) { var _a, _b; CompilerError.invariant(((_a = a.identifier.name) === null || _a === void 0 ? void 0 : _a.kind) === 'named' && ((_b = b.identifier.name) === null || _b === void 0 ? void 0 : _b.kind) === 'named', { reason: '[Codegen] Expected named identifier for declaration', - loc: a.identifier.loc, + description: null, + details: [ + { + kind: 'error', + loc: a.identifier.loc, + message: null, + }, + ], }); const aName = a.identifier.name.value; const bName = b.identifier.name.value; @@ -38370,10 +39369,16 @@ let Transform$4 = class Transform extends ReactiveFunctionTransform { const merged = []; function reset() { CompilerError.invariant(current !== null, { - loc: null, reason: 'MergeConsecutiveScopes: expected current scope to be non-null if reset()', - suggestions: null, description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], + suggestions: null, }); if (current.to > current.from + 1) { merged.push(current); @@ -38493,9 +39498,15 @@ let Transform$4 = class Transform extends ReactiveFunctionTransform { } const mergedScope = block[entry.from]; CompilerError.invariant(mergedScope.kind === 'scope', { - loc: null, reason: 'MergeConsecutiveScopes: Expected scope starting index to be a scope', description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); nextInstructions.push(mergedScope); @@ -38762,7 +39773,14 @@ class PromoteInterposedTemporaries extends ReactiveFunctionVisitor { for (const lval of eachInstructionValueLValue(instruction.value)) { CompilerError.invariant(lval.identifier.name != null, { reason: 'PromoteInterposedTemporaries: Assignment targets not expected to be temporaries', - loc: instruction.loc, + description: null, + details: [ + { + kind: 'error', + loc: instruction.loc, + message: null, + }, + ], }); } switch (instruction.value.kind) { @@ -38886,7 +39904,13 @@ function promoteIdentifier(identifier, state) { CompilerError.invariant(identifier.name === null, { reason: 'promoteTemporary: Expected to be called only for temporary variables', description: null, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], suggestions: null, }); if (state.tags.has(identifier.declarationId)) { @@ -39215,7 +40239,14 @@ let Visitor$8 = class Visitor extends ReactiveFunctionTransform { if (maybeHoistedFn != null) { CompilerError.invariant(maybeHoistedFn.kind === 'func', { reason: '[PruneHoistedContexts] Unexpected hoisted function', - loc: instruction.loc, + description: null, + details: [ + { + kind: 'error', + loc: instruction.loc, + message: null, + }, + ], }); maybeHoistedFn.definition = instruction.value.lvalue.place; state.uninitialized.delete(lvalueId); @@ -39346,7 +40377,13 @@ function inferMutationAliasingEffects(fn, { isFunctionExpression } = { CompilerError.invariant(fn.params.length <= 2, { reason: 'Expected React component to have not more than two parameters: one for props and for ref', description: null, - loc: fn.loc, + details: [ + { + kind: 'error', + loc: fn.loc, + message: null, + }, + ], suggestions: null, }); const [props, ref] = fn.params; @@ -39398,7 +40435,13 @@ function inferMutationAliasingEffects(fn, { isFunctionExpression } = { CompilerError.invariant(false, { reason: `[InferMutationAliasingEffects] Potential infinite loop`, description: `A value, temporary place, or effect was not cached properly`, - loc: fn.loc, + details: [ + { + kind: 'error', + loc: fn.loc, + message: null, + }, + ], }); } for (const [blockId, block] of fn.body.blocks) { @@ -39505,7 +40548,14 @@ function inferBlock(context, state, block) { if (handlerParam != null) { CompilerError.invariant(state.kind(handlerParam) != null, { reason: 'Expected catch binding to be intialized with a DeclareLocal Catch instruction', - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); const effects = []; for (const instr of block.instructions) { @@ -39564,14 +40614,14 @@ function applySignature(context, state, signature, instruction) { category: ErrorCategory.Immutability, reason: 'This value cannot be modified', description: `${reason}.`, - }).withDetail({ + }).withDetails({ kind: 'error', loc: effect.value.loc, message: `${variable} cannot be modified`, }); if (effect.kind === 'Mutate' && ((_b = effect.reason) === null || _b === void 0 ? void 0 : _b.kind) === 'AssignCurrentProperty') { - diagnostic.withDetail({ + diagnostic.withDetails({ kind: 'hint', message: `Hint: If this value is a Ref (value returned by \`useRef()\`), rename the variable to end in "Ref".`, }); @@ -39593,7 +40643,14 @@ function applySignature(context, state, signature, instruction) { if (!(state.isDefined(instruction.lvalue) && state.kind(instruction.lvalue))) { CompilerError.invariant(false, { reason: `Expected instruction lvalue to be initialized`, - loc: instruction.loc, + description: null, + details: [ + { + kind: 'error', + loc: instruction.loc, + message: null, + }, + ], }); } return effects.length !== 0 ? effects : null; @@ -39613,7 +40670,13 @@ function applyEffect(context, state, _effect, initialized, effects) { CompilerError.invariant(!initialized.has(effect.into.identifier.id), { reason: `Cannot re-initialize variable within an instruction`, description: `Re-initialized ${printPlace(effect.into)} in ${printAliasingEffect(effect)}`, - loc: effect.into.loc, + details: [ + { + kind: 'error', + loc: effect.into.loc, + message: null, + }, + ], }); initialized.add(effect.into.identifier.id); let value = context.effectInstructionValueCache.get(effect); @@ -39650,7 +40713,13 @@ function applyEffect(context, state, _effect, initialized, effects) { CompilerError.invariant(!initialized.has(effect.into.identifier.id), { reason: `Cannot re-initialize variable within an instruction`, description: `Re-initialized ${printPlace(effect.into)} in ${printAliasingEffect(effect)}`, - loc: effect.into.loc, + details: [ + { + kind: 'error', + loc: effect.into.loc, + message: null, + }, + ], }); initialized.add(effect.into.identifier.id); const fromValue = state.kind(effect.from); @@ -39703,7 +40772,13 @@ function applyEffect(context, state, _effect, initialized, effects) { CompilerError.invariant(!initialized.has(effect.into.identifier.id), { reason: `Cannot re-initialize variable within an instruction`, description: `Re-initialized ${printPlace(effect.into)} in ${printAliasingEffect(effect)}`, - loc: effect.into.loc, + details: [ + { + kind: 'error', + loc: effect.into.loc, + message: null, + }, + ], }); initialized.add(effect.into.identifier.id); effects.push(effect); @@ -39754,7 +40829,13 @@ function applyEffect(context, state, _effect, initialized, effects) { CompilerError.invariant(effect.kind === 'Capture' || initialized.has(effect.into.identifier.id), { reason: `Expected destination value to already be initialized within this instruction for Alias effect`, description: `Destination ${printPlace(effect.into)} is not initialized in this instruction`, - loc: effect.into.loc, + details: [ + { + kind: 'error', + loc: effect.into.loc, + message: null, + }, + ], }); const intoKind = state.kind(effect.into).kind; let isMutableDesination; @@ -39801,7 +40882,13 @@ function applyEffect(context, state, _effect, initialized, effects) { CompilerError.invariant(!initialized.has(effect.into.identifier.id), { reason: `Cannot re-initialize variable within an instruction`, description: `Re-initialized ${printPlace(effect.into)} in ${printAliasingEffect(effect)}`, - loc: effect.into.loc, + details: [ + { + kind: 'error', + loc: effect.into.loc, + message: null, + }, + ], }); initialized.add(effect.into.identifier.id); const fromValue = state.kind(effect.from); @@ -39961,13 +41048,13 @@ function applyEffect(context, state, _effect, initialized, effects) { description: `${variable !== null && variable !== void 0 ? variable : 'This variable'} is accessed before it is declared, which prevents the earlier access from updating when this value changes over time.`, }); if (hoistedAccess != null && hoistedAccess.loc != effect.value.loc) { - diagnostic.withDetail({ + diagnostic.withDetails({ kind: 'error', loc: hoistedAccess.loc, message: `${variable !== null && variable !== void 0 ? variable : 'variable'} accessed before it is declared`, }); } - diagnostic.withDetail({ + diagnostic.withDetails({ kind: 'error', loc: effect.value.loc, message: `${variable !== null && variable !== void 0 ? variable : 'variable'} is declared here`, @@ -39991,14 +41078,14 @@ function applyEffect(context, state, _effect, initialized, effects) { category: ErrorCategory.Immutability, reason: 'This value cannot be modified', description: `${reason}.`, - }).withDetail({ + }).withDetails({ kind: 'error', loc: effect.value.loc, message: `${variable} cannot be modified`, }); if (effect.kind === 'Mutate' && ((_e = effect.reason) === null || _e === void 0 ? void 0 : _e.kind) === 'AssignCurrentProperty') { - diagnostic.withDetail({ + diagnostic.withDetails({ kind: 'hint', message: `Hint: If this value is a Ref (value returned by \`useRef()\`), rename the variable to end in "Ref".`, }); @@ -40046,7 +41133,13 @@ class InferenceState { CompilerError.invariant(value.kind !== 'LoadLocal', { reason: '[InferMutationAliasingEffects] Expected all top-level identifiers to be defined as variables, not values', description: null, - loc: value.loc, + details: [ + { + kind: 'error', + loc: value.loc, + message: null, + }, + ], suggestions: null, }); __classPrivateFieldGet(this, _InferenceState_values, "f").set(value, kind); @@ -40056,7 +41149,13 @@ class InferenceState { CompilerError.invariant(values != null, { reason: `[InferMutationAliasingEffects] Expected value kind to be initialized`, description: `${printPlace(place)}`, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: 'this is uninitialized', + }, + ], suggestions: null, }); return Array.from(values); @@ -40066,7 +41165,13 @@ class InferenceState { CompilerError.invariant(values != null, { reason: `[InferMutationAliasingEffects] Expected value kind to be initialized`, description: `${printPlace(place)}`, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: 'this is uninitialized', + }, + ], suggestions: null, }); let mergedKind = null; @@ -40078,7 +41183,13 @@ class InferenceState { CompilerError.invariant(mergedKind !== null, { reason: `[InferMutationAliasingEffects] Expected at least one value`, description: `No value found at \`${printPlace(place)}\``, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: null, + }, + ], suggestions: null, }); return mergedKind; @@ -40088,7 +41199,13 @@ class InferenceState { CompilerError.invariant(values != null, { reason: `[InferMutationAliasingEffects] Expected value for identifier to be initialized`, description: `${printIdentifier(value.identifier)}`, - loc: value.loc, + details: [ + { + kind: 'error', + loc: value.loc, + message: 'Expected value for identifier to be initialized', + }, + ], suggestions: null, }); __classPrivateFieldGet(this, _InferenceState_variables, "f").set(place.identifier.id, new Set(values)); @@ -40098,7 +41215,13 @@ class InferenceState { CompilerError.invariant(values != null, { reason: `[InferMutationAliasingEffects] Expected value for identifier to be initialized`, description: `${printIdentifier(value.identifier)}`, - loc: value.loc, + details: [ + { + kind: 'error', + loc: value.loc, + message: 'Expected value for identifier to be initialized', + }, + ], suggestions: null, }); const prevValues = this.values(place); @@ -40106,9 +41229,15 @@ class InferenceState { } define(place, value) { CompilerError.invariant(__classPrivateFieldGet(this, _InferenceState_values, "f").has(value), { - reason: `[InferMutationAliasingEffects] Expected value to be initialized at '${printSourceLocation(value.loc)}'`, + reason: `[InferMutationAliasingEffects] Expected value to be initialized`, description: printInstructionValue(value), - loc: value.loc, + details: [ + { + kind: 'error', + loc: value.loc, + message: 'Expected value for identifier to be initialized', + }, + ], suggestions: null, }); __classPrivateFieldGet(this, _InferenceState_variables, "f").set(place.identifier.id, new Set([value])); @@ -40726,7 +41855,7 @@ function computeSignatureForInstruction(context, env, instr) { category: ErrorCategory.Globals, reason: 'Cannot reassign variables declared outside of the component/hook', description: `Variable ${variable} is declared outside of the component/hook. Reassigning this value during render is a form of side effect, which can cause unpredictable behavior depending on when the component happens to re-render. If this variable is used in rendering, use useState instead. Otherwise, consider updating it in an effect. (https://react.dev/reference/rules/components-and-hooks-must-be-pure#side-effects-must-run-outside-of-render)`, - }).withDetail({ + }).withDetails({ kind: 'error', loc: instr.loc, message: `${variable} cannot be reassigned`, @@ -40811,7 +41940,7 @@ function computeEffectsForLegacySignature(state, signature, lvalue, receiver, ar ? `\`${signature.canonicalName}\` is an impure function. ` : '') + 'Calling an impure function can produce unstable results that update unpredictably when the component happens to re-render. (https://react.dev/reference/rules/components-and-hooks-must-be-pure#components-and-hooks-must-be-idempotent)', - }).withDetail({ + }).withDetails({ kind: 'error', loc, message: 'Cannot call impure function', @@ -40829,7 +41958,7 @@ function computeEffectsForLegacySignature(state, signature, lvalue, receiver, ar 'However, you may see issues if values from this API are passed to other components/hooks that are ' + 'memoized.', ].join(''), - }).withDetail({ + }).withDetails({ kind: 'error', loc: receiver.loc, message: signature.knownIncompatible, @@ -41256,7 +42385,13 @@ function isKnownMutableEffect(effect) { CompilerError.invariant(false, { reason: 'Unexpected unknown effect', description: null, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], suggestions: null, }); } @@ -41306,7 +42441,13 @@ function mergeValueKinds(a, b) { CompilerError.invariant(a === ValueKind.Primitive && b == ValueKind.Primitive, { reason: `Unexpected value kind in mergeValues()`, description: `Found kinds ${a} and ${b}`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); return ValueKind.Primitive; } @@ -41382,7 +42523,13 @@ class State { CompilerError.invariant(identifierNode !== undefined, { reason: 'Expected identifier to be initialized', description: `[${id}] operand=${printPlace(place)} for identifier declaration ${identifier}`, - loc: place.loc, + details: [ + { + kind: 'error', + loc: place.loc, + message: null, + }, + ], suggestions: null, }); identifierNode.scopes.add(scope.id); @@ -41396,7 +42543,13 @@ function computeMemoizedIdentifiers(state) { CompilerError.invariant(node !== undefined, { reason: `Expected a node for all identifiers, none found for \`${id}\``, description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); if (node.seen) { @@ -41426,7 +42579,13 @@ function computeMemoizedIdentifiers(state) { CompilerError.invariant(node !== undefined, { reason: 'Expected a node for all scopes', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); if (node.seen) { @@ -41900,7 +43059,13 @@ class CollectDependenciesVisitor extends ReactiveFunctionVisitor { CompilerError.invariant(identifierNode !== undefined, { reason: 'Expected identifier to be initialized', description: null, - loc: stmt.terminal.loc, + details: [ + { + kind: 'error', + loc: stmt.terminal.loc, + message: null, + }, + ], suggestions: null, }); for (const scope of scopes) { @@ -41914,7 +43079,13 @@ class CollectDependenciesVisitor extends ReactiveFunctionVisitor { CompilerError.invariant(identifierNode !== undefined, { reason: 'Expected identifier to be initialized', description: null, - loc: reassignment.loc, + details: [ + { + kind: 'error', + loc: reassignment.loc, + message: null, + }, + ], suggestions: null, }); for (const scope of scopes) { @@ -42312,7 +43483,13 @@ class Scopes { CompilerError.invariant(last === next, { reason: 'Mismatch push/pop calls', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); } @@ -42493,7 +43670,14 @@ function inferMutationAliasingRanges(fn, { isFunctionExpression }) { else { CompilerError.invariant(effect.kind === 'Freeze', { reason: `Unexpected '${effect.kind}' effect for MaybeThrow terminal`, - loc: block.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: block.terminal.loc, + message: null, + }, + ], }); } } @@ -42611,7 +43795,14 @@ function inferMutationAliasingRanges(fn, { isFunctionExpression }) { case 'Apply': { CompilerError.invariant(false, { reason: `[AnalyzeFunctions] Expected Apply effects to be replaced with more precise effects`, - loc: effect.function.loc, + description: null, + details: [ + { + kind: 'error', + loc: effect.function.loc, + message: null, + }, + ], }); } case 'MutateTransitive': @@ -42694,7 +43885,14 @@ function inferMutationAliasingRanges(fn, { isFunctionExpression }) { const fromNode = state.nodes.get(from.identifier); CompilerError.invariant(fromNode != null, { reason: `Expected a node to exist for all parameters and context variables`, - loc: into.loc, + description: null, + details: [ + { + kind: 'error', + loc: into.loc, + message: null, + }, + ], }); if (fromNode.lastMutated === mutationIndex) { if (into.identifier.id === fn.returns.identifier.id) { @@ -42971,7 +44169,14 @@ function lowerWithMutationAliasing(fn) { case 'Apply': { CompilerError.invariant(false, { reason: `[AnalyzeFunctions] Expected Apply effects to be replaced with more precise effects`, - loc: effect.function.loc, + description: null, + details: [ + { + kind: 'error', + loc: effect.function.loc, + message: null, + }, + ], }); } case 'Mutate': @@ -43170,7 +44375,7 @@ function extractManualMemoizationArgs(instr, kind, sidemap, errors) { reason: `Expected a callback function to be passed to ${kind}`, description: `Expected a callback function to be passed to ${kind}`, suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: instr.value.loc, message: `Expected a callback function to be passed to ${kind}`, @@ -43183,7 +44388,7 @@ function extractManualMemoizationArgs(instr, kind, sidemap, errors) { reason: `Unexpected spread argument to ${kind}`, description: `Unexpected spread argument to ${kind}`, suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: instr.value.loc, message: `Unexpected spread argument to ${kind}`, @@ -43199,7 +44404,7 @@ function extractManualMemoizationArgs(instr, kind, sidemap, errors) { reason: `Expected the dependency list for ${kind} to be an array literal`, description: `Expected the dependency list for ${kind} to be an array literal`, suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: depsListPlace.loc, message: `Expected the dependency list for ${kind} to be an array literal`, @@ -43215,7 +44420,7 @@ function extractManualMemoizationArgs(instr, kind, sidemap, errors) { reason: `Expected the dependency list to be an array of simple expressions (e.g. \`x\`, \`x.y.z\`, \`x?.y?.z\`)`, description: `Expected the dependency list to be an array of simple expressions (e.g. \`x\`, \`x.y.z\`, \`x?.y?.z\`)`, suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: dep.loc, message: `Expected the dependency list to be an array of simple expressions (e.g. \`x\`, \`x.y.z\`, \`x?.y?.z\`)`, @@ -43274,7 +44479,7 @@ function dropManualMemoization(func) { ? 'React.useMemo' : 'useMemo'} callback doesn't return a value. useMemo is for computing and caching values, not for arbitrary side effects.`, suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: instr.value.loc, message: 'useMemo() callbacks must return a value', @@ -43290,7 +44495,7 @@ function dropManualMemoization(func) { reason: `Expected the first argument to be an inline function expression`, description: `Expected the first argument to be an inline function expression`, suggestions: [], - }).withDetail({ + }).withDetails({ kind: 'error', loc: fnPlace.loc, message: `Expected the first argument to be an inline function expression`, @@ -43377,7 +44582,14 @@ function findOptionalPlaces(fn) { default: { CompilerError.invariant(false, { reason: `Unexpected terminal in optional`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: `Unexpected ${terminal.kind} in optional`, + }, + ], }); } } @@ -43582,7 +44794,13 @@ function inferReactivePlaces(fn) { CompilerError.invariant(false, { reason: 'Unexpected unknown effect', description: null, - loc: operand.loc, + details: [ + { + kind: 'error', + loc: operand.loc, + message: null, + }, + ], suggestions: null, }); } @@ -43940,7 +45158,14 @@ class PropertyPathRegistry { else { CompilerError.invariant(reactive === rootNode.fullPath.reactive, { reason: '[HoistablePropertyLoads] Found inconsistencies in `reactive` flag when deduping identifier reads within the same scope', - loc: identifier.loc, + description: null, + details: [ + { + kind: 'error', + loc: identifier.loc, + message: null, + }, + ], }); } return rootNode; @@ -44069,7 +45294,14 @@ function propagateNonNull(fn, nodes, registry) { if (node == null) { CompilerError.invariant(false, { reason: `Bad node ${nodeId}, kind: ${direction}`, - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); } const neighbors = Array.from(direction === 'backward' @@ -44101,7 +45333,14 @@ function propagateNonNull(fn, nodes, registry) { do { CompilerError.invariant(i++ < 100, { reason: '[CollectHoistablePropertyLoads] fixed point iteration did not terminate after 100 loops', - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); changed = false; for (const [blockId] of fn.body.blocks) { @@ -44120,7 +45359,13 @@ function assertNonNull(value, source) { CompilerError.invariant(value != null, { reason: 'Unexpected null', description: source != null ? `(from ${source})` : null, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); return value; } @@ -44285,11 +45530,24 @@ function matchOptionalTestBlock(terminal, blocks) { CompilerError.invariant(propertyLoad.value.object.identifier.id === terminal.test.identifier.id, { reason: '[OptionalChainDeps] Inconsistent optional chaining property load', description: `Test=${printIdentifier(terminal.test.identifier)} PropertyLoad base=${printIdentifier(propertyLoad.value.object.identifier)}`, - loc: propertyLoad.loc, + details: [ + { + kind: 'error', + loc: propertyLoad.loc, + message: null, + }, + ], }); CompilerError.invariant(storeLocal.value.identifier.id === propertyLoad.lvalue.identifier.id, { reason: '[OptionalChainDeps] Unexpected storeLocal', - loc: propertyLoad.loc, + description: null, + details: [ + { + kind: 'error', + loc: propertyLoad.loc, + message: null, + }, + ], }); if (consequentBlock.terminal.kind !== 'goto' || consequentBlock.terminal.variant !== GotoVariant.Break) { @@ -44300,7 +45558,14 @@ function matchOptionalTestBlock(terminal, blocks) { alternate.instructions[0].value.kind === 'Primitive' && alternate.instructions[1].value.kind === 'StoreLocal', { reason: 'Unexpected alternate structure', - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); return { consequentId: storeLocal.lvalue.place.identifier.id, @@ -44320,7 +45585,14 @@ function traverseOptionalBlock(optional, context, outerAlternate) { if (maybeTest.terminal.kind === 'branch') { CompilerError.invariant(optional.terminal.optional, { reason: '[OptionalChainDeps] Expect base case to be always optional', - loc: optional.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: optional.terminal.loc, + message: null, + }, + ], }); if (maybeTest.instructions.length === 0 || maybeTest.instructions[0].value.kind !== 'LoadLocal') { @@ -44341,7 +45613,14 @@ function traverseOptionalBlock(optional, context, outerAlternate) { CompilerError.invariant(maybeTest.terminal.test.identifier.id === maybeTest.instructions.at(-1).lvalue.identifier.id, { reason: '[OptionalChainDeps] Unexpected test expression', - loc: maybeTest.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: maybeTest.terminal.loc, + message: null, + }, + ], }); baseObject = { identifier: maybeTest.instructions[0].value.place.identifier, @@ -44378,7 +45657,14 @@ function traverseOptionalBlock(optional, context, outerAlternate) { CompilerError.invariant(optional.instructions.length === 0, { reason: '[OptionalChainDeps] Unexpected instructions an inner optional block. ' + 'This indicates that the compiler may be incorrectly concatenating two unrelated optional chains', - loc: optional.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: optional.terminal.loc, + message: null, + }, + ], }); } const matchConsequentResult = matchOptionalTestBlock(test, context.blocks); @@ -44388,7 +45674,13 @@ function traverseOptionalBlock(optional, context, outerAlternate) { CompilerError.invariant(matchConsequentResult.consequentGoto === optional.terminal.fallthrough, { reason: '[OptionalChainDeps] Unexpected optional goto-fallthrough', description: `${matchConsequentResult.consequentGoto} != ${optional.terminal.fallthrough}`, - loc: optional.terminal.loc, + details: [ + { + kind: 'error', + loc: optional.terminal.loc, + message: null, + }, + ], }); const load = { identifier: baseObject.identifier, @@ -44421,7 +45713,14 @@ class ReactiveScopeDependencyTreeHIR { const accessType = i + 1 < path.length && path[i + 1].optional ? 'Optional' : 'NonNull'; CompilerError.invariant(prevAccessType == null || prevAccessType === accessType, { reason: 'Conflicting access types', - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); let nextNode = currNode.properties.get(path[i].property); if (nextNode == null) { @@ -44508,7 +45807,13 @@ _a = ReactiveScopeDependencyTreeHIR, _ReactiveScopeDependencyTreeHIR_hoistableOb CompilerError.invariant(reactive === rootNode.reactive, { reason: '[DeriveMinimalDependenciesHIR] Conflicting reactive root flag', description: `Identifier ${printIdentifier(identifier)}`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); } return rootNode; @@ -44609,7 +45914,14 @@ function propagateScopeDependenciesHIR(fn) { const hoistables = hoistablePropertyLoads.get(scope.id); CompilerError.invariant(hoistables != null, { reason: '[PropagateScopeDependencies] Scope not found in tracked blocks', - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); const tree = new ReactiveScopeDependencyTreeHIR([...hoistables.assumedNonNullObjects].map(o => o.fullPath)); for (const dep of deps) { @@ -44757,7 +46069,14 @@ class DependencyCollectionContext { const scopedDependencies = __classPrivateFieldGet(this, _DependencyCollectionContext_dependencies, "f").value; CompilerError.invariant(scopedDependencies != null, { reason: '[PropagateScopeDeps]: Unexpected scope mismatch', - loc: scope.loc, + description: null, + details: [ + { + kind: 'error', + loc: scope.loc, + message: null, + }, + ], }); __classPrivateFieldSet(this, _DependencyCollectionContext_scopes, __classPrivateFieldGet(this, _DependencyCollectionContext_scopes, "f").pop(), "f"); __classPrivateFieldSet(this, _DependencyCollectionContext_dependencies, __classPrivateFieldGet(this, _DependencyCollectionContext_dependencies, "f").pop(), "f"); @@ -45131,8 +46450,14 @@ function writeOptionalDependency(dep, builder, parentAlternate) { const firstOptional = dep.path.findIndex(path => path.optional); CompilerError.invariant(firstOptional !== -1, { reason: '[ScopeDependencyUtils] Internal invariant broken: expected optional path', - loc: dep.identifier.loc, description: null, + details: [ + { + kind: 'error', + loc: dep.identifier.loc, + message: null, + }, + ], suggestions: null, }); if (firstOptional === dep.path.length - 1) { @@ -45161,7 +46486,13 @@ function writeOptionalDependency(dep, builder, parentAlternate) { CompilerError.invariant(testIdentifier !== null, { reason: 'Satisfy type checker', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); lowerValueToTemporary(builder, { @@ -45414,14 +46745,28 @@ function rewriteSplices(originalBlock, splices, rewriteBlocks) { while (originalInstrs[cursor].id < rewrite.location) { CompilerError.invariant(originalInstrs[cursor].id < originalInstrs[cursor + 1].id, { reason: '[InferEffectDependencies] Internal invariant broken: expected block instructions to be sorted', - loc: originalInstrs[cursor].loc, + description: null, + details: [ + { + kind: 'error', + loc: originalInstrs[cursor].loc, + message: null, + }, + ], }); currBlock.instructions.push(originalInstrs[cursor]); cursor++; } CompilerError.invariant(originalInstrs[cursor].id === rewrite.location, { reason: '[InferEffectDependencies] Internal invariant broken: splice location not found', - loc: originalInstrs[cursor].loc, + description: null, + details: [ + { + kind: 'error', + loc: originalInstrs[cursor].loc, + message: null, + }, + ], }); if (rewrite.kind === 'instr') { currBlock.instructions.push(rewrite.value); @@ -45433,7 +46778,14 @@ function rewriteSplices(originalBlock, splices, rewriteBlocks) { if (blocks.size > 1) { CompilerError.invariant(terminalFallthrough(entryBlock.terminal) === rewrite.exitBlockId, { reason: '[InferEffectDependencies] Internal invariant broken: expected entry block to have a fallthrough', - loc: entryBlock.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: entryBlock.terminal.loc, + message: null, + }, + ], }); const originalTerminal = currBlock.terminal; currBlock.terminal = entryBlock.terminal; @@ -45500,7 +46852,14 @@ function inferMinimalDependencies(fnInstr) { const hoistableToFnEntry = hoistablePropertyLoads.get(fn.body.entry); CompilerError.invariant(hoistableToFnEntry != null, { reason: '[InferEffectDependencies] Internal invariant broken: missing entry block', - loc: fnInstr.loc, + description: null, + details: [ + { + kind: 'error', + loc: fnInstr.loc, + message: null, + }, + ], }); const dependencies = inferDependencies(fnInstr, new Map([...temporaries, ...temporariesReadInOptional]), processedInstrsInOptional); const tree = new ReactiveScopeDependencyTreeHIR([...hoistableToFnEntry.assumedNonNullObjects].map(o => o.fullPath)); @@ -45537,7 +46896,14 @@ function inferDependencies(fnInstr, temporaries, processedInstrsInOptional) { const resultUnfiltered = context.deps.get(placeholderScope); CompilerError.invariant(resultUnfiltered != null, { reason: '[InferEffectDependencies] Internal invariant broken: missing scope dependencies', - loc: fn.loc, + description: null, + details: [ + { + kind: 'error', + loc: fn.loc, + message: null, + }, + ], }); const fnContext = new Set(fn.context.map(dep => dep.identifier.id)); const result = new Set(); @@ -45586,9 +46952,16 @@ function instructionReordering(fn) { } CompilerError.invariant(shared.size === 0, { reason: `InstructionReordering: expected all reorderable nodes to have been emitted`, - loc: (_a = [...shared.values()] - .map(node => { var _a; return (_a = node.instruction) === null || _a === void 0 ? void 0 : _a.loc; }) - .filter(loc => loc != null)[0]) !== null && _a !== void 0 ? _a : GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: (_a = [...shared.values()] + .map(node => { var _a; return (_a = node.instruction) === null || _a === void 0 ? void 0 : _a.loc; }) + .filter(loc => loc != null)[0]) !== null && _a !== void 0 ? _a : GeneratedSource, + message: null, + }, + ], }); markInstructionIds(fn.body); } @@ -45708,7 +47081,13 @@ function reorderBlock(env, block, shared, references) { } CompilerError.invariant(node.reorderability === Reorderability.Reorderable, { reason: `Expected all remaining instructions to be reorderable`, - loc: (_b = (_a = node.instruction) === null || _a === void 0 ? void 0 : _a.loc) !== null && _b !== void 0 ? _b : block.terminal.loc, + details: [ + { + kind: 'error', + loc: (_b = (_a = node.instruction) === null || _a === void 0 ? void 0 : _a.loc) !== null && _b !== void 0 ? _b : block.terminal.loc, + message: null, + }, + ], description: node.instruction != null ? `Instruction [${node.instruction.id}] was not emitted yet but is not reorderable` : `Lvalue $${id} was not emitted yet but is not reorderable`, @@ -45924,7 +47303,14 @@ function alignReactiveScopesToBlockScopesHIR(fn) { }); CompilerError.invariant(!valueBlockNodes.has(fallthrough), { reason: 'Expect hir blocks to have unique fallthroughs', - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); if (node != null) { valueBlockNodes.set(fallthrough, node); @@ -45959,7 +47345,14 @@ function alignReactiveScopesToBlockScopesHIR(fn) { if (node == null) { CompilerError.invariant(fallthrough !== null, { reason: `Expected a fallthrough for value block`, - loc: terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); const fallthroughBlock = fn.body.blocks.get(fallthrough); const nextId = (_b = (_a = fallthroughBlock.instructions[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : fallthroughBlock.terminal.id; @@ -46072,7 +47465,13 @@ function flattenScopesWithHooksOrUseHIR(fn) { CompilerError.invariant(terminal.kind === 'scope', { reason: `Expected block to have a scope terminal`, description: `Expected block bb${block.id} to end in a scope terminal`, - loc: terminal.loc, + details: [ + { + kind: 'error', + loc: terminal.loc, + message: null, + }, + ], }); const body = fn.body.blocks.get(terminal.block); if (body.instructions.length === 1 && @@ -46276,7 +47675,14 @@ let Visitor$2 = class Visitor extends ReactiveFunctionVisitor { visitTerminal(stmt, state) { CompilerError.invariant(state !== 'Create', { reason: "Visiting a terminal statement with state 'Create'", - loc: stmt.terminal.loc, + description: null, + details: [ + { + kind: 'error', + loc: stmt.terminal.loc, + message: null, + }, + ], }); super.visitTerminal(stmt, state); } @@ -46793,7 +48199,13 @@ class Unifier { CompilerError.invariant(type.operands.length > 0, { reason: 'there should be at least one operand', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); let candidateType = null; @@ -47026,10 +48438,16 @@ function visit(identifiers, place, kind) { }); } CompilerError.invariant(false, { - reason: `Expected all references to a variable to be consistently local or context references`, - loc: place.loc, - description: `Identifier ${printPlace(place)} is referenced as a ${kind} variable, but was previously referenced as a ${prev} variable`, + reason: 'Expected all references to a variable to be consistently local or context references', + description: `Identifier ${printPlace(place)} is referenced as a ${kind} variable, but was previously referenced as a ${prev.kind} variable`, suggestions: null, + details: [ + { + kind: 'error', + loc: place.loc, + message: `this is ${prev.kind}`, + }, + ], }); } } @@ -47046,7 +48464,14 @@ function computeUnconditionalBlocks(fn) { while (current !== null && current !== exit) { CompilerError.invariant(!unconditionalBlocks.has(current), { reason: 'Internal error: non-terminating loop in ComputeUnconditionalBlocks', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); unconditionalBlocks.add(current); @@ -47488,8 +48913,14 @@ function makeRefId(id) { CompilerError.invariant(id >= 0 && Number.isInteger(id), { reason: 'Expected identifier id to be a non-negative integer', description: null, - loc: null, suggestions: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); return id; } @@ -47600,19 +49031,40 @@ function tyEqual(a, b) { case 'Guard': CompilerError.invariant(b.kind === 'Guard', { reason: 'Expected ref value', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); return a.refId === b.refId; case 'RefValue': CompilerError.invariant(b.kind === 'RefValue', { reason: 'Expected ref value', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); return a.loc == b.loc; case 'Structure': { CompilerError.invariant(b.kind === 'Structure', { reason: 'Expected structure', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); const fnTypesEqual = (a.fn === null && b.fn === null) || (a.fn !== null && @@ -47645,7 +49097,14 @@ function joinRefAccessTypes(...types) { else { CompilerError.invariant(a.kind === 'Structure' && b.kind === 'Structure', { reason: 'Expected structure', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); const fn = a.fn === null ? b.fn @@ -47835,7 +49294,7 @@ function validateNoRefAccessInRenderImpl(fn, env) { category: ErrorCategory.Refs, reason: 'Cannot access refs during render', description: ERROR_DESCRIPTION, - }).withDetail({ + }).withDetails({ kind: 'error', loc: callee.loc, message: `This function accesses a ref value`, @@ -48001,7 +49460,14 @@ function validateNoRefAccessInRenderImpl(fn, env) { } CompilerError.invariant(!env.hasChanged(), { reason: 'Ref type environment did not converge', - loc: null, + description: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], }); return Ok(joinRefAccessTypes(...returnValues.filter((env) => env !== undefined))); } @@ -48018,7 +49484,7 @@ function guardCheck(errors, operand, env) { category: ErrorCategory.Refs, reason: 'Cannot access refs during render', description: ERROR_DESCRIPTION, - }).withDetail({ + }).withDetails({ kind: 'error', loc: operand.loc, message: `Cannot access ref value during render`, @@ -48034,7 +49500,7 @@ function validateNoRefValueAccess(errors, env, operand) { category: ErrorCategory.Refs, reason: 'Cannot access refs during render', description: ERROR_DESCRIPTION, - }).withDetail({ + }).withDetails({ kind: 'error', loc: (type.kind === 'RefValue' && type.loc) || operand.loc, message: `Cannot access ref value during render`, @@ -48051,7 +49517,7 @@ function validateNoRefPassedToFunction(errors, env, operand, loc) { category: ErrorCategory.Refs, reason: 'Cannot access refs during render', description: ERROR_DESCRIPTION, - }).withDetail({ + }).withDetails({ kind: 'error', loc: (type.kind === 'RefValue' && type.loc) || loc, message: `Passing a ref to a function may read its value during render`, @@ -48065,7 +49531,7 @@ function validateNoRefUpdate(errors, env, operand, loc) { category: ErrorCategory.Refs, reason: 'Cannot access refs during render', description: ERROR_DESCRIPTION, - }).withDetail({ + }).withDetails({ kind: 'error', loc: (type.kind === 'RefValue' && type.loc) || loc, message: `Cannot update ref during render`, @@ -48080,7 +49546,7 @@ function validateNoDirectRefValueAccess(errors, operand, env) { category: ErrorCategory.Refs, reason: 'Cannot access refs during render', description: ERROR_DESCRIPTION, - }).withDetail({ + }).withDetails({ kind: 'error', loc: (_a = type.loc) !== null && _a !== void 0 ? _a : operand.loc, message: `Cannot access ref value during render`, @@ -48128,7 +49594,14 @@ function validateNoSetStateInRenderImpl(fn, unconditionalSetStateFunctions) { case 'StartMemoize': { CompilerError.invariant(activeManualMemoId === null, { reason: 'Unexpected nested StartMemoize instructions', - loc: instr.value.loc, + description: null, + details: [ + { + kind: 'error', + loc: instr.value.loc, + message: null, + }, + ], }); activeManualMemoId = instr.value.manualMemoId; break; @@ -48136,7 +49609,14 @@ function validateNoSetStateInRenderImpl(fn, unconditionalSetStateFunctions) { case 'FinishMemoize': { CompilerError.invariant(activeManualMemoId === instr.value.manualMemoId, { reason: 'Expected FinishMemoize to align with previous StartMemoize instruction', - loc: instr.value.loc, + description: null, + details: [ + { + kind: 'error', + loc: instr.value.loc, + message: null, + }, + ], }); activeManualMemoId = null; break; @@ -48151,7 +49631,7 @@ function validateNoSetStateInRenderImpl(fn, unconditionalSetStateFunctions) { reason: 'Calling setState from useMemo may trigger an infinite loop', description: 'Each time the memo callback is evaluated it will change state. This can cause a memoization dependency to change, running the memo function again and causing an infinite loop. Instead of setting state in useMemo(), prefer deriving the value during render. (https://react.dev/reference/react/useState)', suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: callee.loc, message: 'Found setState() within useMemo()', @@ -48163,7 +49643,7 @@ function validateNoSetStateInRenderImpl(fn, unconditionalSetStateFunctions) { reason: 'Calling setState during render may trigger an infinite loop', description: 'Calling setState during render will trigger another render, and can lead to infinite loops. (https://react.dev/reference/react/useState)', suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: callee.loc, message: 'Found setState() in render', @@ -48275,7 +49755,14 @@ function validateInferredDep(dep, temporaries, declsWithinMemoBlock, validDepsIn else { CompilerError.invariant(((_a = dep.identifier.name) === null || _a === void 0 ? void 0 : _a.kind) === 'named', { reason: 'ValidatePreservedManualMemoization: expected scope dependency to be named', - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], suggestions: null, }); normalizedDep = { @@ -48325,7 +49812,7 @@ function validateInferredDep(dep, temporaries, declsWithinMemoBlock, validDepsIn .join('') .trim(), suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: memoLocation, message: 'Could not preserve existing manual memoization', @@ -48454,7 +49941,13 @@ class Visitor extends ReactiveFunctionVisitor { CompilerError.invariant(state.manualMemoState == null, { reason: 'Unexpected nested StartMemoize instructions', description: `Bad manual memoization ids: ${(_a = state.manualMemoState) === null || _a === void 0 ? void 0 : _a.manualMemoId}, ${value.manualMemoId}`, - loc: value.loc, + details: [ + { + kind: 'error', + loc: value.loc, + message: null, + }, + ], suggestions: null, }); state.manualMemoState = { @@ -48475,7 +49968,7 @@ class Visitor extends ReactiveFunctionVisitor { 'React Compiler has skipped optimizing this component because the existing manual memoization could not be preserved. ', 'This dependency may be mutated later, which could cause the value to change unexpectedly.', ].join(''), - }).withDetail({ + }).withDetails({ kind: 'error', loc, message: 'This dependency may be modified later', @@ -48488,7 +49981,13 @@ class Visitor extends ReactiveFunctionVisitor { state.manualMemoState.manualMemoId === value.manualMemoId, { reason: 'Unexpected mismatch between StartMemoize and FinishMemoize', description: `Encountered StartMemoize id=${(_b = state.manualMemoState) === null || _b === void 0 ? void 0 : _b.manualMemoId} followed by FinishMemoize id=${value.manualMemoId}`, - loc: value.loc, + details: [ + { + kind: 'error', + loc: value.loc, + message: null, + }, + ], suggestions: null, }); const reassignments = state.manualMemoState.reassignments; @@ -48513,7 +50012,7 @@ class Visitor extends ReactiveFunctionVisitor { ] .join('') .trim(), - }).withDetail({ + }).withDetails({ kind: 'error', loc, message: 'Could not preserve existing memoization', @@ -48585,7 +50084,7 @@ function validateUseMemo(fn) { reason: 'useMemo() callbacks may not accept parameters', description: 'useMemo() callbacks are called by React to cache calculations across re-renders. They should not take parameters. Instead, directly reference the props, state, or local variables needed for the computation.', suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc, message: 'Callbacks with parameters are not supported', @@ -48597,7 +50096,7 @@ function validateUseMemo(fn) { reason: 'useMemo() callbacks may not be async or generator functions', description: 'useMemo() callbacks are called once and must synchronously return a value.', suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: body.loc, message: 'Async and generator functions are not supported', @@ -48624,7 +50123,7 @@ function validateLocalsNotReassignedAfterRender(fn) { category: ErrorCategory.Immutability, reason: 'Cannot reassign variable after render completes', description: `Reassigning ${variable} after render has completed can cause inconsistent behavior on subsequent renders. Consider using state instead.`, - }).withDetail({ + }).withDetails({ kind: 'error', loc: reassignment.loc, message: `Cannot reassign ${variable} after render completes`, @@ -48661,7 +50160,7 @@ function getContextReassignment(fn, contextVariables, isFunctionExpression, isAs category: ErrorCategory.Immutability, reason: 'Cannot reassign variable in async function', description: 'Reassigning a variable in an async function can cause inconsistent behavior on subsequent renders. Consider using state instead', - }).withDetail({ + }).withDetails({ kind: 'error', loc: reassignment.loc, message: `Cannot reassign ${variable}`, @@ -48732,7 +50231,14 @@ function getContextReassignment(fn, contextVariables, isFunctionExpression, isAs for (const operand of operands) { CompilerError.invariant(operand.effect !== Effect.Unknown, { reason: `Expected effects to be inferred prior to ValidateLocalsNotReassignedAfterRender`, - loc: operand.loc, + description: null, + details: [ + { + kind: 'error', + loc: operand.loc, + message: '', + }, + ], }); const reassignment = reassigningFunctions.get(operand.identifier.id); if (reassignment !== undefined) { @@ -49058,7 +50564,7 @@ function validateNoSetStateInEffects(fn) { 'Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. ' + '(https://react.dev/learn/you-might-not-need-an-effect)', suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: setState.loc, message: 'Avoid calling setState() directly within an effect', @@ -49118,7 +50624,7 @@ function validateNoJSXInTryStatement(fn) { category: ErrorCategory.ErrorBoundaries, reason: 'Avoid constructing JSX within try/catch', description: `React does not immediately render components when JSX is rendered, so any errors from this component will not be caught by the try/catch. To catch errors in rendering a given component, wrap that component in an error boundary. (https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary)`, - }).withDetail({ + }).withDetails({ kind: 'error', loc: value.loc, message: 'Avoid constructing JSX within try/catch', @@ -49977,7 +51483,7 @@ function validateNoImpureFunctionsInRender(fn) { : '') + 'Calling an impure function can produce unstable results that update unpredictably when the component happens to re-render. (https://react.dev/reference/rules/components-and-hooks-must-be-pure#components-and-hooks-must-be-idempotent)', suggestions: null, - }).withDetail({ + }).withDetails({ kind: 'error', loc: callee.loc, message: 'Cannot call impure function', @@ -50036,12 +51542,12 @@ function validateStaticComponents(fn) { reason: 'Cannot create components during render', description: `Components created during render will reset their state each time they are created. Declare components outside of render. `, }) - .withDetail({ + .withDetails({ kind: 'error', loc: value.tag.loc, message: 'This component is created during render', }) - .withDetail({ + .withDetails({ kind: 'error', loc: location, message: 'The component is created during render here', @@ -50073,12 +51579,12 @@ function validateNoFreezingKnownMutableFunctions(fn) { reason: 'Cannot modify local variables after render completes', description: `This argument is a function which may reassign or mutate ${variable} after render, which can cause inconsistent behavior on subsequent renders. Consider using state instead.`, }) - .withDetail({ + .withDetails({ kind: 'error', loc: operand.loc, message: `This function may (indirectly) reassign or modify ${variable} after render`, }) - .withDetail({ + .withDetails({ kind: 'error', loc: effect.value.loc, message: `This modifies ${variable}`, @@ -50185,7 +51691,14 @@ function validateNoDerivedComputationsInEffects(fn) { var _a; CompilerError.invariant(dep.kind === 'Identifier', { reason: `Dependency is checked as a place above`, - loc: value.loc, + description: null, + details: [ + { + kind: 'error', + loc: value.loc, + message: 'this is checked as a place above', + }, + ], }); return (_a = locals.get(dep.identifier.id)) !== null && _a !== void 0 ? _a : dep.identifier.id; }); @@ -50723,7 +52236,14 @@ function suppressionsToCompilerError(suppressionRanges) { var _a; CompilerError.invariant(suppressionRanges.length !== 0, { reason: `Expected at least suppression comment source range`, - loc: GeneratedSource, + description: null, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); const error = new CompilerError(); for (const suppressionRange of suppressionRanges) { @@ -50761,7 +52281,7 @@ function suppressionsToCompilerError(suppressionRanges) { op: CompilerSuggestionOperation.Remove, }, ], - }).withDetail({ + }).withDetails({ kind: 'error', loc: (_a = suppressionRange.disableComment.loc) !== null && _a !== void 0 ? _a : null, message: 'Found React rule suppression', @@ -50962,7 +52482,13 @@ function insertNewOutlinedFunctionNode(program, originalFn, compiledFn) { CompilerError.invariant(insertedFuncDecl.isFunctionDeclaration(), { reason: 'Expected inserted function declaration', description: `Got: ${insertedFuncDecl}`, - loc: (_c = (_b = insertedFuncDecl.node) === null || _b === void 0 ? void 0 : _b.loc) !== null && _c !== void 0 ? _c : null, + details: [ + { + kind: 'error', + loc: (_c = (_b = insertedFuncDecl.node) === null || _b === void 0 ? void 0 : _b.loc) !== null && _c !== void 0 ? _c : null, + message: null, + }, + ], }); return insertedFuncDecl; } @@ -51015,7 +52541,14 @@ function compileProgram(program, pass) { for (const outlined of compiled.outlined) { CompilerError.invariant(outlined.fn.outlined.length === 0, { reason: 'Unexpected nested outlined functions', - loc: outlined.fn.loc, + description: null, + details: [ + { + kind: 'error', + loc: outlined.fn.loc, + message: null, + }, + ], }); const fn = insertNewOutlinedFunctionNode(program, current.fn, outlined.fn); fn.skip(); @@ -51624,7 +53157,13 @@ function getReactCompilerRuntimeModule(target) { typeof target.runtimeModule === 'string', { reason: 'Expected target to already be validated', description: null, - loc: null, + details: [ + { + kind: 'error', + loc: null, + message: null, + }, + ], suggestions: null, }); return target.runtimeModule; @@ -51773,14 +53312,26 @@ function addImportsToProgram(path, programContext) { CompilerError.invariant(path.scope.getBinding(loweredImport.name) == null, { reason: 'Encountered conflicting import specifiers in generated program', description: `Conflict from import ${loweredImport.module}:(${loweredImport.imported} as ${loweredImport.name}).`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], suggestions: null, }); CompilerError.invariant(loweredImport.module === moduleName && loweredImport.imported === specifierName, { reason: 'Found inconsistent import specifier. This is an internal bug.', description: `Expected import ${moduleName}:${specifierName} but found ${loweredImport.module}:${loweredImport.imported}`, - loc: GeneratedSource, + details: [ + { + kind: 'error', + loc: GeneratedSource, + message: null, + }, + ], }); } const sortedImport = [ @@ -52099,7 +53650,14 @@ function validateImportSpecifier(specifier, importSpecifierChecks, state) { const binding = local.scope.getBinding(local.node.name); CompilerError.invariant(binding != null, { reason: 'Expected binding to be found for import specifier', - loc: (_a = local.node.loc) !== null && _a !== void 0 ? _a : null, + description: null, + details: [ + { + kind: 'error', + loc: (_a = local.node.loc) !== null && _a !== void 0 ? _a : null, + message: null, + }, + ], }); checkFn(binding.referencePaths, state); } @@ -52114,7 +53672,14 @@ function validateNamespacedImport(specifier, importSpecifierChecks, state) { const defaultCheckFn = importSpecifierChecks.get(DEFAULT_EXPORT); CompilerError.invariant(binding != null, { reason: 'Expected binding to be found for import specifier', - loc: (_a = local.node.loc) !== null && _a !== void 0 ? _a : null, + description: null, + details: [ + { + kind: 'error', + loc: (_a = local.node.loc) !== null && _a !== void 0 ? _a : null, + message: null, + }, + ], }); const filteredReferences = new Map(); for (const reference of binding.referencePaths) { diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 42a86927e7..7d17c34dcd 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -60d9b9740d77bd2715f5f725245093a23f95e347 +474f25842a90f67a7aa8c6329afb5faec52181b6 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 42a86927e7..7d17c34dcd 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -60d9b9740d77bd2715f5f725245093a23f95e347 +474f25842a90f67a7aa8c6329afb5faec52181b6 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 025c326d6a..dce5db23c2 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -1418,7 +1418,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.2.0-www-classic-60d9b974-20250906"; + exports.version = "19.2.0-www-classic-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index dd92c11c56..c2c47214ca 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1418,7 +1418,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.2.0-www-modern-60d9b974-20250906"; + exports.version = "19.2.0-www-modern-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 27de4291e4..6cfb20f44c 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -600,4 +600,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-www-classic-60d9b974-20250906"; +exports.version = "19.2.0-www-classic-474f2584-20250906"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 0c8557ac9e..74527d635d 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -600,4 +600,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-www-modern-60d9b974-20250906"; +exports.version = "19.2.0-www-modern-474f2584-20250906"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 12fb106f2c..6a410549cd 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -604,7 +604,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-www-classic-60d9b974-20250906"; +exports.version = "19.2.0-www-classic-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 0903d392fd..da235c7cad 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -604,7 +604,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-www-modern-60d9b974-20250906"; +exports.version = "19.2.0-www-modern-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index f0b295b4e8..43a7d3e102 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -19708,10 +19708,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-www-classic-60d9b974-20250906", + version: "19.2.0-www-classic-474f2584-20250906", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -19745,7 +19745,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.2.0-www-classic-60d9b974-20250906"; + exports.version = "19.2.0-www-classic-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index dacbaa1a7d..e4575d1c2c 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -19479,10 +19479,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-www-modern-60d9b974-20250906", + version: "19.2.0-www-modern-474f2584-20250906", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -19516,7 +19516,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.2.0-www-modern-60d9b974-20250906"; + exports.version = "19.2.0-www-modern-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 97bb1839d2..7387321355 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -11419,10 +11419,10 @@ var slice = Array.prototype.slice, })(React.Component); var internals$jscomp$inline_1631 = { bundleType: 0, - version: "19.2.0-www-classic-60d9b974-20250906", + version: "19.2.0-www-classic-474f2584-20250906", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1632 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -11448,4 +11448,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.2.0-www-classic-60d9b974-20250906"; +exports.version = "19.2.0-www-classic-474f2584-20250906"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 4da3184b62..4a7ef51886 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -11131,10 +11131,10 @@ var slice = Array.prototype.slice, })(React.Component); var internals$jscomp$inline_1604 = { bundleType: 0, - version: "19.2.0-www-modern-60d9b974-20250906", + version: "19.2.0-www-modern-474f2584-20250906", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1605 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -11160,4 +11160,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.2.0-www-modern-60d9b974-20250906"; +exports.version = "19.2.0-www-modern-474f2584-20250906"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 4b97b5c82d..9ed24bdcb1 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -32312,11 +32312,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-www-classic-60d9b974-20250906" !== isomorphicReactPackageVersion) + if ("19.2.0-www-classic-474f2584-20250906" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-www-classic-60d9b974-20250906\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-www-classic-474f2584-20250906\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -32359,10 +32359,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-www-classic-60d9b974-20250906", + version: "19.2.0-www-classic-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -32974,7 +32974,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-www-classic-60d9b974-20250906"; + exports.version = "19.2.0-www-classic-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 661062c932..727d7d5e3e 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -32097,11 +32097,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-www-modern-60d9b974-20250906" !== isomorphicReactPackageVersion) + if ("19.2.0-www-modern-474f2584-20250906" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-www-modern-60d9b974-20250906\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-www-modern-474f2584-20250906\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -32144,10 +32144,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-www-modern-60d9b974-20250906", + version: "19.2.0-www-modern-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -32759,7 +32759,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-www-modern-60d9b974-20250906"; + exports.version = "19.2.0-www-modern-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index b3e7ee6373..3eca7ccb31 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -19780,14 +19780,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_2114 = React.version; if ( - "19.2.0-www-classic-60d9b974-20250906" !== + "19.2.0-www-classic-474f2584-20250906" !== isomorphicReactPackageVersion$jscomp$inline_2114 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2114, - "19.2.0-www-classic-60d9b974-20250906" + "19.2.0-www-classic-474f2584-20250906" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -19805,10 +19805,10 @@ Internals.Events = [ ]; var internals$jscomp$inline_2746 = { bundleType: 0, - version: "19.2.0-www-classic-60d9b974-20250906", + version: "19.2.0-www-classic-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2747 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -20237,4 +20237,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-classic-60d9b974-20250906"; +exports.version = "19.2.0-www-classic-474f2584-20250906"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 33337c754d..329dcd7589 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -19509,14 +19509,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_2104 = React.version; if ( - "19.2.0-www-modern-60d9b974-20250906" !== + "19.2.0-www-modern-474f2584-20250906" !== isomorphicReactPackageVersion$jscomp$inline_2104 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2104, - "19.2.0-www-modern-60d9b974-20250906" + "19.2.0-www-modern-474f2584-20250906" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -19534,10 +19534,10 @@ Internals.Events = [ ]; var internals$jscomp$inline_2728 = { bundleType: 0, - version: "19.2.0-www-modern-60d9b974-20250906", + version: "19.2.0-www-modern-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2729 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -19966,4 +19966,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-modern-60d9b974-20250906"; +exports.version = "19.2.0-www-modern-474f2584-20250906"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index b7443adb98..c50f50f8c6 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -21834,14 +21834,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_2361 = React.version; if ( - "19.2.0-www-classic-60d9b974-20250906" !== + "19.2.0-www-classic-474f2584-20250906" !== isomorphicReactPackageVersion$jscomp$inline_2361 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2361, - "19.2.0-www-classic-60d9b974-20250906" + "19.2.0-www-classic-474f2584-20250906" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -21859,10 +21859,10 @@ Internals.Events = [ ]; var internals$jscomp$inline_2363 = { bundleType: 0, - version: "19.2.0-www-classic-60d9b974-20250906", + version: "19.2.0-www-classic-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; enableSchedulingProfiler && ((internals$jscomp$inline_2363.getLaneLabelMap = getLaneLabelMap), @@ -22295,7 +22295,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-classic-60d9b974-20250906"; +exports.version = "19.2.0-www-classic-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index c9aac377ce..a2f6a4df4d 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -21628,14 +21628,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_2351 = React.version; if ( - "19.2.0-www-modern-60d9b974-20250906" !== + "19.2.0-www-modern-474f2584-20250906" !== isomorphicReactPackageVersion$jscomp$inline_2351 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2351, - "19.2.0-www-modern-60d9b974-20250906" + "19.2.0-www-modern-474f2584-20250906" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -21653,10 +21653,10 @@ Internals.Events = [ ]; var internals$jscomp$inline_2353 = { bundleType: 0, - version: "19.2.0-www-modern-60d9b974-20250906", + version: "19.2.0-www-modern-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; enableSchedulingProfiler && ((internals$jscomp$inline_2353.getLaneLabelMap = getLaneLabelMap), @@ -22089,7 +22089,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-modern-60d9b974-20250906"; +exports.version = "19.2.0-www-modern-474f2584-20250906"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index aa8f03ee07..e96082a0a9 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -10163,5 +10163,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-www-classic-60d9b974-20250906"; + exports.version = "19.2.0-www-classic-474f2584-20250906"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index f4bebca586..9833e35ab0 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -10092,5 +10092,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-www-modern-60d9b974-20250906"; + exports.version = "19.2.0-www-modern-474f2584-20250906"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 428953b57c..4ef21b17f3 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -6892,4 +6892,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-www-classic-60d9b974-20250906"; +exports.version = "19.2.0-www-classic-474f2584-20250906"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 26725a9a5a..609c333e85 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -6825,4 +6825,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-www-modern-60d9b974-20250906"; +exports.version = "19.2.0-www-modern-474f2584-20250906"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 4f888d2bad..d606cc7984 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -32633,11 +32633,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-www-classic-60d9b974-20250906" !== isomorphicReactPackageVersion) + if ("19.2.0-www-classic-474f2584-20250906" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-www-classic-60d9b974-20250906\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-www-classic-474f2584-20250906\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -32680,10 +32680,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-www-classic-60d9b974-20250906", + version: "19.2.0-www-classic-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -33461,5 +33461,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-www-classic-60d9b974-20250906"; + exports.version = "19.2.0-www-classic-474f2584-20250906"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 5b0853f672..deaa066097 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -32418,11 +32418,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-www-modern-60d9b974-20250906" !== isomorphicReactPackageVersion) + if ("19.2.0-www-modern-474f2584-20250906" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-www-modern-60d9b974-20250906\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-www-modern-474f2584-20250906\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -32465,10 +32465,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-www-modern-60d9b974-20250906", + version: "19.2.0-www-modern-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -33246,5 +33246,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-www-modern-60d9b974-20250906"; + exports.version = "19.2.0-www-modern-474f2584-20250906"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index b9fb65a1eb..f9421d1bda 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -20096,14 +20096,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_2143 = React.version; if ( - "19.2.0-www-classic-60d9b974-20250906" !== + "19.2.0-www-classic-474f2584-20250906" !== isomorphicReactPackageVersion$jscomp$inline_2143 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2143, - "19.2.0-www-classic-60d9b974-20250906" + "19.2.0-www-classic-474f2584-20250906" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -20121,10 +20121,10 @@ Internals.Events = [ ]; var internals$jscomp$inline_2780 = { bundleType: 0, - version: "19.2.0-www-classic-60d9b974-20250906", + version: "19.2.0-www-classic-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2781 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -20704,4 +20704,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-classic-60d9b974-20250906"; +exports.version = "19.2.0-www-classic-474f2584-20250906"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 52ba6d1778..2b2e0c258a 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -19825,14 +19825,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_2133 = React.version; if ( - "19.2.0-www-modern-60d9b974-20250906" !== + "19.2.0-www-modern-474f2584-20250906" !== isomorphicReactPackageVersion$jscomp$inline_2133 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2133, - "19.2.0-www-modern-60d9b974-20250906" + "19.2.0-www-modern-474f2584-20250906" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -19850,10 +19850,10 @@ Internals.Events = [ ]; var internals$jscomp$inline_2762 = { bundleType: 0, - version: "19.2.0-www-modern-60d9b974-20250906", + version: "19.2.0-www-modern-474f2584-20250906", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2763 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -20433,4 +20433,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-modern-60d9b974-20250906"; +exports.version = "19.2.0-www-modern-474f2584-20250906"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index a76fc88d97..5a92bc15bb 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -22572,7 +22572,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 1ad95f4861..fedd3f3664 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -22352,7 +22352,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index 24c1c1277f..a9673d2062 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -14163,7 +14163,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index e4a3936520..9bf8e37c7b 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -13880,7 +13880,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 07c79f3a14..1e13247f9f 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -15571,10 +15571,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-www-classic-60d9b974-20250906", + version: "19.2.0-www-classic-474f2584-20250906", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-classic-474f2584-20250906" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15709,5 +15709,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.2.0-www-classic-60d9b974-20250906"; + exports.version = "19.2.0-www-classic-474f2584-20250906"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index e7c2d2b31f..b4d78aa250 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -15571,10 +15571,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-www-modern-60d9b974-20250906", + version: "19.2.0-www-modern-474f2584-20250906", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-60d9b974-20250906" + reconcilerVersion: "19.2.0-www-modern-474f2584-20250906" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15709,5 +15709,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.2.0-www-modern-60d9b974-20250906"; + exports.version = "19.2.0-www-modern-474f2584-20250906"; })(); diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index 21ef8b2de7..fea8ff0b65 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.2.0-www-classic-60d9b974-20250906 \ No newline at end of file +19.2.0-www-classic-474f2584-20250906 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 13e1fd5efb..ae99e987c6 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.2.0-www-modern-60d9b974-20250906 \ No newline at end of file +19.2.0-www-modern-474f2584-20250906 \ No newline at end of file