Skip to content

Commit 3c5b65c

Browse files
pietervfacebook-github-bot
authored andcommitted
Deploy 0.254.0 to xplat
Reviewed By: SamChou19815 Differential Revision: D66278779 fbshipit-source-id: 01dec1dc844607afa8f650c5acdebc6d5d5739d2
1 parent b65f53d commit 3c5b65c

7 files changed

Lines changed: 32 additions & 6 deletions

File tree

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ untyped-import
4242
untyped-type-import
4343

4444
[version]
45-
^0.253.0
45+
^0.254.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"eslint-plugin-relay": "1.8.3",
6161
"eslint-plugin-relay-internal": "link:./packages/eslint-plugin-relay-internal",
6262
"fbjs": "^3.0.2",
63-
"flow-bin": "^0.253.0",
63+
"flow-bin": "^0.254.0",
6464
"glob": "^7.1.1",
6565
"graphql": "15.3.0",
6666
"gulp": "4.0.2",

packages/react-relay/__tests__/LiveResolvers-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ test('Outer resolvers do not overwrite subscriptions made by inner resolvers (re
403403
});
404404

405405
TestRenderer.act(() => jest.runAllImmediates());
406+
// $FlowFixMe[incompatible-use]
406407
expect(renderer.toJSON()).toEqual(null);
407408

408409
// Calling increment here should be ignored by Relay. However, if there are
@@ -411,19 +412,22 @@ test('Outer resolvers do not overwrite subscriptions made by inner resolvers (re
411412
GLOBAL_STORE.dispatch({type: 'INCREMENT'});
412413
});
413414
TestRenderer.act(() => jest.runAllImmediates());
415+
// $FlowFixMe[incompatible-use]
414416
expect(renderer.toJSON()).toEqual(null);
415417

416418
// Revering optimistic update puts inner back into a state where its
417419
// fragment is valid. HOWEVER, if a dangling subscription has marked inner
418420
// as dirty, we will try to read from a LiveValue that does not exist.
419421
TestRenderer.act(() => update.dispose());
422+
// $FlowFixMe[incompatible-use]
420423
expect(renderer.toJSON()).toEqual('1');
421424

422425
// Not part of the repro, but just to confirm: We should now be resubscribed...
423426
TestRenderer.act(() => {
424427
GLOBAL_STORE.dispatch({type: 'INCREMENT'});
425428
});
426429
TestRenderer.act(() => jest.runAllImmediates());
430+
// $FlowFixMe[incompatible-use]
427431
expect(renderer.toJSON()).toEqual('2');
428432
});
429433

@@ -496,6 +500,7 @@ test("Resolvers without fragments aren't reevaluated when their parent record up
496500
TestRenderer.act(() => jest.runAllImmediates());
497501

498502
expect(counterNoFragmentResolver.callCount).toBe(initialCallCount + 1);
503+
// $FlowFixMe[incompatible-use]
499504
expect(renderer.toJSON()).toEqual('0');
500505
});
501506

@@ -561,10 +566,12 @@ test('Can suspend', () => {
561566
});
562567
// If do not trigger `act` here, the renderer is still `0`. Probably, a React thing...
563568
TestRenderer.act(() => jest.runAllImmediates());
569+
// $FlowFixMe[incompatible-use]
564570
expect(renderer.toJSON()).toEqual('Loading...');
565571
TestRenderer.act(() => {
566572
GLOBAL_STORE.dispatch({type: 'INCREMENT'});
567573
});
574+
// $FlowFixMe[incompatible-use]
568575
expect(renderer.toJSON()).toEqual('2');
569576
});
570577

