@samitouri / QOS-React-2 / commits / 7a2609eedc

Cleanup enableBigIntSupport flag (#28711)

Cleanup enableBigIntSupport flag

Jan Kassens committed Apr 3, 2024 at 09:25 UTC 7a2609eedc571049a3272e60d5f7d84601ffca3f
30 files changed +36 -129
packages/react-dom-bindings/src/client/ReactDOMComponent.js
+3 -10
@@ -66,7 +66,6 @@ import {validateProperties as validateUnknownProperties} from '../shared/ReactDO
66 import sanitizeURL from '../shared/sanitizeURL';
67
68 import {
69 - enableBigIntSupport,
69 disableIEWorkarounds,
70 enableTrustedTypesIntegration,
71 enableFilterEmptyStringAttributesDOM,
@@ -370,10 +369,7 @@ function setProp(
369 if (canSetTextContent) {
370 setTextContent(domElement, value);
371 }
373 - } else if (
374 - typeof value === 'number' ||
375 - (enableBigIntSupport && typeof value === 'bigint')
376 - ) {
372 + } else if (typeof value === 'number' || typeof value === 'bigint') {
373 if (__DEV__) {
374 // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
375 validateTextNesting('' + value, tag);
@@ -929,10 +925,7 @@ function setPropOnCustomElement(
925 case 'children': {
926 if (typeof value === 'string') {
927 setTextContent(domElement, value);
932 - } else if (
933 - typeof value === 'number' ||
934 - (enableBigIntSupport && typeof value === 'bigint')
935 - ) {
928 + } else if (typeof value === 'number' || typeof value === 'bigint') {
929 // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
930 setTextContent(domElement, '' + value);
931 }
@@ -2948,7 +2941,7 @@ export function hydrateProperties(
2941 if (
2942 typeof children === 'string' ||
2943 typeof children === 'number' ||
2951 - (enableBigIntSupport && typeof children === 'bigint')
2944 + typeof children === 'bigint'
2945 ) {
2946 if (
2947 // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
packages/react-dom-bindings/src/client/ReactDOMOption.js
+1 -2
@@ -8,7 +8,6 @@
8 */
9
10 import {Children} from 'react';
11 -import {enableBigIntSupport} from 'shared/ReactFeatureFlags';
11
12 let didWarnSelectedSetOnOption = false;
13 let didWarnInvalidChild = false;
@@ -30,7 +29,7 @@ export function validateOptionProps(element: Element, props: Object) {
29 if (
30 typeof child === 'string' ||
31 typeof child === 'number' ||
33 - (enableBigIntSupport && typeof child === 'bigint')
32 + typeof child === 'bigint'
33 ) {
34 return;
35 }
packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
+1 -2
@@ -84,7 +84,6 @@ import {
84 import {retryIfBlockedOn} from '../events/ReactDOMEventReplaying';
85
86 import {
87 - enableBigIntSupport,
87 enableCreateEventHandleAPI,
88 enableScopeAPI,
89 enableTrustedTypesIntegration,
@@ -546,7 +545,7 @@ export function shouldSetTextContent(type: string, props: Props): boolean {
545 type === 'noscript' ||
546 typeof props.children === 'string' ||
547 typeof props.children === 'number' ||
549 - (enableBigIntSupport && typeof props.children === 'bigint') ||
548 + typeof props.children === 'bigint' ||
549 (typeof props.dangerouslySetInnerHTML === 'object' &&
550 props.dangerouslySetInnerHTML !== null &&
551 props.dangerouslySetInnerHTML.__html != null)
packages/react-dom-bindings/src/client/ToStringValue.js
-6
@@ -8,7 +8,6 @@
8 */
9
10 import {checkFormFieldValueStringCoercion} from 'shared/CheckStringCoercion';
11 -import {enableBigIntSupport} from 'shared/ReactFeatureFlags';
11
12 export opaque type ToStringValue =
13 | boolean
@@ -31,11 +30,6 @@ export function toString(value: ToStringValue): string {
30 export function getToStringValue(value: mixed): ToStringValue {
31 switch (typeof value) {
32 case 'bigint':
34 - if (!enableBigIntSupport) {
35 - // bigint is assigned as empty string
36 - return '';
37 - }
38 - // fallthrough for BigInt support
33 case 'boolean':
34 case 'number':
35 case 'string':
packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
+5 -11
@@ -28,7 +28,6 @@ import {
28 import {Children} from 'react';
29
30 import {
31 - enableBigIntSupport,
31 enableFilterEmptyStringAttributesDOM,
32 enableFizzExternalRuntime,
33 } from 'shared/ReactFeatureFlags';
@@ -1664,8 +1663,7 @@ function flattenOptionChildren(children: mixed): string {
1663 !didWarnInvalidOptionChildren &&
1664 typeof child !== 'string' &&
1665 typeof child !== 'number' &&
1667 - ((enableBigIntSupport && typeof child !== 'bigint') ||
1668 - !enableBigIntSupport)
1666 + typeof child !== 'bigint'
1667 ) {
1668 didWarnInvalidOptionChildren = true;
1669 console.error(
@@ -2983,40 +2981,36 @@ function pushTitle(
2981
2982 if (Array.isArray(children) && children.length > 1) {
2983 console.error(
2986 - 'React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an Array with length %s instead.' +
2984 + 'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead.' +
2985 ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value' +
2986 ' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.' +
2987 ' For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop' +
2988 ' is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.',
2991 - enableBigIntSupport ? ', bigint' : '',
2989 children.length,
2990 );
2991 } else if (typeof child === 'function' || typeof child === 'symbol') {
2992 const childType =
2993 typeof child === 'function' ? 'a Function' : 'a Sybmol';
2994 console.error(
2998 - 'React expect children of <title> tags to be a string, number%s, or object with a novel `toString` method but found %s instead.' +
2995 + 'React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead.' +
2996 ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title>' +
2997 ' tags to a single string value.',
3001 - enableBigIntSupport ? ', bigint' : '',
2998 childType,
2999 );
3000 } else if (child && child.toString === {}.toString) {
3001 if (child.$$typeof != null) {
3002 console.error(
3007 - 'React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an object that appears to be' +
3003 + 'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be' +
3004 ' a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to' +
3005 ' be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is' +
3006 ' a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.',
3011 - enableBigIntSupport ? ', bigint' : '',
3007 );
3008 } else {
3009 console.error(
3015 - 'React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an object that does not implement' +
3010 + 'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement' +
3011 ' a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags' +
3012 ' to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title>' +
3013 ' is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.',
3019 - enableBigIntSupport ? ', bigint' : '',
3014 );
3015 }
3016 }
packages/react-dom-bindings/src/server/escapeTextForBrowser.js
+1 -2
@@ -39,7 +39,6 @@
39 */
40
41 import {checkHtmlStringCoercion} from 'shared/CheckStringCoercion';
42 -import {enableBigIntSupport} from 'shared/ReactFeatureFlags';
42
43 const matchHtmlRegExp = /["'&<>]/;
44
@@ -110,7 +109,7 @@ function escapeTextForBrowser(text: string | number | boolean): string {
109 if (
110 typeof text === 'boolean' ||
111 typeof text === 'number' ||
113 - (enableBigIntSupport && typeof text === 'bigint')
112 + typeof text === 'bigint'
113 ) {
114 // this shortcircuit helps perf for types that we know will never have
115 // special characters, especially given that this function is used often
packages/react-dom/src/__tests__/ReactDOMFiber-test.js
-1
@@ -60,7 +60,6 @@ describe('ReactDOMFiber', () => {
60 expect(container.textContent).toEqual('10');
61 });
62
63 - // @gate enableBigIntSupport
63 it('should render bigints as children', async () => {
64 const Box = ({value}) => <div>{value}</div>;
65
packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
+3 -10
@@ -3377,7 +3377,6 @@ describe('ReactDOMFizzServer', () => {
3377 );
3378 });
3379
3380 - // @gate enableBigIntSupport
3380 it('Supports bigint', async () => {
3381 await act(async () => {
3382 const {pipe} = ReactDOMFizzServer.renderToPipeableStream(
@@ -5732,9 +5731,7 @@ describe('ReactDOMFizzServer', () => {
5731 pipe(writable);
5732 });
5733 }).toErrorDev([
5735 - 'React expects the `children` prop of <title> tags to be a string, number' +
5736 - gate(flags => (flags.enableBigIntSupport ? ', bigint' : '')) +
5737 - ', or object with a novel `toString` method but found an Array with length 2 instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.',
5734 + 'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length 2 instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.',
5735 ]);
5736
5737 expect(getVisibleChildren(document.head)).toEqual(<title />);
@@ -5771,9 +5768,7 @@ describe('ReactDOMFizzServer', () => {
5768 pipe(writable);
5769 });
5770 }).toErrorDev([
5774 - 'React expects the `children` prop of <title> tags to be a string, number' +
5775 - gate(flags => (flags.enableBigIntSupport ? ', bigint' : '')) +
5776 - ', or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.',
5771 + 'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.',
5772 ]);
5773 // object titles are toStringed when float is on
5774 expect(getVisibleChildren(document.head)).toEqual(
@@ -5808,9 +5803,7 @@ describe('ReactDOMFizzServer', () => {
5803 pipe(writable);
5804 });
5805 }).toErrorDev([
5811 - 'React expects the `children` prop of <title> tags to be a string, number' +
5812 - gate(flags => (flags.enableBigIntSupport ? ', bigint' : '')) +
5813 - ', or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.',
5806 + 'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.',
5807 ]);
5808 // object titles are toStringed when float is on
5809 expect(getVisibleChildren(document.head)).toEqual(
packages/react-dom/src/__tests__/ReactDOMInput-test.js
-1
@@ -846,7 +846,6 @@ describe('ReactDOMInput', () => {
846 expect(node.value).toBe('0');
847 });
848
849 - // @gate enableBigIntSupport
849 it('should display `value` of bigint 5', async () => {
850 await act(() => {
851 root.render(<input type="text" value={5n} onChange={emptyFunction} />);
packages/react-dom/src/__tests__/ReactDOMOption-test.js
-1
@@ -171,7 +171,6 @@ describe('ReactDOMOption', () => {
171 expect(container.firstChild.value).toBe('hello');
172 });
173
174 - // @gate enableBigIntSupport
174 it('should support bigint values', async () => {
175 const container = await renderIntoDocument(<option>{5n}</option>);
176 expect(container.firstChild.innerHTML).toBe('5');
packages/react-dom/src/__tests__/ReactDOMServerIntegrationBasic-test.js
+2 -6
@@ -74,12 +74,8 @@ describe('ReactDOMServerIntegration', () => {
74
75 itRenders('a bigint', async render => {
76 const e = await render(42n);
77 - if (gate(flags => flags.enableBigIntSupport)) {
78 - expect(e.nodeType).toBe(3);
79 - expect(e.nodeValue).toMatch('42');
80 - } else {
81 - expect(e).toBe(null);
82 - }
77 + expect(e.nodeType).toBe(3);
78 + expect(e.nodeValue).toMatch('42');
79 });
80
81 itRenders('an array with one child', async render => {
packages/react-dom/src/__tests__/ReactDOMServerIntegrationInput-test.js
+2 -9
@@ -32,8 +32,7 @@ function initModules() {
32 };
33 }
34
35 -const {resetModules, itRenders, serverRender, streamRender} =
36 - ReactDOMServerIntegrationUtils(initModules);
35 +const {resetModules, itRenders} = ReactDOMServerIntegrationUtils(initModules);
36
37 // TODO: Run this in React Fire mode after we figure out the SSR behavior.
38 const desc = disableInputAttributeSyncing ? xdescribe : describe;
@@ -49,13 +48,7 @@ desc('ReactDOMServerIntegrationInput', () => {
48
49 itRenders('an input with a bigint value and an onChange', async render => {
50 const e = await render(<input value={5n} onChange={() => {}} />);
52 - expect(e.value).toBe(
53 - gate(flags => flags.enableBigIntSupport) ||
54 - render === serverRender ||
55 - render === streamRender
56 - ? '5'
57 - : '',
58 - );
51 + expect(e.value).toBe('5');
52 });
53
54 itRenders('an input with a value and readOnly', async render => {
packages/react-dom/src/__tests__/ReactDOMServerIntegrationSelect-test.js
+1 -3
@@ -224,9 +224,7 @@ describe('ReactDOMServerIntegrationSelect', () => {
224 </select>,
225 );
226 const option = e.options[0];
227 - expect(option.textContent).toBe(
228 - gate(flags => flags.enableBigIntSupport) ? 'A B 5' : 'A B ',
229 - );
227 + expect(option.textContent).toBe('A B 5');
228 expect(option.value).toBe('bar');
229 expect(option.selected).toBe(true);
230 });
packages/react-dom/src/__tests__/ReactDOMServerIntegrationTextarea-test.js
+2 -9
@@ -30,8 +30,7 @@ function initModules() {
30 };
31 }
32
33 -const {resetModules, itRenders, serverRender, streamRender} =
34 - ReactDOMServerIntegrationUtils(initModules);
33 +const {resetModules, itRenders} = ReactDOMServerIntegrationUtils(initModules);
34
35 describe('ReactDOMServerIntegrationTextarea', () => {
36 beforeEach(() => {
@@ -51,13 +50,7 @@ describe('ReactDOMServerIntegrationTextarea', () => {
50 itRenders('a textarea with a bigint value and an onChange', async render => {
51 const e = await render(<textarea value={5n} onChange={() => {}} />);
52 expect(e.getAttribute('value')).toBe(null);
54 - expect(e.value).toBe(
55 - gate(flags => flags.enableBigIntSupport) ||
56 - render === serverRender ||
57 - render === streamRender
58 - ? '5'
59 - : '',
60 - );
53 + expect(e.value).toBe('5');
54 });
55
56 itRenders('a textarea with a value of undefined', async render => {
packages/react-dom/src/__tests__/ReactDOMTextarea-test.js
-1
@@ -80,7 +80,6 @@ describe('ReactDOMTextarea', () => {
80 expect(node.value).toBe('0');
81 });
82
83 - // @gate enableBigIntSupport
83 it('should display `defaultValue` of bigint 0', async () => {
84 const container = document.createElement('div');
85 const root = ReactDOMClient.createRoot(container);
packages/react-dom/src/__tests__/ReactMultiChildText-test.js
-1
@@ -174,7 +174,6 @@ describe('ReactMultiChildText', () => {
174 ]);
175 });
176
177 - // @gate enableBigIntSupport
177 it('should correctly handle bigint children for render and update', async () => {
178 // prettier-ignore
179 await testAllPermutations([
packages/react-reconciler/src/ReactChildFiber.js
+4 -5
@@ -25,7 +25,6 @@ import {
25 Forked,
26 PlacementDEV,
27 } from './ReactFiberFlags';
28 -import {enableBigIntSupport} from 'shared/ReactFeatureFlags';
28 import {
29 getIteratorFn,
30 REACT_ELEMENT_TYPE,
@@ -658,7 +657,7 @@ function createChildReconciler(
657 if (
658 (typeof newChild === 'string' && newChild !== '') ||
659 typeof newChild === 'number' ||
661 - (enableBigIntSupport && typeof newChild === 'bigint')
660 + typeof newChild === 'bigint'
661 ) {
662 // Text nodes don't have keys. If the previous node is implicitly keyed
663 // we can continue to replace it without aborting even if it is not a text
@@ -780,7 +779,7 @@ function createChildReconciler(
779 if (
780 (typeof newChild === 'string' && newChild !== '') ||
781 typeof newChild === 'number' ||
783 - (enableBigIntSupport && typeof newChild === 'bigint')
782 + typeof newChild === 'bigint'
783 ) {
784 // Text nodes don't have keys. If the previous node is implicitly keyed
785 // we can continue to replace it without aborting even if it is not a text
@@ -905,7 +904,7 @@ function createChildReconciler(
904 if (
905 (typeof newChild === 'string' && newChild !== '') ||
906 typeof newChild === 'number' ||
908 - (enableBigIntSupport && typeof newChild === 'bigint')
907 + typeof newChild === 'bigint'
908 ) {
909 // Text nodes don't have keys, so we neither have to check the old nor
910 // new node for the key. If both are text nodes, they match.
@@ -1722,7 +1721,7 @@ function createChildReconciler(
1721 if (
1722 (typeof newChild === 'string' && newChild !== '') ||
1723 typeof newChild === 'number' ||
1725 - (enableBigIntSupport && typeof newChild === 'bigint')
1724 + typeof newChild === 'bigint'
1725 ) {
1726 return placeSingleChild(
1727 reconcileSingleTextNode(
packages/react-reconciler/src/__tests__/ReactTopLevelText-test.js
-1
@@ -40,7 +40,6 @@ describe('ReactTopLevelText', () => {
40 expect(ReactNoop).toMatchRenderedOutput('10');
41 });
42
43 - // @gate enableBigIntSupport
43 it('should render a component returning bigints directly from render', async () => {
44 const Text = ({value}) => value;
45 ReactNoop.render(<Text value={10n} />);
packages/react-server/src/ReactFizzServer.js
+1 -5
@@ -137,7 +137,6 @@ import {
137 import ReactSharedInternals from 'shared/ReactSharedInternals';
138 import {
139 disableLegacyContext,
140 - enableBigIntSupport,
140 enableScopeAPI,
141 enableSuspenseAvoidThisFallbackFizz,
142 enableCache,
@@ -2323,10 +2322,7 @@ function renderNodeDestructive(
2322 return;
2323 }
2324
2326 - if (
2327 - typeof node === 'number' ||
2328 - (enableBigIntSupport && typeof node === 'bigint')
2329 - ) {
2325 + if (typeof node === 'number' || typeof node === 'bigint') {
2326 const segment = task.blockedSegment;
2327 if (segment === null) {
2328 // We assume a text node doesn't have a representation in the replay set,
packages/react/src/ReactChildren.js
-5
@@ -16,7 +16,6 @@ import type {
16 } from 'shared/ReactTypes';
17
18 import isArray from 'shared/isArray';
19 -import {enableBigIntSupport} from 'shared/ReactFeatureFlags';
19 import {
20 getIteratorFn,
21 REACT_ELEMENT_TYPE,
@@ -165,10 +164,6 @@ function mapIntoArray(
164 } else {
165 switch (type) {
166 case 'bigint':
168 - if (!enableBigIntSupport) {
169 - break;
170 - }
171 - // fallthrough for enabled BigInt support
167 case 'string':
168 case 'number':
169 invokeCallback = true;
packages/react/src/__tests__/ReactChildren-test.js
+10 -26
@@ -188,9 +188,7 @@ describe('ReactChildren', () => {
188 );
189
190 function assertCalls() {
191 - expect(callback).toHaveBeenCalledTimes(
192 - gate(flags => flags.enableBigIntSupport) ? 10 : 9,
193 - );
191 + expect(callback).toHaveBeenCalledTimes(10);
192 expect(callback).toHaveBeenCalledWith(div, 0);
193 expect(callback).toHaveBeenCalledWith(span, 1);
194 expect(callback).toHaveBeenCalledWith(a, 2);
@@ -200,11 +198,7 @@ describe('ReactChildren', () => {
198 expect(callback).toHaveBeenCalledWith(null, 6);
199 expect(callback).toHaveBeenCalledWith(null, 7);
200 expect(callback).toHaveBeenCalledWith(null, 8);
203 - if (gate(flags => flags.enableBigIntSupport)) {
204 - expect(callback).toHaveBeenCalledWith(9n, 9);
205 - } else {
206 - expect(callback).not.toHaveBeenCalledWith(9n, 9);
207 - }
201 + expect(callback).toHaveBeenCalledWith(9n, 9);
202 callback.mockClear();
203 }
204
@@ -217,24 +211,14 @@ describe('ReactChildren', () => {
211 context,
212 );
213 assertCalls();
220 - expect(mappedChildren).toEqual(
221 - gate(flags => flags.enableBigIntSupport)
222 - ? [
223 - <div key=".$divNode" />,
224 - <span key=".1:0:$spanNode" />,
225 - <a key=".2:$aNode" />,
226 - 'string',
227 - 1234,
228 - 9n,
229 - ]
230 - : [
231 - <div key=".$divNode" />,
232 - <span key=".1:0:$spanNode" />,
233 - <a key=".2:$aNode" />,
234 - 'string',
235 - 1234,
236 - ],
237 - );
214 + expect(mappedChildren).toEqual([
215 + <div key=".$divNode" />,
216 + <span key=".1:0:$spanNode" />,
217 + <a key=".2:$aNode" />,
218 + 'string',
219 + 1234,
220 + 9n,
221 + ]);
222 });
223
224 it('should be called for each child in nested structure', () => {
packages/shared/ReactFeatureFlags.js
-2
@@ -161,8 +161,6 @@ export const disableClientCache = false;
161 // Changes Server Components Reconciliation when they have keys
162 export const enableServerComponentKeys = true;
163
164 -export const enableBigIntSupport = true;
165 -
164 /**
165 * Enables a new error detection for infinite render loops from updates caused
166 * by setState or similar outside of the component owning the state.
packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js
-1
@@ -20,7 +20,6 @@
20 export const alwaysThrottleRetries = __VARIANT__;
21 export const consoleManagedByDevToolsDuringStrictMode = __VARIANT__;
22 export const enableAsyncActions = __VARIANT__;
23 -export const enableBigIntSupport = __VARIANT__;
23 export const enableComponentStackLocations = __VARIANT__;
24 export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
25 export const enableInfiniteRenderLoopDetection = __VARIANT__;
packages/shared/forks/ReactFeatureFlags.native-fb.js
-1
@@ -22,7 +22,6 @@ export const {
22 alwaysThrottleRetries,
23 consoleManagedByDevToolsDuringStrictMode,
24 enableAsyncActions,
25 - enableBigIntSupport,
25 enableComponentStackLocations,
26 enableDeferRootSchedulingToMicrotask,
27 enableInfiniteRenderLoopDetection,
packages/shared/forks/ReactFeatureFlags.native-oss.js
-1
@@ -22,7 +22,6 @@ export const enableRefAsProp = __TODO_NEXT_RN_MAJOR__;
22 export const disableStringRefs = __TODO_NEXT_RN_MAJOR__;
23 export const disableLegacyMode = __TODO_NEXT_RN_MAJOR__;
24 export const disableDOMTestUtils = __TODO_NEXT_RN_MAJOR__;
25 -export const enableBigIntSupport = __TODO_NEXT_RN_MAJOR__;
25 export const useModernStrictMode = __TODO_NEXT_RN_MAJOR__;
26 export const enableReactTestRendererWarning = __TODO_NEXT_RN_MAJOR__;
27 export const enableAsyncActions = __TODO_NEXT_RN_MAJOR__;
packages/shared/forks/ReactFeatureFlags.test-renderer.js
-1
@@ -87,7 +87,6 @@ export const enableInfiniteRenderLoopDetection = false;
87 // const __NEXT_MAJOR__ = __EXPERIMENTAL__;
88 export const enableRefAsProp = true;
89 export const disableStringRefs = true;
90 -export const enableBigIntSupport = true;
90 export const disableLegacyMode = true;
91 export const disableLegacyContext = true;
92 export const disableDOMTestUtils = true;
packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
-2
@@ -86,7 +86,5 @@ export const enableReactTestRendererWarning = false;
86 export const disableLegacyMode = false;
87 export const disableDOMTestUtils = false;
88
89 -export const enableBigIntSupport = false;
90 -
89 // Flow magic to verify the exports of this file match the original version.
90 ((((null: any): ExportsType): FeatureFlagsType): ExportsType);
packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
-2
@@ -87,7 +87,5 @@ export const enableReactTestRendererWarning = false;
87 export const disableLegacyMode = false;
88 export const disableDOMTestUtils = false;
89
90 -export const enableBigIntSupport = true;
91 -
90 // Flow magic to verify the exports of this file match the original version.
91 ((((null: any): ExportsType): FeatureFlagsType): ExportsType);
packages/shared/forks/ReactFeatureFlags.www-dynamic.js
-1
@@ -14,7 +14,6 @@
14 // with the __VARIANT__ set to `true`, and once set to `false`.
15
16 export const disableIEWorkarounds = __VARIANT__;
17 -export const enableBigIntSupport = __VARIANT__;
17 export const enableUseRefAccessWarning = __VARIANT__;
18 export const disableSchedulerTimeoutInWorkLoop = __VARIANT__;
19 export const enableLazyContextPropagation = __VARIANT__;
packages/shared/forks/ReactFeatureFlags.www.js
-1
@@ -16,7 +16,6 @@ const dynamicFeatureFlags: DynamicFeatureFlags = require('ReactFeatureFlags');
16
17 export const {
18 disableIEWorkarounds,
19 - enableBigIntSupport,
19 enableTrustedTypesIntegration,
20 enableDebugTracing,
21 enableUseRefAccessWarning,