react-relay 0.0.0-main-e45fc4f4 → 0.0.0-main-84ea7a01

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-e45fc4f4
2
+ * Relay v0.0.0-main-84ea7a01
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
@@ -752,7 +752,7 @@ function createContainerWithFragments<
752
752
  }
753
753
 
754
754
  _fetchPage(
755
- paginatingVariables: $ReadOnly<{
755
+ paginatingVariables: Readonly<{
756
756
  count: number,
757
757
  cursor: ?string,
758
758
  totalCount: number,
@@ -61,7 +61,7 @@ const queryRendererContext: ReactRelayQueryRendererContextType = {
61
61
  rootIsQueryRenderer: true,
62
62
  };
63
63
 
64
- export type Props = $ReadOnly<{
64
+ export type Props = Readonly<{
65
65
  cacheConfig?: ?CacheConfig,
66
66
  fetchPolicy?: 'store-and-network' | 'network-only',
67
67
  environment: IEnvironment,
package/hooks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-e45fc4f4
2
+ * Relay v0.0.0-main-84ea7a01
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-e45fc4f4
2
+ * Relay v0.0.0-main-84ea7a01
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/legacy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-e45fc4f4
2
+ * Relay v0.0.0-main-84ea7a01
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
@@ -17,7 +17,7 @@ const RelayEnvironmentProvider = require('../relay-hooks/RelayEnvironmentProvide
17
17
  const useRelayActorEnvironment = require('./useRelayActorEnvironment');
18
18
  const React = require('react');
19
19
 
20
- export opaque type ActorChangePoint<TFragmentRef> = $ReadOnly<{
20
+ export opaque type ActorChangePoint<TFragmentRef> = Readonly<{
21
21
  __fragmentRef: TFragmentRef,
22
22
  __viewer: ActorIdentifier,
23
23
  }>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-relay",
3
3
  "description": "A framework for building GraphQL-driven React applications.",
4
- "version": "0.0.0-main-e45fc4f4",
4
+ "version": "0.0.0-main-84ea7a01",
5
5
  "keywords": [
6
6
  "graphql",
7
7
  "relay",
@@ -20,7 +20,7 @@
20
20
  "fbjs": "^3.0.2",
21
21
  "invariant": "^2.2.4",
22
22
  "nullthrows": "^1.1.1",
23
- "relay-runtime": "0.0.0-main-e45fc4f4"
23
+ "relay-runtime": "0.0.0-main-84ea7a01"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^16.9.0 || ^17 || ^18 || ^19"
@@ -132,7 +132,7 @@ export type EntryPoint<
132
132
  -TEntryPointParams,
133
133
  // $FlowExpectedError[unclear-type] accepts any root component
134
134
  +TEntryPointComponent: EntryPointComponent<any, any, any, any, any>,
135
- > = $ReadOnly<{
135
+ > = Readonly<{
136
136
  getPreloadProps: (
137
137
  entryPointParams: TEntryPointParams,
138
138
  ) => PreloadProps<
@@ -149,7 +149,7 @@ export type EntryPointProps<
149
149
  TPreloadedEntryPoints = {},
150
150
  TRuntimeProps = {},
151
151
  TExtraProps = null,
152
- > = $ReadOnly<{
152
+ > = Readonly<{
153
153
  entryPoints: TPreloadedEntryPoints,
154
154
  extraProps: TExtraProps | null,
155
155
  props: TRuntimeProps,
@@ -195,7 +195,7 @@ export type PreloadProps<
195
195
  TPreloadedEntryPoints: {...},
196
196
  TExtraProps = null,
197
197
  TEnvironmentProviderOptions = EnvironmentProviderOptions,
198
- > = $ReadOnly<{
198
+ > = Readonly<{
199
199
  entryPoints?: {
200
200
  +[K in keyof TPreloadedEntryPoints]?: ?ThinNestedEntryPointParams,
201
201
  },
@@ -204,7 +204,7 @@ export type PreloadProps<
204
204
  }>;
205
205
 
206
206
  // Return type of `loadEntryPoint(...)`
207
- export type PreloadedEntryPoint<TEntryPointComponent> = $ReadOnly<{
207
+ export type PreloadedEntryPoint<TEntryPointComponent> = Readonly<{
208
208
  dispose: () => void,
209
209
  entryPoints: ElementConfig<TEntryPointComponent>['entryPoints'],
210
210
  extraProps: ElementConfig<TEntryPointComponent>['extraProps'],
@@ -232,7 +232,7 @@ export type EntryPointElementConfig<
232
232
  export type ThinQueryParams<
233
233
  +TQuery: OperationType,
234
234
  TEnvironmentProviderOptions,
235
- > = $ReadOnly<{
235
+ > = Readonly<{
236
236
  environmentProviderOptions?: ?TEnvironmentProviderOptions,
237
237
  options?: ?PreloadOptions,
238
238
  parameters: PreloadableConcreteRequest<TQuery>,
@@ -283,6 +283,6 @@ export type RootComponentRenders<+C: component(...any)> =
283
283
 
284
284
  export type PreloadParamsOf<T> = Parameters<T['getPreloadProps']>[0];
285
285
 
286
- export type IEnvironmentProvider<TOptions> = $ReadOnly<{
286
+ export type IEnvironmentProvider<TOptions> = Readonly<{
287
287
  getEnvironment: (options: ?TOptions) => IEnvironment,
288
288
  }>;
@@ -26,7 +26,7 @@ const React = require('react');
26
26
  const {useContext, useEffect, useMemo} = require('react');
27
27
  const {stableCopy} = require('relay-runtime');
28
28
 
29
- type PreloadedEntryPoint<TEntryPointComponent> = $ReadOnly<{
29
+ type PreloadedEntryPoint<TEntryPointComponent> = Readonly<{
30
30
  entryPoints: React.ElementConfig<TEntryPointComponent>['entryPoints'],
31
31
  extraProps: React.ElementConfig<TEntryPointComponent>['extraProps'],
32
32
  getComponent: () => TEntryPointComponent,
@@ -40,8 +40,8 @@ type EntryPointContainerProps<
40
40
  TPreloadedEntryPoints,
41
41
  TRuntimeProps,
42
42
  TExtraProps,
43
- > = $ReadOnly<
44
- $ReadOnly<{
43
+ > = Readonly<
44
+ Readonly<{
45
45
  entryPoint: EntryPoint<
46
46
  TEntryPointParams,
47
47
  EntryPointComponent<
@@ -25,7 +25,7 @@ import type {
25
25
  * to construct a `ThinNestedEntryPointParams` is by calling this function.
26
26
  */
27
27
  declare function NestedRelayEntryPoint<TEntryPointParams>(
28
- $ReadOnly<{
28
+ Readonly<{
29
29
  entryPoint: EntryPoint<TEntryPointParams, $FlowFixMe>,
30
30
  entryPointParams: TEntryPointParams,
31
31
  }>,
@@ -22,7 +22,7 @@ const React = require('react');
22
22
 
23
23
  const {useMemo} = React;
24
24
 
25
- type Props<TChildren> = $ReadOnly<{
25
+ type Props<TChildren> = Readonly<{
26
26
  children: TChildren,
27
27
  environment: IEnvironment,
28
28
  getEnvironmentForActor?: ?(
@@ -19,7 +19,7 @@ import type {
19
19
  EntryPointProps,
20
20
  } from '../../EntryPointTypes.flow';
21
21
 
22
- type MyComponentOtherProps = $ReadOnly<{
22
+ type MyComponentOtherProps = Readonly<{
23
23
  foo: string,
24
24
  }>;
25
25
 
@@ -27,7 +27,7 @@ type MyComponentProps = EntryPointProps<{}, {}, MyComponentOtherProps, {}>;
27
27
 
28
28
  const MyComponent = (_props: MyComponentProps) => null;
29
29
 
30
- type PreloadParams = $ReadOnly<{}>;
30
+ type PreloadParams = Readonly<{}>;
31
31
 
32
32
  type MyComponentEntryPointType = EntryPoint<PreloadParams, typeof MyComponent>;
33
33
 
@@ -29,7 +29,7 @@ type NestedEntrypointComponentProps = EntryPointProps<{}>;
29
29
  const NestedEntrypointComponent = (_props: NestedEntrypointComponentProps) =>
30
30
  null;
31
31
 
32
- type NestedEntrypointPreloadParams = $ReadOnly<{
32
+ type NestedEntrypointPreloadParams = Readonly<{
33
33
  subEntrypointPreloadParam: string,
34
34
  }>;
35
35
 
@@ -47,7 +47,7 @@ const NestedEntryPoint = {
47
47
 
48
48
  // Define the parent entrypoint's component
49
49
 
50
- type PreloadedEntrypoints = $ReadOnly<{
50
+ type PreloadedEntrypoints = Readonly<{
51
51
  nestedComponent: PreloadedEntryPoint<typeof NestedEntrypointComponent>,
52
52
  }>;
53
53
 
@@ -61,7 +61,7 @@ const ParentEntrypointComponent = (_props: ParentEntrypointComponentProps) =>
61
61
  * INCORRECT params passed into the nested entrypoints.
62
62
  */
63
63
 
64
- type BadParentEntrypointParams = $ReadOnly<{}>;
64
+ type BadParentEntrypointParams = Readonly<{}>;
65
65
 
66
66
  ({
67
67
  getPreloadProps(_params: BadParentEntrypointParams) {
@@ -86,7 +86,7 @@ type BadParentEntrypointParams = $ReadOnly<{}>;
86
86
  * CORRECT params passed into the nested entrypoints.
87
87
  */
88
88
 
89
- type GoodParentEntrypointParams = $ReadOnly<{}>;
89
+ type GoodParentEntrypointParams = Readonly<{}>;
90
90
 
91
91
  ({
92
92
  getPreloadProps(_params: GoodParentEntrypointParams) {
@@ -49,7 +49,7 @@ const pendingQueriesByEnvironment = WEAKMAP_SUPPORTED
49
49
  : new Map<IEnvironment, Map<string, PendingQueryEntry>>();
50
50
 
51
51
  type PendingQueryEntry =
52
- | $ReadOnly<{
52
+ | Readonly<{
53
53
  cacheKey: string,
54
54
  fetchKey: ?string | ?number,
55
55
  fetchPolicy: PreloadFetchPolicy,
@@ -60,7 +60,7 @@ type PendingQueryEntry =
60
60
  subject: ReplaySubject<GraphQLResponse>,
61
61
  subscription: Subscription,
62
62
  }>
63
- | $ReadOnly<{
63
+ | Readonly<{
64
64
  cacheKey: string,
65
65
  fetchKey: ?string | ?number,
66
66
  fetchPolicy: PreloadFetchPolicy,
@@ -41,7 +41,7 @@ type FragmentQueryOptions = {
41
41
  networkCacheConfig?: ?CacheConfig,
42
42
  };
43
43
 
44
- type FragmentState = $ReadOnly<
44
+ type FragmentState = Readonly<
45
45
  | {kind: 'bailout'}
46
46
  | {kind: 'singular', snapshot: Snapshot, epoch: number}
47
47
  | {kind: 'plural', snapshots: $ReadOnlyArray<Snapshot>, epoch: number},
@@ -47,7 +47,7 @@ type FragmentQueryOptions = {
47
47
  networkCacheConfig?: ?CacheConfig,
48
48
  };
49
49
 
50
- type FragmentState = $ReadOnly<
50
+ type FragmentState = Readonly<
51
51
  | {kind: 'bailout'}
52
52
  | {kind: 'singular', snapshot: Snapshot, epoch: number}
53
53
  | {kind: 'plural', snapshots: $ReadOnlyArray<Snapshot>, epoch: number},
@@ -47,7 +47,7 @@ export type FragmentQueryOptions = {
47
47
  networkCacheConfig?: ?CacheConfig,
48
48
  };
49
49
 
50
- type FragmentState = $ReadOnly<
50
+ type FragmentState = Readonly<
51
51
  | {kind: 'bailout', environment: IEnvironment}
52
52
  | {
53
53
  kind: 'singular',
@@ -33,7 +33,7 @@ const React = require('react');
33
33
 
34
34
  const {useContext, useEffect, useState, useRef} = React;
35
35
 
36
- export type LazyLoadQueryNodeParamsWithQuery = $ReadOnly<{
36
+ export type LazyLoadQueryNodeParamsWithQuery = Readonly<{
37
37
  query: OperationDescriptor,
38
38
  componentDisplayName: string,
39
39
  fetchObservable: Observable<GraphQLResponse>,
@@ -46,7 +46,7 @@ export type LazyLoadQueryNodeParamsWithQuery = $ReadOnly<{
46
46
  * This param will be used when the query key is not provided
47
47
  * (e.g. in usePreloadedQuery)
48
48
  */
49
- export type LazyLoadQueryNodeParamsWithoutQuery = $ReadOnly<{
49
+ export type LazyLoadQueryNodeParamsWithoutQuery = Readonly<{
50
50
  componentDisplayName: string,
51
51
  fragmentNode: ReaderFragment,
52
52
  }>;
@@ -35,7 +35,7 @@ export type LoaderFn<TQuery: OperationType> = (
35
35
  options?: UseQueryLoaderLoadQueryOptions,
36
36
  ) => void;
37
37
 
38
- export type UseQueryLoaderLoadQueryOptions = $ReadOnly<{
38
+ export type UseQueryLoaderLoadQueryOptions = Readonly<{
39
39
  ...LoadQueryOptions,
40
40
  +__environment?: ?IEnvironment,
41
41
  }>;
@@ -96,7 +96,7 @@ type RefetchFnExact<TQuery: OperationType, TOptions = Options> = RefetchFnBase<
96
96
  type RefetchFnInexact<
97
97
  TQuery: OperationType,
98
98
  TOptions = Options,
99
- > = RefetchFnBase<$ReadOnly<Partial<VariablesOf<TQuery>>>, TOptions>;
99
+ > = RefetchFnBase<Readonly<Partial<VariablesOf<TQuery>>>, TOptions>;
100
100
 
101
101
  type Action =
102
102
  | {