@@ -633,10 +640,12 @@ test('Can suspend with resolver that uses live resolver', () => {
633640
});
634641
// If do not trigger `act` here, the renderer is still `0`. Probably, a React thing...
635642
TestRenderer.act(() => jest.runAllImmediates());
643+
// $FlowFixMe[incompatible-use]
636644
expect(renderer.toJSON()).toEqual('Loading...');
637645
TestRenderer.act(() => {
638646
GLOBAL_STORE.dispatch({type: 'INCREMENT'});
639647
});
648+
// $FlowFixMe[incompatible-use]
640649
expect(renderer.toJSON()).toEqual('Alice 2');
641650
TestRenderer.act(() => {
642651
const operationDescriptor = createOperationDescriptor(
@@ -647,6 +656,7 @@ test('Can suspend with resolver that uses live resolver', () => {
647656
me: {id: '1', name: 'Bob', __typename: 'User'},
648657
});
649658
});
659+
// $FlowFixMe[incompatible-use]
650660
expect(renderer.toJSON()).toEqual('Bob 2');
651661
});
652662

@@ -1444,10 +1454,12 @@ describe('client-only fragments', () => {
14441454
GLOBAL_STORE.dispatch({type: 'INCREMENT'});
14451455
});
14461456
TestRenderer.act(() => jest.runAllImmediates());
1457+
// $FlowFixMe[incompatible-use]
14471458
expect(renderer.toJSON()).toEqual('Loading...');
14481459
TestRenderer.act(() => {
14491460
GLOBAL_STORE.dispatch({type: 'INCREMENT'});
14501461
});
1462+
// $FlowFixMe[incompatible-use]
14511463
expect(renderer.toJSON()).toEqual('2');
14521464
});
14531465

@@ -1477,6 +1489,7 @@ describe('client-only fragments', () => {
14771489
GLOBAL_STORE.dispatch({type: 'INCREMENT'});
14781490
});
14791491
TestRenderer.act(() => jest.runAllImmediates());
1492+
// $FlowFixMe[incompatible-use]
14801493
expect(renderer.toJSON()).toEqual('Loading...');
14811494
environment.applyUpdate({
14821495
storeUpdater: store => {
@@ -1490,6 +1503,7 @@ describe('client-only fragments', () => {
14901503
}).toThrowError(
14911504
'Unexpected LiveState value returned from Relay Resolver internal field `RELAY_RESOLVER_LIVE_STATE_VALUE`. It is likely a bug in Relay, or a corrupt state of the relay store state Field Path `counter_suspends_when_odd`. Record `{"__id":"client:1:counter_suspends_when_odd","__typename":"__RELAY_RESOLVER__","__resolverError":null,"__resolverValue":{"__LIVE_RESOLVER_SUSPENSE_SENTINEL":true},"__resolverLiveStateDirty":true}`.',
14921505
);
1506+
// $FlowFixMe[incompatible-use]
14931507
expect(renderer.toJSON()).toEqual('Loading...');
14941508
});
14951509
});

packages/react-relay/__tests__/RelayResolverModel-test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ describe.each([['New', useFragment]])(
282282
completeTodo('todo-1');
283283
jest.runAllImmediates();
284284
});
285+
// $FlowFixMe[incompatible-use]
285286
expect(renderer.toJSON()).toEqual('Test todo - green');
286287
});
287288

@@ -328,13 +329,15 @@ describe.each([['New', useFragment]])(
328329
});
329330
expect(LiveColorSubscriptions.activeSubscriptions.length).toBe(1);
330331

332+
// $FlowFixMe[incompatible-use]
331333
expect(renderer.toJSON()).toEqual('Test todo - green');
332334

333335
TestRenderer.act(() => {
334336
removeTodo('todo-1');
335337
jest.runAllImmediates();
336338
});
337339

340+
// $FlowFixMe[incompatible-use]
338341
expect(renderer.toJSON()).toEqual(null);
339342
// Run GC to will remove "orphan" records and unsubscribe if they have live resolver subscriptions
340343
store.scheduleGC();
@@ -378,6 +381,7 @@ describe.each([['New', useFragment]])(
378381
changeDescription('todo-1', 'Changed todo description text');
379382
jest.runAllImmediates();
380383
});
384+
// $FlowFixMe[incompatible-use]
381385
expect(renderer.toJSON()).toEqual('[x] Changed todo description text');
382386
});
383387

@@ -671,13 +675,15 @@ describe.each([['New', useFragment]])(
671675
setIsHuman(false);
672676
jest.runAllImmediates();
673677
});
678+
// $FlowFixMe[incompatible-use]
674679
expect(renderer.toJSON()).toEqual('robot:0');
675680

