diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index dac374ec89a05..c026626c9fd8e 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -85de6fde515148babd36eae2b7384ad8e62b732a +fd0511c728e186905b7f0e71f072b4b247d6f29f diff --git a/compiled/facebook-www/ReactFlightDOMRelayClient-dev.classic.js b/compiled/facebook-www/ReactFlightDOMRelayClient-dev.classic.js index 01ece9c61c01c..6209190a6d5d6 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayClient-dev.classic.js +++ b/compiled/facebook-www/ReactFlightDOMRelayClient-dev.classic.js @@ -564,6 +564,11 @@ function parseModelString(response, parentObject, key, value) { return undefined; } + case "n": { + // BigInt + return BigInt(value.substring(2)); + } + default: { // We assume that anything else is a reference ID. var _id3 = parseInt(value.substring(1), 16); diff --git a/compiled/facebook-www/ReactFlightDOMRelayClient-dev.modern.js b/compiled/facebook-www/ReactFlightDOMRelayClient-dev.modern.js index 01ece9c61c01c..6209190a6d5d6 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayClient-dev.modern.js +++ b/compiled/facebook-www/ReactFlightDOMRelayClient-dev.modern.js @@ -564,6 +564,11 @@ function parseModelString(response, parentObject, key, value) { return undefined; } + case "n": { + // BigInt + return BigInt(value.substring(2)); + } + default: { // We assume that anything else is a reference ID. var _id3 = parseInt(value.substring(1), 16); diff --git a/compiled/facebook-www/ReactFlightDOMRelayClient-prod.classic.js b/compiled/facebook-www/ReactFlightDOMRelayClient-prod.classic.js index 2890dc8d2b602..94bc45cb7e132 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayClient-prod.classic.js +++ b/compiled/facebook-www/ReactFlightDOMRelayClient-prod.classic.js @@ -287,6 +287,8 @@ function parseModelString(response, parentObject, key, value) { } case "u": return; + case "n": + return BigInt(value.substring(2)); default: value = parseInt(value.substring(1), 16); response = getChunk(response, value); diff --git a/compiled/facebook-www/ReactFlightDOMRelayClient-prod.modern.js b/compiled/facebook-www/ReactFlightDOMRelayClient-prod.modern.js index 2890dc8d2b602..94bc45cb7e132 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayClient-prod.modern.js +++ b/compiled/facebook-www/ReactFlightDOMRelayClient-prod.modern.js @@ -287,6 +287,8 @@ function parseModelString(response, parentObject, key, value) { } case "u": return; + case "n": + return BigInt(value.substring(2)); default: value = parseInt(value.substring(1), 16); response = getChunk(response, value); diff --git a/compiled/facebook-www/ReactFlightDOMRelayServer-dev.classic.js b/compiled/facebook-www/ReactFlightDOMRelayServer-dev.classic.js index 745cd7062c64f..29aab488a67db 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayServer-dev.classic.js +++ b/compiled/facebook-www/ReactFlightDOMRelayServer-dev.classic.js @@ -1771,6 +1771,10 @@ function serializeUndefined() { return "$undefined"; } +function serializeBigInt(n) { + return "$n" + n.toString(10); +} + function serializeClientReference(request, parent, key, clientReference) { var clientReferenceKey = getClientReferenceKey(clientReference); var writtenClientReferences = request.writtenClientReferences; @@ -2110,12 +2114,7 @@ function resolveModelToJSON(request, parent, key, value) { } if (typeof value === "bigint") { - throw new Error( - "BigInt (" + - value + - ") is not yet supported in Client Component props." + - describeObjectForErrorMessage(parent, key) - ); + return serializeBigInt(value); } throw new Error( diff --git a/compiled/facebook-www/ReactFlightDOMRelayServer-dev.modern.js b/compiled/facebook-www/ReactFlightDOMRelayServer-dev.modern.js index 745cd7062c64f..29aab488a67db 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayServer-dev.modern.js +++ b/compiled/facebook-www/ReactFlightDOMRelayServer-dev.modern.js @@ -1771,6 +1771,10 @@ function serializeUndefined() { return "$undefined"; } +function serializeBigInt(n) { + return "$n" + n.toString(10); +} + function serializeClientReference(request, parent, key, clientReference) { var clientReferenceKey = getClientReferenceKey(clientReference); var writtenClientReferences = request.writtenClientReferences; @@ -2110,12 +2114,7 @@ function resolveModelToJSON(request, parent, key, value) { } if (typeof value === "bigint") { - throw new Error( - "BigInt (" + - value + - ") is not yet supported in Client Component props." + - describeObjectForErrorMessage(parent, key) - ); + return serializeBigInt(value); } throw new Error( diff --git a/compiled/facebook-www/ReactFlightDOMRelayServer-prod.classic.js b/compiled/facebook-www/ReactFlightDOMRelayServer-prod.classic.js index 7a0878bee561c..ebc5e938ee469 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayServer-prod.classic.js +++ b/compiled/facebook-www/ReactFlightDOMRelayServer-prod.classic.js @@ -909,13 +909,7 @@ function resolveModelToJSON(request, parent, key, value) { element.set(value, key); return "$" + key.toString(16); } - if ("bigint" === typeof value) - throw Error( - "BigInt (" + - value + - ") is not yet supported in Client Component props." + - describeObjectForErrorMessage(parent, key) - ); + if ("bigint" === typeof value) return "$n" + value.toString(10); throw Error( "Type " + typeof value + diff --git a/compiled/facebook-www/ReactFlightDOMRelayServer-prod.modern.js b/compiled/facebook-www/ReactFlightDOMRelayServer-prod.modern.js index 7a0878bee561c..ebc5e938ee469 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayServer-prod.modern.js +++ b/compiled/facebook-www/ReactFlightDOMRelayServer-prod.modern.js @@ -909,13 +909,7 @@ function resolveModelToJSON(request, parent, key, value) { element.set(value, key); return "$" + key.toString(16); } - if ("bigint" === typeof value) - throw Error( - "BigInt (" + - value + - ") is not yet supported in Client Component props." + - describeObjectForErrorMessage(parent, key) - ); + if ("bigint" === typeof value) return "$n" + value.toString(10); throw Error( "Type " + typeof value +