676681
TestRenderer.act(() => {
677682
chargeBattery();
678683
setIsHuman(true);
679684
jest.runAllImmediates();
680685
});
686+
// $FlowFixMe[incompatible-use]
681687
expect(renderer.toJSON()).toEqual('human:0');
682688

683689
TestRenderer.act(() => {

packages/react-relay/relay-hooks/__tests__/LazyLoadEntryPointContainer_DEEPRECATED-test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ it.skip('suspends then updates when the query and component load', () => {
269269
expect(entryPoint.root.load).toBeCalledTimes(1);
270270
expect(receivedProps).not.toBe(null);
271271
expect(receivedProps?.props).toBe(otherProps);
272+
// $FlowFixMe[incompatible-use]
272273
expect(renderer.toJSON()).toEqual('Zuck');
273274
});
274275

@@ -355,6 +356,7 @@ it('re-renders without reloading when non-prefetch props change', () => {
355356
</RelayEnvironmentProvider>,
356357
);
357358
});
359+
// $FlowFixMe[incompatible-use]
358360
expect(renderer.toJSON()).toEqual('Zuck');
359361
expect(Component).toBeCalledTimes(2);
360362
expect(entryPoint.getPreloadProps).toBeCalledTimes(1);
@@ -404,6 +406,7 @@ it.skip('re-renders and reloads when prefetch params change', () => {
404406
</RelayEnvironmentProvider>,
405407
);
406408
});
409+
// $FlowFixMe[incompatible-use]
407410
expect(renderer.toJSON()).toEqual('Fallback');
408411
expect(Component).toBeCalledTimes(2);
409412
expect(entryPoint.getPreloadProps).toBeCalledTimes(2);
@@ -422,6 +425,7 @@ it.skip('re-renders and reloads when prefetch params change', () => {
422425
});
423426
dataSource.complete();
424427
TestRenderer.act(() => jest.runAllImmediates());
428+
// $FlowFixMe[incompatible-use]
425429
expect(renderer.toJSON()).toEqual('Mark');
426430
});
427431

packages/react-relay/relay-hooks/__tests__/useEntryPointLoader-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ it('disposes all entry points if the callback is called, the component suspends,
558558
entryPointLoaderCallback({});
559559
});
560560
const secondDispose = dispose;
561+
// $FlowFixMe[incompatible-use]
561562
expect(outerInstance.toJSON()).toEqual('fallback');
562563

563564
// TODO(T19754110): This fails in OSS where we have concurrent mode, but might
@@ -609,6 +610,7 @@ it('disposes all entry points if the component suspends, another entry point is
609610
// *even though the component is in a suspended state.* As such, it commits and
610611
// the entry point is disposed.
611612
expect(renderCount).toBeLessThanOrEqual(2);
613+
// $FlowFixMe[incompatible-use]
612614
expect(outerInstance.toJSON()).toEqual('fallback');
613615
expect(dispose).not.toHaveBeenCalled();
614616
ReactTestRenderer.act(() => outerInstance.unmount());

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,10 +3864,10 @@ flatted@^3.1.0:
38643864
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2"
38653865
integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==
38663866

3867-
flow-bin@^0.253.0:
3868-
version "0.253.0"
3869-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.253.0.tgz#5b5150ad9a68560c1b8ace225b7d30e1a6469346"
3870-
integrity sha512-D1EY3n+YNTG9PK15VGHuwxTPMJncUizVDjFS7vm6mIj1qoo7DDDMa8poEgpuZS0yKVBMWoM2IXlWYyZ9v5MVvg==
3867+
flow-bin@^0.254.0:
3868+
version "0.254.0"
3869+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.254.0.tgz#8d35c0f8ff3700215b63c55f520079ef7e602d13"
3870+
integrity sha512-JqnsagGayC1u6yWQGkwbiaDV7FqUTL4Hle3/bgsjxStD/nTn9/qFz5jF9l4Lus8zyzIM21mm822MijBwBnEKdA==
38713871

38723872
flush-write-stream@^1.0.2:
38733873
version "1.1.1"

0 commit comments

Comments
 (0)