From 2b0820c86220e4b4861d9a10d0ee7681ef101a52 Mon Sep 17 00:00:00 2001 From: Alessia Bellisario Date: Mon, 18 Mar 2024 13:27:39 -0400 Subject: [PATCH 01/13] fix: options links and remove @ link syntax (#11693) * fix: options links and remove @ link syntax * fix: api report and size limit * Clean up Prettier, Size-limit, and Api-Extractor --- .api-reports/api-report-core.md | 3 --- .api-reports/api-report-react.md | 18 ------------------ .api-reports/api-report-react_components.md | 13 ------------- .api-reports/api-report-react_context.md | 13 ------------- .api-reports/api-report-react_hoc.md | 13 ------------- .api-reports/api-report-react_hooks.md | 18 ------------------ .api-reports/api-report-react_internal.md | 18 ------------------ .api-reports/api-report-react_ssr.md | 13 ------------- .api-reports/api-report-testing.md | 12 ------------ .api-reports/api-report-testing_core.md | 12 ------------ .api-reports/api-report-utilities.md | 12 ------------ .api-reports/api-report.md | 5 ----- .size-limits.json | 2 +- docs/shared/ApiDoc/PropertySignatureTable.js | 2 +- docs/source/api/react/components.mdx | 12 ++++++------ docs/source/caching/memory-management.mdx | 5 +++-- docs/source/data/mutations.mdx | 4 ++-- docs/source/data/queries.mdx | 4 ++-- docs/source/data/subscriptions.mdx | 4 ++-- src/core/ApolloClient.ts | 14 +++++++------- src/react/hooks/useFragment.ts | 2 +- src/react/internal/cache/QueryReference.ts | 5 ++--- .../query-preloader/createQueryPreloader.ts | 2 +- src/react/types/types.documentation.ts | 8 ++++---- 24 files changed, 32 insertions(+), 182 deletions(-) diff --git a/.api-reports/api-report-core.md b/.api-reports/api-report-core.md index 1ebf61607a3..b405231b1df 100644 --- a/.api-reports/api-report-core.md +++ b/.api-reports/api-report-core.md @@ -87,8 +87,6 @@ export abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver -// // @public export class ApolloClient implements DataProxy { // (undocumented) @@ -130,7 +128,6 @@ export class ApolloClient implements DataProxy { setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver subscribe(options: SubscriptionOptions): Observable>; // (undocumented) readonly typeDefs: ApolloClientOptions["typeDefs"]; diff --git a/.api-reports/api-report-react.md b/.api-reports/api-report-react.md index 0cdf3ce93bc..d604f535089 100644 --- a/.api-reports/api-report-react.md +++ b/.api-reports/api-report-react.md @@ -90,14 +90,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -135,7 +131,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -153,7 +148,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -164,8 +158,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -186,7 +178,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -378,7 +369,6 @@ export interface BaseMutationOptions extends SharedWatchQueryOptions { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: Context; ssr?: boolean; @@ -1057,7 +1047,6 @@ export type LoadableQueryHookFetchPolicy = Extract; context?: Context; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts @@ -1183,7 +1172,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -1755,8 +1743,6 @@ interface QueryOptions { variables?: TVariables; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "useBackgroundQuery" has more than one declaration; you need to add a TSDoc member reference selector -// // @public export interface QueryReference { // @internal (undocumented) @@ -1956,7 +1942,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -2039,7 +2024,6 @@ export interface SubscriptionHookOptions { context?: Context; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; @@ -2062,7 +2046,6 @@ export type SuspenseQueryHookFetchPolicy = Extract { // @deprecated canonizeResults?: boolean; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: Context; errorPolicy?: ErrorPolicy; @@ -2212,7 +2195,6 @@ export function useFragment(options: Us // @public (undocumented) export interface UseFragmentOptions extends Omit, NoInfer>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; // (undocumented) from: StoreObject | Reference | string; diff --git a/.api-reports/api-report-react_components.md b/.api-reports/api-report-react_components.md index a4e212edb9f..75bdf5cdc69 100644 --- a/.api-reports/api-report-react_components.md +++ b/.api-reports/api-report-react_components.md @@ -90,14 +90,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -136,7 +132,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -154,7 +149,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -165,8 +159,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -187,7 +179,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -326,7 +317,6 @@ interface BaseMutationOptions extends SharedWatchQueryOptions { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: DefaultContext; ssr?: boolean; @@ -960,7 +950,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -1567,7 +1556,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -1646,7 +1634,6 @@ export interface SubscriptionComponentOptions { context?: DefaultContext; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; diff --git a/.api-reports/api-report-react_context.md b/.api-reports/api-report-react_context.md index 3ec73691a66..89bdcc1f98d 100644 --- a/.api-reports/api-report-react_context.md +++ b/.api-reports/api-report-react_context.md @@ -89,14 +89,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -135,7 +131,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -153,7 +148,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -164,8 +158,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -186,7 +178,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -345,7 +336,6 @@ type AsStoreObject extends SharedWatchQueryOptions { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: DefaultContext; ssr?: boolean; @@ -946,7 +936,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -1523,7 +1512,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -1578,7 +1566,6 @@ type SubscribeToMoreOptions { context?: DefaultContext; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; diff --git a/.api-reports/api-report-react_hoc.md b/.api-reports/api-report-react_hoc.md index 107a19b3bbd..2a2c95db36a 100644 --- a/.api-reports/api-report-react_hoc.md +++ b/.api-reports/api-report-react_hoc.md @@ -89,14 +89,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -135,7 +131,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -153,7 +148,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -164,8 +158,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -186,7 +178,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -325,7 +316,6 @@ interface BaseMutationOptions extends SharedWatchQueryOptions { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: DefaultContext; ssr?: boolean; @@ -965,7 +955,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -1529,7 +1518,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -1584,7 +1572,6 @@ type SubscribeToMoreOptions { context?: DefaultContext; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; diff --git a/.api-reports/api-report-react_hooks.md b/.api-reports/api-report-react_hooks.md index 4abfa6b4bd0..e87875b811a 100644 --- a/.api-reports/api-report-react_hooks.md +++ b/.api-reports/api-report-react_hooks.md @@ -88,14 +88,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -134,7 +130,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -152,7 +147,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -163,8 +157,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -185,7 +177,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -349,7 +340,6 @@ interface BaseMutationOptions extends SharedWatchQueryOptions { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: DefaultContext; ssr?: boolean; @@ -1005,7 +995,6 @@ type LoadableQueryHookFetchPolicy = Extract; context?: DefaultContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts @@ -1132,7 +1121,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -1630,8 +1618,6 @@ interface QueryOptions { variables?: TVariables; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "useBackgroundQuery" has more than one declaration; you need to add a TSDoc member reference selector -// // @public interface QueryReference { // @internal (undocumented) @@ -1804,7 +1790,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -1873,7 +1858,6 @@ interface SubscriptionHookOptions { context?: DefaultContext; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; @@ -1896,7 +1880,6 @@ type SuspenseQueryHookFetchPolicy = Extract { // @deprecated canonizeResults?: boolean; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: DefaultContext; errorPolicy?: ErrorPolicy; @@ -2048,7 +2031,6 @@ export function useFragment(options: Us // @public (undocumented) export interface UseFragmentOptions extends Omit, NoInfer>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; // (undocumented) from: StoreObject | Reference | string; diff --git a/.api-reports/api-report-react_internal.md b/.api-reports/api-report-react_internal.md index 9b76bda9bbc..84afcfd091a 100644 --- a/.api-reports/api-report-react_internal.md +++ b/.api-reports/api-report-react_internal.md @@ -88,14 +88,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -134,7 +130,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -152,7 +147,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -163,8 +157,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -185,7 +177,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -338,7 +329,6 @@ type BackgroundQueryHookOptionsNoInfer extends SharedWatchQueryOptions { // Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: DefaultContext; ssr?: boolean; @@ -1066,7 +1056,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -1517,9 +1506,6 @@ interface QueryOptions { variables?: TVariables; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "useBackgroundQuery" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "useReadQuery" -// // @public export interface QueryReference { // @internal (undocumented) @@ -1670,7 +1656,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -1734,7 +1719,6 @@ type SubscribeToMoreOptions { context?: DefaultContext; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; @@ -1763,7 +1747,6 @@ type SuspenseQueryHookFetchPolicy = Extract { // @deprecated canonizeResults?: boolean; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: DefaultContext; errorPolicy?: ErrorPolicy; @@ -1923,7 +1906,6 @@ function useFragment(options: UseFragme // @public (undocumented) interface UseFragmentOptions extends Omit, NoInfer>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; // (undocumented) from: StoreObject | Reference | string; diff --git a/.api-reports/api-report-react_ssr.md b/.api-reports/api-report-react_ssr.md index 3747959ed85..5a8d6bfde63 100644 --- a/.api-reports/api-report-react_ssr.md +++ b/.api-reports/api-report-react_ssr.md @@ -89,14 +89,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -135,7 +131,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -153,7 +148,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -164,8 +158,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -186,7 +178,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -314,7 +305,6 @@ type AsStoreObject extends SharedWatchQueryOptions { // Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" client?: ApolloClient; context?: DefaultContext; ssr?: boolean; @@ -931,7 +921,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -1508,7 +1497,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -1563,7 +1551,6 @@ type SubscribeToMoreOptions { context?: DefaultContext; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; diff --git a/.api-reports/api-report-testing.md b/.api-reports/api-report-testing.md index 343bb599d38..c02d6cfd1ec 100644 --- a/.api-reports/api-report-testing.md +++ b/.api-reports/api-report-testing.md @@ -89,14 +89,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -135,7 +131,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -153,7 +148,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -164,8 +158,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -186,7 +178,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -1046,7 +1037,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -1547,7 +1537,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -1605,7 +1594,6 @@ type SubscribeToMoreOptions { context?: DefaultContext; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; diff --git a/.api-reports/api-report-testing_core.md b/.api-reports/api-report-testing_core.md index c8121f60b5b..2a3357aa0e2 100644 --- a/.api-reports/api-report-testing_core.md +++ b/.api-reports/api-report-testing_core.md @@ -88,14 +88,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -134,7 +130,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -152,7 +147,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -163,8 +157,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -185,7 +177,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -1001,7 +992,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -1504,7 +1494,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -1562,7 +1551,6 @@ type SubscribeToMoreOptions { context?: DefaultContext; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; diff --git a/.api-reports/api-report-utilities.md b/.api-reports/api-report-utilities.md index b47dd5550a0..02656941096 100644 --- a/.api-reports/api-report-utilities.md +++ b/.api-reports/api-report-utilities.md @@ -102,14 +102,10 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" -// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver -// // @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // @@ -147,7 +143,6 @@ class ApolloClient implements DataProxy { onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; @@ -165,7 +160,6 @@ class ApolloClient implements DataProxy { setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -176,8 +170,6 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; @@ -198,7 +190,6 @@ interface ApolloClientOptions { // (undocumented) fragmentMatcher?: FragmentMatcher; headers?: Record; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; name?: string; queryDeduplication?: boolean; @@ -1688,7 +1679,6 @@ interface MutationBaseOptions; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; variables?: TVariables; } @@ -2389,7 +2379,6 @@ interface SharedWatchQueryOptions fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; // @deprecated @@ -2466,7 +2455,6 @@ type SubscribeToMoreOptions { context?: DefaultContext; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; query: DocumentNode | TypedDocumentNode; diff --git a/.api-reports/api-report.md b/.api-reports/api-report.md index 1d09c28f12b..ebbea8fb589 100644 --- a/.api-reports/api-report.md +++ b/.api-reports/api-report.md @@ -89,8 +89,6 @@ export abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver -// // @public export class ApolloClient implements DataProxy { // (undocumented) @@ -132,7 +130,6 @@ export class ApolloClient implements DataProxy { setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; setResolvers(resolvers: Resolvers | Resolvers[]): void; stop(): void; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver subscribe(options: SubscriptionOptions): Observable>; // (undocumented) readonly typeDefs: ApolloClientOptions["typeDefs"]; @@ -2319,8 +2316,6 @@ interface QueryOptions { export { QueryOptions as PureQueryOptions } export { QueryOptions } -// Warning: (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "useBackgroundQuery" has more than one declaration; you need to add a TSDoc member reference selector -// // @public export interface QueryReference { // @internal (undocumented) diff --git a/.size-limits.json b/.size-limits.json index cdae2c9cd42..fc5f57b1041 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,4 +1,4 @@ { - "dist/apollo-client.min.cjs": 39247, + "dist/apollo-client.min.cjs": 39248, "import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32630 } diff --git a/docs/shared/ApiDoc/PropertySignatureTable.js b/docs/shared/ApiDoc/PropertySignatureTable.js index e82675db695..0ccbeb4a9af 100644 --- a/docs/shared/ApiDoc/PropertySignatureTable.js +++ b/docs/shared/ApiDoc/PropertySignatureTable.js @@ -141,10 +141,10 @@ export function PropertySignatureTable({ PropertySignatureTable.propTypes = { canonicalReference: PropTypes.string.isRequired, + idPrefix: PropTypes.string.isRequired, prefix: PropTypes.string, showHeaders: PropTypes.bool, display: PropTypes.oneOf(["parent", "child"]), customOrder: PropTypes.arrayOf(PropTypes.string), - idPrefix: PropTypes.string, genericNames: PropTypes.arrayOf(PropTypes.string), }; diff --git a/docs/source/api/react/components.mdx b/docs/source/api/react/components.mdx index 7322b162234..9aeca723eda 100644 --- a/docs/source/api/react/components.mdx +++ b/docs/source/api/react/components.mdx @@ -30,25 +30,25 @@ You then import the library's symbols from `@apollo/client/react/components`. The `Query` component accepts the following props. `query` is **required**. - + ### Render prop function The render prop function that you pass to the `children` prop of `Query` is called with an object (`QueryResult`) that has the following properties. This object contains your query result, plus some helpful functions for refetching, dynamic polling, and pagination. - + ## `Mutation` The Mutation component accepts the following props. Only `mutation` is **required**. - + ### Render prop function The render prop function that you pass to the `children` prop of `Mutation` is called with the `mutate` function and an object with the mutation result. The `mutate` function is how you trigger the mutation from your UI. The object contains your mutation result, plus loading and error state. - + ## `Subscription` @@ -56,10 +56,10 @@ The render prop function that you pass to the `children` prop of `Mutation` is c The Subscription component accepts the following props. Only `subscription` is **required**. - + ### Render prop function - + diff --git a/docs/source/caching/memory-management.mdx b/docs/source/caching/memory-management.mdx index cf40fc27d8d..d5b213fed59 100644 --- a/docs/source/caching/memory-management.mdx +++ b/docs/source/caching/memory-management.mdx @@ -49,8 +49,8 @@ import { cacheSizes } from '@apollo/client/utilities'; import { print } from '@apollo/client' cacheSizes.print = 100; -// cache sizes changed this way will only take effect for caches -// created after the cache size has been changed, so we need to +// cache sizes changed this way will only take effect for caches +// created after the cache size has been changed, so we need to // reset the cache for it to be effective print.reset(); @@ -121,6 +121,7 @@ The cache usage API is only meant for manual measurements. Don't rely on it in p ### Cache options diff --git a/docs/source/data/mutations.mdx b/docs/source/data/mutations.mdx index 8a7c4c806cf..0f0f1c7e744 100644 --- a/docs/source/data/mutations.mdx +++ b/docs/source/data/mutations.mdx @@ -382,7 +382,7 @@ detail with usage examples, see the [API reference](../api/react/hooks/). The `useMutation` hook accepts the following options: - + ### Result @@ -390,7 +390,7 @@ The `useMutation` result is a tuple with a mutate function in the first position You call the mutate function to trigger the mutation from your UI. - + ## Next steps diff --git a/docs/source/data/queries.mdx b/docs/source/data/queries.mdx index b28e17dab82..6eb6326b81b 100644 --- a/docs/source/data/queries.mdx +++ b/docs/source/data/queries.mdx @@ -512,13 +512,13 @@ Most calls to `useQuery` can omit the majority of these options, but it's useful The `useQuery` hook accepts the following options: - + ### Result After being called, the `useQuery` hook returns a result object with the following properties. This object contains your query result, plus some helpful functions for refetching, dynamic polling, and pagination. - + ## Next steps diff --git a/docs/source/data/subscriptions.mdx b/docs/source/data/subscriptions.mdx index 59e451c44ee..e6cd2fe29bc 100644 --- a/docs/source/data/subscriptions.mdx +++ b/docs/source/data/subscriptions.mdx @@ -375,13 +375,13 @@ export function CommentsPage({subscribeToNewComments}) { The `useSubscription` Hook accepts the following options: - + ### Result After being called, the `useSubscription` Hook returns a result object with the following properties: - + ## The older `subscriptions-transport-ws` library diff --git a/src/core/ApolloClient.ts b/src/core/ApolloClient.ts index e564a249c10..2f0b991872e 100644 --- a/src/core/ApolloClient.ts +++ b/src/core/ApolloClient.ts @@ -58,7 +58,7 @@ export interface ApolloClientOptions { */ headers?: Record; /** - * You can provide an {@link ApolloLink} instance to serve as Apollo Client's network layer. For more information, see [Advanced HTTP networking](https://www.apollographql.com/docs/react/networking/advanced-http-networking/). + * You can provide an `ApolloLink` instance to serve as Apollo Client's network layer. For more information, see [Advanced HTTP networking](https://www.apollographql.com/docs/react/networking/advanced-http-networking/). * * One of `uri` or `link` is **required**. If you provide both, `link` takes precedence. */ @@ -132,9 +132,9 @@ export { mergeOptions }; /** * This is the primary Apollo Client class. It is used to send GraphQL documents (i.e. queries - * and mutations) to a GraphQL spec-compliant server over an {@link ApolloLink} instance, + * and mutations) to a GraphQL spec-compliant server over an `ApolloLink` instance, * receive results from the server and cache the results in a store. It also delivers updates - * to GraphQL queries through {@link Observable} instances. + * to GraphQL queries through `Observable` instances. */ export class ApolloClient implements DataProxy { public link: ApolloLink; @@ -152,7 +152,7 @@ export class ApolloClient implements DataProxy { private localState: LocalState; /** - * Constructs an instance of {@link ApolloClient}. + * Constructs an instance of `ApolloClient`. * * @example * ```js @@ -354,7 +354,7 @@ export class ApolloClient implements DataProxy { /** * This watches the cache store of the query according to the options specified and - * returns an {@link ObservableQuery}. We can subscribe to this {@link ObservableQuery} and + * returns an `ObservableQuery`. We can subscribe to this `ObservableQuery` and * receive updated results through a GraphQL observer when the cache store changes. * * Note that this method is not an implementation of GraphQL subscriptions. Rather, @@ -396,7 +396,7 @@ export class ApolloClient implements DataProxy { * returns a `Promise` which is either resolved with the resulting data * or rejected with an error. * - * @param options - An object of type {@link QueryOptions} that allows us to + * @param options - An object of type `QueryOptions` that allows us to * describe how this query should be treated e.g. whether it should hit the * server at all or just resolve from the cache, etc. */ @@ -449,7 +449,7 @@ export class ApolloClient implements DataProxy { /** * This subscribes to a graphql subscription according to the options specified and returns an - * {@link Observable} which either emits received data or an error. + * `Observable` which either emits received data or an error. */ public subscribe< T = any, diff --git a/src/react/hooks/useFragment.ts b/src/react/hooks/useFragment.ts index 96e2a1c014a..9e5381c7480 100644 --- a/src/react/hooks/useFragment.ts +++ b/src/react/hooks/useFragment.ts @@ -29,7 +29,7 @@ export interface UseFragmentOptions // Override this field to make it optional (default: true). optimistic?: boolean; /** - * The instance of {@link ApolloClient} to use to look up the fragment. + * The instance of `ApolloClient` to use to look up the fragment. * * By default, the instance that's passed down via context is used, but you * can provide a different instance here. diff --git a/src/react/internal/cache/QueryReference.ts b/src/react/internal/cache/QueryReference.ts index 50865abe2d4..83b4f20ac49 100644 --- a/src/react/internal/cache/QueryReference.ts +++ b/src/react/internal/cache/QueryReference.ts @@ -15,7 +15,6 @@ import { createRejectedPromise, } from "../../../utilities/index.js"; import type { QueryKey } from "./types.js"; -import type { useBackgroundQuery, useReadQuery } from "../../hooks/index.js"; import { wrapPromiseWithState } from "../../../utilities/index.js"; type QueryRefPromise = PromiseWithState>; @@ -30,8 +29,8 @@ const QUERY_REFERENCE_SYMBOL: unique symbol = Symbol(); const PROMISE_SYMBOL: unique symbol = Symbol(); /** - * A `QueryReference` is an opaque object returned by {@link useBackgroundQuery}. - * A child component reading the `QueryReference` via {@link useReadQuery} will + * A `QueryReference` is an opaque object returned by `useBackgroundQuery`. + * A child component reading the `QueryReference` via `useReadQuery` will * suspend until the promise resolves. */ export interface QueryReference { diff --git a/src/react/query-preloader/createQueryPreloader.ts b/src/react/query-preloader/createQueryPreloader.ts index b7a9d22afcb..e96e7825395 100644 --- a/src/react/query-preloader/createQueryPreloader.ts +++ b/src/react/query-preloader/createQueryPreloader.ts @@ -72,7 +72,7 @@ type PreloadQueryOptionsArg< /** * A function that will begin loading a query when called. It's result can be - * read by {@link useReadQuery} which will suspend until the query is loaded. + * read by `useReadQuery` which will suspend until the query is loaded. * This is useful when you want to start loading a query as early as possible * outside of a React component. * diff --git a/src/react/types/types.documentation.ts b/src/react/types/types.documentation.ts index 364e8e3f188..186d651dfd8 100644 --- a/src/react/types/types.documentation.ts +++ b/src/react/types/types.documentation.ts @@ -45,7 +45,7 @@ export interface QueryOptionsDocumentation { fetchPolicy: unknown; /** - * Specifies the {@link FetchPolicy} to be used after this query has completed. + * Specifies the `FetchPolicy` to be used after this query has completed. * * @docGroup 3. Caching options */ @@ -168,7 +168,7 @@ export interface QueryOptionsDocumentation { onError: unknown; /** - * The instance of {@link ApolloClient} to use to execute the query. + * The instance of `ApolloClient` to use to execute the query. * * By default, the instance that's passed down via context is used, but you * can provide a different instance here. @@ -358,7 +358,7 @@ export interface MutationOptionsDocumentation { optimisticResponse: unknown; /** - * A {@link MutationQueryReducersMap}, which is map from query names to + * A `MutationQueryReducersMap`, which is map from query names to * mutation query reducers. Briefly, this map defines how to incorporate the * results of the mutation into the results of queries that are currently * being watched by your application. @@ -517,7 +517,7 @@ export interface SubscriptionOptionsDocumentation { variables: unknown; /** - * Specifies the {@link ErrorPolicy} to be used for this operation + * Specifies the `ErrorPolicy` to be used for this operation */ errorPolicy: unknown; From cb8ffe50e903397f741b62a44624bfe69b5f7b75 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Mon, 18 Mar 2024 12:17:06 -0600 Subject: [PATCH 02/13] Fix issue with `useFragment` where it returned wrong data when changing the `from` option (#11689) --- .changeset/flat-singers-kiss.md | 5 ++ .size-limits.json | 2 +- .../hooks/__tests__/useFragment.test.tsx | 57 ++++++++++++++++++- src/react/hooks/useFragment.ts | 6 ++ 4 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 .changeset/flat-singers-kiss.md diff --git a/.changeset/flat-singers-kiss.md b/.changeset/flat-singers-kiss.md new file mode 100644 index 00000000000..74727e85370 --- /dev/null +++ b/.changeset/flat-singers-kiss.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Fix issue where passing a new `from` option to `useFragment` would first render with the previous value before rerendering with the correct value. diff --git a/.size-limits.json b/.size-limits.json index fc5f57b1041..6ea6a4c6ebc 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,4 +1,4 @@ { - "dist/apollo-client.min.cjs": 39248, + "dist/apollo-client.min.cjs": 39267, "import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32630 } diff --git a/src/react/hooks/__tests__/useFragment.test.tsx b/src/react/hooks/__tests__/useFragment.test.tsx index 27f4857edd6..d5436bc5097 100644 --- a/src/react/hooks/__tests__/useFragment.test.tsx +++ b/src/react/hooks/__tests__/useFragment.test.tsx @@ -29,7 +29,7 @@ import { concatPagination } from "../../../utilities"; import assert from "assert"; import { expectTypeOf } from "expect-type"; import { SubscriptionObserver } from "zen-observable-ts"; -import { profile, spyOnConsole } from "../../../testing/internal"; +import { profile, profileHook, spyOnConsole } from "../../../testing/internal"; describe("useFragment", () => { it("is importable and callable", () => { @@ -1359,6 +1359,61 @@ describe("useFragment", () => { }); }); + it("returns correct data when options change", async () => { + const client = new ApolloClient({ + cache: new InMemoryCache(), + }); + type User = { __typename: "User"; id: number; name: string }; + const fragment: TypedDocumentNode = gql` + fragment UserFragment on User { + id + name + } + `; + + client.writeFragment({ + fragment, + data: { __typename: "User", id: 1, name: "Alice" }, + }); + + client.writeFragment({ + fragment, + data: { __typename: "User", id: 2, name: "Charlie" }, + }); + + const ProfiledHook = profileHook(({ id }: { id: number }) => + useFragment({ fragment, from: { __typename: "User", id } }) + ); + + const { rerender } = render(, { + wrapper: ({ children }) => ( + {children} + ), + }); + + { + const snapshot = await ProfiledHook.takeSnapshot(); + + expect(snapshot).toEqual({ + complete: true, + data: { __typename: "User", id: 1, name: "Alice" }, + }); + } + + rerender(); + + { + const snapshot = await ProfiledHook.takeSnapshot(); + + expect(snapshot).toEqual({ + complete: true, + data: { __typename: "User", id: 2, name: "Charlie" }, + }); + } + + await expect(ProfiledHook).not.toRerender(); + }); + describe("tests with incomplete data", () => { let cache: InMemoryCache, wrapper: React.FunctionComponent; const ItemFragment = gql` diff --git a/src/react/hooks/useFragment.ts b/src/react/hooks/useFragment.ts index 9e5381c7480..368e6273d85 100644 --- a/src/react/hooks/useFragment.ts +++ b/src/react/hooks/useFragment.ts @@ -88,6 +88,12 @@ function _useFragment( diffToResult(cache.diff(diffOptions)) ); + // Since .next is async, we need to make sure that we + // get the correct diff on the next render given new diffOptions + React.useMemo(() => { + resultRef.current = diffToResult(cache.diff(diffOptions)); + }, [diffOptions, cache]); + // Used for both getSnapshot and getServerSnapshot const getSnapshot = React.useCallback(() => resultRef.current, []); From b94a24a242cebaa212b4b6b8b88b87a3a5f0596a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 14:57:22 -0400 Subject: [PATCH 03/13] chore(deps): bump follow-redirects in /integration-tests (#11692) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- integration-tests/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-tests/package-lock.json b/integration-tests/package-lock.json index 379f7de8c6c..6cc807a20b6 100644 --- a/integration-tests/package-lock.json +++ b/integration-tests/package-lock.json @@ -20737,9 +20737,9 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", From 972644691db6670373f76812edf3825f8517eeac Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:11:52 -0400 Subject: [PATCH 04/13] chore(deps): update all dependencies - patch updates (#11690) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 40 ++++++++++++++++++++-------------------- package.json | 10 +++++----- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7cd5ca6c9a8..14f4e781d10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "zen-observable-ts": "^1.2.5" }, "devDependencies": { - "@arethetypeswrong/cli": "0.15.1", + "@arethetypeswrong/cli": "0.15.2", "@babel/parser": "7.24.0", "@changesets/changelog-github": "0.5.0", "@changesets/cli": "2.27.1", @@ -46,10 +46,10 @@ "@types/hoist-non-react-statics": "3.3.5", "@types/jest": "29.5.12", "@types/lodash": "4.14.202", - "@types/node": "20.11.25", + "@types/node": "20.11.28", "@types/node-fetch": "2.6.11", - "@types/react": "18.2.64", - "@types/react-dom": "18.2.21", + "@types/react": "18.2.67", + "@types/react-dom": "18.2.22", "@types/relay-runtime": "14.1.23", "@types/use-sync-external-store": "0.0.6", "@typescript-eslint/eslint-plugin": "7.1.1", @@ -91,7 +91,7 @@ "rxjs": "7.8.1", "size-limit": "11.0.2", "subscriptions-transport-ws": "0.11.0", - "terser": "5.29.1", + "terser": "5.29.2", "ts-api-utils": "1.3.0", "ts-jest": "29.1.2", "ts-jest-resolver": "2.0.1", @@ -163,9 +163,9 @@ "dev": true }, "node_modules/@arethetypeswrong/cli": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@arethetypeswrong/cli/-/cli-0.15.1.tgz", - "integrity": "sha512-c4+MVbhktzLDnUFpvWvVkGRAb7zwd9b9ZW4eG62PkBsRRsTM6TKUNR23mLhz6tyYTalyqe8E6v09q4k0KuN3eQ==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@arethetypeswrong/cli/-/cli-0.15.2.tgz", + "integrity": "sha512-YXKq7PyB+nv3KNCpmo384C+1f6DjCwJqSwxPpnFK/2shKy1Ug9RM8ma2eKlgfklyflNqtg1KJvTF2CxZmT0/ig==", "dev": true, "dependencies": { "@arethetypeswrong/core": "0.15.1", @@ -3458,9 +3458,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "version": "20.11.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", + "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -3489,9 +3489,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.64", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.64.tgz", - "integrity": "sha512-MlmPvHgjj2p3vZaxbQgFUQFvD8QiZwACfGqEdDSWou5yISWxDQ4/74nCAwsUiX7UFLKZz3BbVSPj+YxeoGGCfg==", + "version": "18.2.67", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.67.tgz", + "integrity": "sha512-vkIE2vTIMHQ/xL0rgmuoECBCkZFZeHr49HeWSc24AptMbNRo7pwSBvj73rlJJs9fGKj0koS+V7kQB1jHS0uCgw==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -3500,9 +3500,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.21", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.21.tgz", - "integrity": "sha512-gnvBA/21SA4xxqNXEwNiVcP0xSGHh/gi1VhWv9Bl46a0ItbTT5nFY+G9VSQpaG/8N/qdJpJ+vftQ4zflTtnjLw==", + "version": "18.2.22", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.22.tgz", + "integrity": "sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==", "dev": true, "dependencies": { "@types/react": "*" @@ -11767,9 +11767,9 @@ } }, "node_modules/terser": { - "version": "5.29.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.29.1.tgz", - "integrity": "sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==", + "version": "5.29.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.29.2.tgz", + "integrity": "sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", diff --git a/package.json b/package.json index 49f44cb93ac..c8bbb16d31b 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "zen-observable-ts": "^1.2.5" }, "devDependencies": { - "@arethetypeswrong/cli": "0.15.1", + "@arethetypeswrong/cli": "0.15.2", "@babel/parser": "7.24.0", "@changesets/changelog-github": "0.5.0", "@changesets/cli": "2.27.1", @@ -127,10 +127,10 @@ "@types/hoist-non-react-statics": "3.3.5", "@types/jest": "29.5.12", "@types/lodash": "4.14.202", - "@types/node": "20.11.25", + "@types/node": "20.11.28", "@types/node-fetch": "2.6.11", - "@types/react": "18.2.64", - "@types/react-dom": "18.2.21", + "@types/react": "18.2.67", + "@types/react-dom": "18.2.22", "@types/relay-runtime": "14.1.23", "@types/use-sync-external-store": "0.0.6", "@typescript-eslint/eslint-plugin": "7.1.1", @@ -172,7 +172,7 @@ "rxjs": "7.8.1", "size-limit": "11.0.2", "subscriptions-transport-ws": "0.11.0", - "terser": "5.29.1", + "terser": "5.29.2", "ts-api-utils": "1.3.0", "ts-jest": "29.1.2", "ts-jest-resolver": "2.0.1", From 24b73b41f3409028098546adbd8c89ab75f06965 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:12:24 -0400 Subject: [PATCH 05/13] chore(deps): update jaywcjlove/github-action-package action to v2 (#11621) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/exit-prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/exit-prerelease.yml b/.github/workflows/exit-prerelease.yml index 82d8f2d8ead..9aa0290d3ad 100644 --- a/.github/workflows/exit-prerelease.yml +++ b/.github/workflows/exit-prerelease.yml @@ -45,7 +45,7 @@ jobs: replace: "" - name: Write previous version to package.json - uses: jaywcjlove/github-action-package@v1.3.2 + uses: jaywcjlove/github-action-package@v2.0.0 with: version: ${{ steps.formatversion.outputs.value }} From 89b3bbfb92669c233a5a051596b59ae9b6816406 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:13:21 -0400 Subject: [PATCH 06/13] chore(deps): update all devdependencies (major) (#11637) * chore(deps): update all devdependencies * chore: update web-streams-polyfill imports --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alessia Bellisario --- package-lock.json | 32 +++++++++---------- package.json | 4 +-- src/link/http/__tests__/HttpLink.ts | 2 +- src/link/http/__tests__/responseIterator.ts | 2 +- .../responseIteratorNoAsyncIterator.ts | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 14f4e781d10..91563e681d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -95,12 +95,12 @@ "ts-api-utils": "1.3.0", "ts-jest": "29.1.2", "ts-jest-resolver": "2.0.1", - "ts-morph": "21.0.1", + "ts-morph": "22.0.0", "ts-node": "10.9.2", "typedoc": "0.25.0", "typescript": "5.4.2", "wait-for-observables": "1.0.3", - "web-streams-polyfill": "3.3.3", + "web-streams-polyfill": "4.0.0", "whatwg-fetch": "3.6.20" }, "engines": { @@ -3176,9 +3176,9 @@ } }, "node_modules/@ts-morph/common": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.22.0.tgz", - "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.23.0.tgz", + "integrity": "sha512-m7Lllj9n/S6sOkCkRftpM7L24uvmfXQFedlW/4hENcuJH1HHm9u5EgxZb9uVjQSCGrbBWBkOGgcTxNg36r6ywA==", "dev": true, "dependencies": { "fast-glob": "^3.3.2", @@ -4800,9 +4800,9 @@ } }, "node_modules/code-block-writer": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz", - "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.1.tgz", + "integrity": "sha512-c5or4P6erEA69TxaxTNcHUNcIn+oyxSRTOWV+pSYF+z4epXqNvwvJ70XPGjPNgue83oAFAPBRQYwpAJ/Hpe/Sg==", "dev": true }, "node_modules/collect-v8-coverage": { @@ -12008,13 +12008,13 @@ } }, "node_modules/ts-morph": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-21.0.1.tgz", - "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-22.0.0.tgz", + "integrity": "sha512-M9MqFGZREyeb5fTl6gNHKZLqBQA0TjA1lea+CR48R8EBTDuWrNqW6ccC5QvjNR4s6wDumD3LTCjOFSp9iwlzaw==", "dev": true, "dependencies": { - "@ts-morph/common": "~0.22.0", - "code-block-writer": "^12.0.0" + "@ts-morph/common": "~0.23.0", + "code-block-writer": "^13.0.1" } }, "node_modules/ts-node": { @@ -12495,9 +12495,9 @@ } }, "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0.tgz", + "integrity": "sha512-0zJXHRAYEjM2tUfZ2DiSOHAa2aw1tisnnhU3ufD57R8iefL+DcdJyRBRyJpG+NUimDgbTI/lH+gAE1PAvV3Cgw==", "dev": true, "engines": { "node": ">= 8" diff --git a/package.json b/package.json index c8bbb16d31b..4f6d9c32b57 100644 --- a/package.json +++ b/package.json @@ -176,12 +176,12 @@ "ts-api-utils": "1.3.0", "ts-jest": "29.1.2", "ts-jest-resolver": "2.0.1", - "ts-morph": "21.0.1", + "ts-morph": "22.0.0", "ts-node": "10.9.2", "typedoc": "0.25.0", "typescript": "5.4.2", "wait-for-observables": "1.0.3", - "web-streams-polyfill": "3.3.3", + "web-streams-polyfill": "4.0.0", "whatwg-fetch": "3.6.20" }, "publishConfig": { diff --git a/src/link/http/__tests__/HttpLink.ts b/src/link/http/__tests__/HttpLink.ts index 2ed657bc303..ad58e4c40c9 100644 --- a/src/link/http/__tests__/HttpLink.ts +++ b/src/link/http/__tests__/HttpLink.ts @@ -2,7 +2,7 @@ import gql from "graphql-tag"; import fetchMock from "fetch-mock"; import { ASTNode, print, stripIgnoredCharacters } from "graphql"; import { TextDecoder } from "util"; -import { ReadableStream } from "web-streams-polyfill/ponyfill/es2018"; +import { ReadableStream } from "web-streams-polyfill"; import { Readable } from "stream"; import { diff --git a/src/link/http/__tests__/responseIterator.ts b/src/link/http/__tests__/responseIterator.ts index 3800a257a8d..dca254c9821 100644 --- a/src/link/http/__tests__/responseIterator.ts +++ b/src/link/http/__tests__/responseIterator.ts @@ -5,7 +5,7 @@ import { itAsync, subscribeAndCount } from "../../../testing"; import type { Observable } from "zen-observable-ts"; import { ObservableQuery } from "../../../core"; import { TextEncoder, TextDecoder } from "util"; -import { ReadableStream } from "web-streams-polyfill/ponyfill/es2018"; +import { ReadableStream } from "web-streams-polyfill"; import { Readable } from "stream"; var Blob = require("blob-polyfill").Blob; diff --git a/src/link/http/__tests__/responseIteratorNoAsyncIterator.ts b/src/link/http/__tests__/responseIteratorNoAsyncIterator.ts index ec5ebe82f38..312823cf099 100644 --- a/src/link/http/__tests__/responseIteratorNoAsyncIterator.ts +++ b/src/link/http/__tests__/responseIteratorNoAsyncIterator.ts @@ -4,7 +4,7 @@ import { HttpLink } from "../HttpLink"; import { itAsync, subscribeAndCount } from "../../../testing"; import type { Observable } from "zen-observable-ts"; import { TextEncoder, TextDecoder } from "util"; -import { ReadableStream } from "web-streams-polyfill/ponyfill/es2018"; +import { ReadableStream } from "web-streams-polyfill"; import { Readable } from "stream"; // As of Jest 26 there is no way to mock/unmock a module that is used indirectly From f70c83dc48c58b5a686582611079e32bf7426b65 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:27:41 -0400 Subject: [PATCH 07/13] chore(deps): update all devdependencies (#11691) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 442 ++++++++++++++++++++++++---------------------- package.json | 18 +- 2 files changed, 235 insertions(+), 225 deletions(-) diff --git a/package-lock.json b/package-lock.json index 91563e681d2..92224a3e029 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,8 +33,8 @@ "@graphql-tools/schema": "10.0.3", "@microsoft/api-extractor": "7.42.3", "@rollup/plugin-node-resolve": "11.2.1", - "@size-limit/esbuild-why": "11.0.2", - "@size-limit/preset-small-lib": "11.0.2", + "@size-limit/esbuild-why": "11.1.1", + "@size-limit/preset-small-lib": "11.1.1", "@testing-library/jest-dom": "6.4.2", "@testing-library/react": "14.2.1", "@testing-library/react-12": "npm:@testing-library/react@^12", @@ -45,18 +45,18 @@ "@types/glob": "8.1.0", "@types/hoist-non-react-statics": "3.3.5", "@types/jest": "29.5.12", - "@types/lodash": "4.14.202", + "@types/lodash": "4.17.0", "@types/node": "20.11.28", "@types/node-fetch": "2.6.11", "@types/react": "18.2.67", "@types/react-dom": "18.2.22", "@types/relay-runtime": "14.1.23", "@types/use-sync-external-store": "0.0.6", - "@typescript-eslint/eslint-plugin": "7.1.1", - "@typescript-eslint/parser": "7.1.1", - "@typescript-eslint/rule-tester": "7.1.1", - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/utils": "7.1.1", + "@typescript-eslint/eslint-plugin": "7.3.0", + "@typescript-eslint/parser": "7.3.0", + "@typescript-eslint/rule-tester": "7.3.0", + "@typescript-eslint/types": "7.3.0", + "@typescript-eslint/utils": "7.3.0", "acorn": "8.11.3", "blob-polyfill": "7.0.20220408", "bytes": "3.1.2", @@ -89,7 +89,7 @@ "rollup-plugin-cleanup": "3.2.1", "rollup-plugin-terser": "7.0.2", "rxjs": "7.8.1", - "size-limit": "11.0.2", + "size-limit": "11.1.1", "subscriptions-transport-ws": "0.11.0", "terser": "5.29.2", "ts-api-utils": "1.3.0", @@ -1358,9 +1358,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", - "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", "cpu": [ "ppc64" ], @@ -1374,9 +1374,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", - "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "cpu": [ "arm" ], @@ -1390,9 +1390,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", - "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "cpu": [ "arm64" ], @@ -1406,9 +1406,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", - "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "cpu": [ "x64" ], @@ -1422,9 +1422,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", - "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "cpu": [ "arm64" ], @@ -1438,9 +1438,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", - "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "cpu": [ "x64" ], @@ -1454,9 +1454,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", - "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "cpu": [ "arm64" ], @@ -1470,9 +1470,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", - "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "cpu": [ "x64" ], @@ -1486,9 +1486,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", - "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "cpu": [ "arm" ], @@ -1502,9 +1502,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", - "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "cpu": [ "arm64" ], @@ -1518,9 +1518,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", - "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "cpu": [ "ia32" ], @@ -1534,9 +1534,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", - "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "cpu": [ "loong64" ], @@ -1550,9 +1550,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", - "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "cpu": [ "mips64el" ], @@ -1566,9 +1566,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", - "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "cpu": [ "ppc64" ], @@ -1582,9 +1582,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", - "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "cpu": [ "riscv64" ], @@ -1598,9 +1598,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", - "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "cpu": [ "s390x" ], @@ -1614,9 +1614,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", - "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "cpu": [ "x64" ], @@ -1630,9 +1630,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", - "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "cpu": [ "x64" ], @@ -1646,9 +1646,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", - "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "cpu": [ "x64" ], @@ -1662,9 +1662,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", - "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "cpu": [ "x64" ], @@ -1678,9 +1678,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", - "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "cpu": [ "arm64" ], @@ -1694,9 +1694,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", - "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "cpu": [ "ia32" ], @@ -1710,9 +1710,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", - "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "cpu": [ "x64" ], @@ -2835,9 +2835,9 @@ } }, "node_modules/@sindresorhus/merge-streams": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-1.0.0.tgz", - "integrity": "sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", "dev": true, "engines": { "node": ">=18" @@ -2865,35 +2865,35 @@ } }, "node_modules/@size-limit/esbuild": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/@size-limit/esbuild/-/esbuild-11.0.2.tgz", - "integrity": "sha512-67p+y+wkMBJJegLZUp1X3v1YEvgGSbbAukFbHtxJ1c/DTj/ApiHvtgMzvA5ij+A5UOay+jSU4bXetpNJlUK3Ow==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@size-limit/esbuild/-/esbuild-11.1.1.tgz", + "integrity": "sha512-+lWZbLc0X3c8uh6wdYv/5CGn58x1IgYAhCLQXvojxgn/j3TP72H2EigXLMcDXOgN3aps44yV3Qb2HIJppE+jYw==", "dev": true, "dependencies": { - "esbuild": "^0.19.11", - "nanoid": "^5.0.4" + "esbuild": "^0.20.2", + "nanoid": "^5.0.6" }, "engines": { "node": "^18.0.0 || >=20.0.0" }, "peerDependencies": { - "size-limit": "11.0.2" + "size-limit": "11.1.1" } }, "node_modules/@size-limit/esbuild-why": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/@size-limit/esbuild-why/-/esbuild-why-11.0.2.tgz", - "integrity": "sha512-pYm1z5F4XXhg609qnh/VWe52o0T5Z3YjIQlZ9lgxchTYXUskVnRUDqRLKXC3NHuEqHdMtg13Du3rpaGvXMTyuw==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@size-limit/esbuild-why/-/esbuild-why-11.1.1.tgz", + "integrity": "sha512-EA/9ndnD+CQBmW5KJXP6TP0nDbXv8EkrMWRkndhpCk29OvROLCmf8fI0U0Gn0knobUm5+D7HMVnpA3EsEY2YCw==", "dev": true, "dependencies": { "esbuild-visualizer": "^0.6.0", - "open": "^10.0.3" + "open": "^10.1.0" }, "engines": { "node": "^18.0.0 || >=20.0.0" }, "peerDependencies": { - "size-limit": "11.0.2" + "size-limit": "11.1.1" } }, "node_modules/@size-limit/esbuild-why/node_modules/is-wsl": { @@ -2912,9 +2912,9 @@ } }, "node_modules/@size-limit/esbuild-why/node_modules/open": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/open/-/open-10.0.3.tgz", - "integrity": "sha512-dtbI5oW7987hwC9qjJTyABldTaa19SuyJse1QboWv3b0qCcrrLNVDqBx1XgELAjh9QTVQaP/C5b1nhQebd1H2A==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", + "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", "dev": true, "dependencies": { "default-browser": "^5.2.1", @@ -2930,29 +2930,29 @@ } }, "node_modules/@size-limit/file": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/@size-limit/file/-/file-11.0.2.tgz", - "integrity": "sha512-874lrMtWYRL+xb/6xzejjwD+krfHTOo+2uFGpZfJScvuNv91Ni2O7k0o09zC70VzCYBGkXquV92ln/H+/ognGg==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@size-limit/file/-/file-11.1.1.tgz", + "integrity": "sha512-c4XXp2CLvfx2RfzAqIAlxV6OWAQSVquLMNKKD6x9urJD7knjnTesPkbMcf3SkQbjCY4PlLL6kYhaO9drCWGM6g==", "dev": true, "engines": { "node": "^18.0.0 || >=20.0.0" }, "peerDependencies": { - "size-limit": "11.0.2" + "size-limit": "11.1.1" } }, "node_modules/@size-limit/preset-small-lib": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/@size-limit/preset-small-lib/-/preset-small-lib-11.0.2.tgz", - "integrity": "sha512-Yo+RRHCLz29PMmRXzq69E3LjiAivspF2XRGdpZ+QdeFOotd3hBYVMJC9GDF3tEigPtfvEJk4L8YLlUK+SE90FA==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@size-limit/preset-small-lib/-/preset-small-lib-11.1.1.tgz", + "integrity": "sha512-GW3T//znZXnk+a0VxkP241GCYZUn/RDr8Pn8p6pjdFqQy3PFrKiMq2QHyJLtGT/eRoYHL8e32mkNciQtQjZ4sQ==", "dev": true, "dependencies": { - "@size-limit/esbuild": "11.0.2", - "@size-limit/file": "11.0.2", - "size-limit": "11.0.2" + "@size-limit/esbuild": "11.1.1", + "@size-limit/file": "11.1.1", + "size-limit": "11.1.1" }, "peerDependencies": { - "size-limit": "11.0.2" + "size-limit": "11.1.1" } }, "node_modules/@testing-library/dom": { @@ -3440,9 +3440,9 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.14.202", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", - "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz", + "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", "dev": true }, "node_modules/@types/minimatch": { @@ -3569,16 +3569,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.1.tgz", - "integrity": "sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.3.0.tgz", + "integrity": "sha512-e65ii0Y/jkqX3GXSBM7v9qt9ufxd4omcWyPVVC/msq/hP+hYC6CddLRvlvclni+u7UcaNYT/QhBYlaMHaR2ixw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.1.1", - "@typescript-eslint/type-utils": "7.1.1", - "@typescript-eslint/utils": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", + "@typescript-eslint/scope-manager": "7.3.0", + "@typescript-eslint/type-utils": "7.3.0", + "@typescript-eslint/utils": "7.3.0", + "@typescript-eslint/visitor-keys": "7.3.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -3587,7 +3587,7 @@ "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -3619,19 +3619,19 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.1.tgz", - "integrity": "sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.3.0.tgz", + "integrity": "sha512-OZcvH8zipGILuxJmtFgzjAJ+bOpWidzEppIRsT2P4ZUrizU0EsPt4hhzDn3lNfM1Hv7slZPTEQGKjUEn/ftQYA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.1.1", - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/typescript-estree": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", + "@typescript-eslint/scope-manager": "7.3.0", + "@typescript-eslint/types": "7.3.0", + "@typescript-eslint/typescript-estree": "7.3.0", + "@typescript-eslint/visitor-keys": "7.3.0", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -3647,19 +3647,19 @@ } }, "node_modules/@typescript-eslint/rule-tester": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-7.1.1.tgz", - "integrity": "sha512-VdMINBCn1HA7ov18I9XRDKFOKZeJqmx7eqaq+COoaTMVNzzXf0ALbAaTMwg9Qz5sXsrhcEYN6nx84fu8C9J/HQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-7.3.0.tgz", + "integrity": "sha512-VTyIKtPW9KD3lTjRSkWh5xFatOexprK2kmQM4tRmVm7/ESkUScD1oqXg+uOEd4wWcGdNMZoZHCPtDk3PcQP2rw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.1.1", - "@typescript-eslint/utils": "7.1.1", + "@typescript-eslint/typescript-estree": "7.3.0", + "@typescript-eslint/utils": "7.3.0", "ajv": "^6.10.0", "lodash.merge": "4.6.2", "semver": "^7.5.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -3686,16 +3686,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.1.tgz", - "integrity": "sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.3.0.tgz", + "integrity": "sha512-KlG7xH3J/+nHpZRcYeskO5QVJCnnssxYKBlrj3MoyMONihn3P4xu5jIelrS5YWvBjbytgHmFkzjDApranoYkNA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1" + "@typescript-eslint/types": "7.3.0", + "@typescript-eslint/visitor-keys": "7.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -3703,18 +3703,18 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.1.tgz", - "integrity": "sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.3.0.tgz", + "integrity": "sha512-TyQ19ydo248eFjTfHFSvZbxalFUOxU9o2M6SUk3wOA0yRF1ZiB2VP5iaoLrGKcg7TyUxS4knYIHnE55ih82Cfg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.1.1", - "@typescript-eslint/utils": "7.1.1", + "@typescript-eslint/typescript-estree": "7.3.0", + "@typescript-eslint/utils": "7.3.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -3730,12 +3730,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.1.tgz", - "integrity": "sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.3.0.tgz", + "integrity": "sha512-oYCBkD0xVxzmZZmYiIWVewyy/q/ugq7PPm4pHhE1IgcT062i96G0Ww3gd8BvUYpk2yvg95q00Hj2CHRLjAuZBA==", "dev": true, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -3743,13 +3743,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.1.tgz", - "integrity": "sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.3.0.tgz", + "integrity": "sha512-UF85+bInQZ3olhI/zxv0c2b2SMuymn3t6/lkRkSB239HHxFmPSlmcggOKAjYzqRCdtqhPDftpsV1LlDH66AXrA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", + "@typescript-eslint/types": "7.3.0", + "@typescript-eslint/visitor-keys": "7.3.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3758,7 +3758,7 @@ "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -3810,21 +3810,21 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.1.tgz", - "integrity": "sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.3.0.tgz", + "integrity": "sha512-7PKIDoe2ppR1SK56TLv7WQXrdHqEiueVwLVIjdSR4ROY2LprmJenf4+tT8iJIfxrsPzjSJGNeQ7GVmfoYbqrhw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.1.1", - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/scope-manager": "7.3.0", + "@typescript-eslint/types": "7.3.0", + "@typescript-eslint/typescript-estree": "7.3.0", "semver": "^7.5.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -3850,16 +3850,16 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.1.tgz", - "integrity": "sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.3.0.tgz", + "integrity": "sha512-Gz8Su+QjOI5qP8UQ74VqKaTt/BLy23IhCCHLbYxhmNzHCGFHrvfgq4hISZvuqQ690ubkD0746qLcWC647nScuQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/types": "7.3.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -4704,16 +4704,10 @@ "dev": true }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -4726,6 +4720,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -5543,9 +5540,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", - "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "hasInstallScript": true, "bin": { @@ -5555,29 +5552,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.11", - "@esbuild/android-arm": "0.19.11", - "@esbuild/android-arm64": "0.19.11", - "@esbuild/android-x64": "0.19.11", - "@esbuild/darwin-arm64": "0.19.11", - "@esbuild/darwin-x64": "0.19.11", - "@esbuild/freebsd-arm64": "0.19.11", - "@esbuild/freebsd-x64": "0.19.11", - "@esbuild/linux-arm": "0.19.11", - "@esbuild/linux-arm64": "0.19.11", - "@esbuild/linux-ia32": "0.19.11", - "@esbuild/linux-loong64": "0.19.11", - "@esbuild/linux-mips64el": "0.19.11", - "@esbuild/linux-ppc64": "0.19.11", - "@esbuild/linux-riscv64": "0.19.11", - "@esbuild/linux-s390x": "0.19.11", - "@esbuild/linux-x64": "0.19.11", - "@esbuild/netbsd-x64": "0.19.11", - "@esbuild/openbsd-x64": "0.19.11", - "@esbuild/sunos-x64": "0.19.11", - "@esbuild/win32-arm64": "0.19.11", - "@esbuild/win32-ia32": "0.19.11", - "@esbuild/win32-x64": "0.19.11" + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "node_modules/esbuild-visualizer": { @@ -8783,6 +8780,15 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/jju": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", @@ -9056,12 +9062,15 @@ } }, "node_modules/lilconfig": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", "dev": true, "engines": { "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { @@ -9512,9 +9521,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.4.tgz", - "integrity": "sha512-vAjmBf13gsmhXSgBrtIclinISzFFy22WwCYoyilZlsrRXNIHSwgFQ1bEdjRwMT3aoadeIF6HMuDRlOxzfXV8ig==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.6.tgz", + "integrity": "sha512-rRq0eMHoGZxlvaFOUdK1Ev83Bd1IgzzR+WJ3IbDJ7QOSdAxYjlurSPqFs9s4lJg29RT6nPwizFtJhQS6V5xgiA==", "dev": true, "funding": [ { @@ -11135,15 +11144,16 @@ "dev": true }, "node_modules/size-limit": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/size-limit/-/size-limit-11.0.2.tgz", - "integrity": "sha512-iFZ8iTR/3zPqxSwEIdGnTVYVU0F2nhodLQG/G6zpi/NxECYAK9ntq2lNr+prXH7h3gyBjx2Umt2D/oS2Qzz+eg==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/size-limit/-/size-limit-11.1.1.tgz", + "integrity": "sha512-0d06gwp+hBuhNQyAyewalfMLhGCnjt15MyDxqouzxN4+85vjAUdRKSNuR1kcyxaS9Ml98q120U0PgRPocPJWiw==", "dev": true, "dependencies": { "bytes-iec": "^3.1.1", - "chokidar": "^3.5.3", - "globby": "^14.0.0", - "lilconfig": "^3.0.0", + "chokidar": "^3.6.0", + "globby": "^14.0.1", + "jiti": "^1.21.0", + "lilconfig": "^3.1.1", "nanospinner": "^1.1.0", "picocolors": "^1.0.0" }, @@ -11155,12 +11165,12 @@ } }, "node_modules/size-limit/node_modules/globby": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.0.tgz", - "integrity": "sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.1.tgz", + "integrity": "sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==", "dev": true, "dependencies": { - "@sindresorhus/merge-streams": "^1.0.0", + "@sindresorhus/merge-streams": "^2.1.0", "fast-glob": "^3.3.2", "ignore": "^5.2.4", "path-type": "^5.0.0", diff --git a/package.json b/package.json index 4f6d9c32b57..431659e8808 100644 --- a/package.json +++ b/package.json @@ -114,8 +114,8 @@ "@graphql-tools/schema": "10.0.3", "@microsoft/api-extractor": "7.42.3", "@rollup/plugin-node-resolve": "11.2.1", - "@size-limit/esbuild-why": "11.0.2", - "@size-limit/preset-small-lib": "11.0.2", + "@size-limit/esbuild-why": "11.1.1", + "@size-limit/preset-small-lib": "11.1.1", "@testing-library/jest-dom": "6.4.2", "@testing-library/react": "14.2.1", "@testing-library/react-12": "npm:@testing-library/react@^12", @@ -126,18 +126,18 @@ "@types/glob": "8.1.0", "@types/hoist-non-react-statics": "3.3.5", "@types/jest": "29.5.12", - "@types/lodash": "4.14.202", + "@types/lodash": "4.17.0", "@types/node": "20.11.28", "@types/node-fetch": "2.6.11", "@types/react": "18.2.67", "@types/react-dom": "18.2.22", "@types/relay-runtime": "14.1.23", "@types/use-sync-external-store": "0.0.6", - "@typescript-eslint/eslint-plugin": "7.1.1", - "@typescript-eslint/parser": "7.1.1", - "@typescript-eslint/rule-tester": "7.1.1", - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/utils": "7.1.1", + "@typescript-eslint/eslint-plugin": "7.3.0", + "@typescript-eslint/parser": "7.3.0", + "@typescript-eslint/rule-tester": "7.3.0", + "@typescript-eslint/types": "7.3.0", + "@typescript-eslint/utils": "7.3.0", "acorn": "8.11.3", "blob-polyfill": "7.0.20220408", "bytes": "3.1.2", @@ -170,7 +170,7 @@ "rollup-plugin-cleanup": "3.2.1", "rollup-plugin-terser": "7.0.2", "rxjs": "7.8.1", - "size-limit": "11.0.2", + "size-limit": "11.1.1", "subscriptions-transport-ws": "0.11.0", "terser": "5.29.2", "ts-api-utils": "1.3.0", From 3203cb834fc11cb904fac7469c1fca7f4e73db34 Mon Sep 17 00:00:00 2001 From: Alessia Bellisario Date: Mon, 18 Mar 2024 15:28:03 -0400 Subject: [PATCH 08/13] chore: remove NODE_VERSION from netlify.toml to unblock preview deploys (#11697) --- netlify.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index 510fb6a139b..363e4f0818d 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,9 +2,6 @@ publish = "docs/public" command = "npm run typedoc; npm run docmodel > docs/public/log.txt || true" -[build.environment] - NODE_VERSION = "18" - [context.deploy-preview.build] base = "docs" ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../src" From 835d5f30c532c432e2434561580e6f1ec44cc908 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Tue, 19 Mar 2024 13:39:18 +0100 Subject: [PATCH 09/13] expose `setErrorMessageHandler` (#11694) * expose `setErrorMessageHandler` * changeset * Clean up Prettier, Size-limit, and Api-Extractor * add export to exports shape test * add some clarifying comments and two more tests * Clean up Prettier, Size-limit, and Api-Extractor * Update eleven-doors-rescue.md --------- Co-authored-by: phryneas --- .api-reports/api-report-dev.md | 12 +- .changeset/eleven-doors-rescue.md | 5 + src/__tests__/__snapshots__/exports.ts.snap | 1 + src/dev/index.ts | 2 + src/dev/loadErrorMessageHandler.ts | 36 +++--- src/dev/setErrorMessageHandler.ts | 40 +++++++ .../__tests__/invariantWrappers.test.ts | 106 +++++++++++++----- src/utilities/globals/invariantWrappers.ts | 2 +- 8 files changed, 159 insertions(+), 45 deletions(-) create mode 100644 .changeset/eleven-doors-rescue.md create mode 100644 src/dev/setErrorMessageHandler.ts diff --git a/.api-reports/api-report-dev.md b/.api-reports/api-report-dev.md index 8f5baa9c781..9158589f56c 100644 --- a/.api-reports/api-report-dev.md +++ b/.api-reports/api-report-dev.md @@ -14,17 +14,25 @@ interface ErrorCodes { }; } +// @public +export type ErrorMessageHandler = { + (message: string | number, args: string[]): string | undefined; +}; + // @public (undocumented) export function loadDevMessages(): void; // Warning: (ae-forgotten-export) The symbol "ErrorCodes" needs to be exported by the entry point index.d.ts // -// @public (undocumented) -export function loadErrorMessageHandler(...errorCodes: ErrorCodes[]): ((message: string | number, args: unknown[]) => string | undefined) & ErrorCodes; +// @public +export function loadErrorMessageHandler(...errorCodes: ErrorCodes[]): ErrorMessageHandler & ErrorCodes; // @public (undocumented) export function loadErrorMessages(): void; +// @public +export function setErrorMessageHandler(handler: ErrorMessageHandler): void; + // (No @packageDocumentation comment for this package) ``` diff --git a/.changeset/eleven-doors-rescue.md b/.changeset/eleven-doors-rescue.md new file mode 100644 index 00000000000..89bc6bf6dbe --- /dev/null +++ b/.changeset/eleven-doors-rescue.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Expose `setErrorMessageHandler` from `@apollo/client/dev` entrypoint. diff --git a/src/__tests__/__snapshots__/exports.ts.snap b/src/__tests__/__snapshots__/exports.ts.snap index 9a16f9572d9..a2e89a93514 100644 --- a/src/__tests__/__snapshots__/exports.ts.snap +++ b/src/__tests__/__snapshots__/exports.ts.snap @@ -145,6 +145,7 @@ Array [ "loadDevMessages", "loadErrorMessageHandler", "loadErrorMessages", + "setErrorMessageHandler", ] `; diff --git a/src/dev/index.ts b/src/dev/index.ts index 7d6b01f873f..bf77b7e5326 100644 --- a/src/dev/index.ts +++ b/src/dev/index.ts @@ -1,3 +1,5 @@ export { loadDevMessages } from "./loadDevMessages.js"; export { loadErrorMessageHandler } from "./loadErrorMessageHandler.js"; export { loadErrorMessages } from "./loadErrorMessages.js"; +export { setErrorMessageHandler } from "./setErrorMessageHandler.js"; +export type { ErrorMessageHandler } from "./setErrorMessageHandler.js"; diff --git a/src/dev/loadErrorMessageHandler.ts b/src/dev/loadErrorMessageHandler.ts index ad18c159ed5..8f99a34ae9a 100644 --- a/src/dev/loadErrorMessageHandler.ts +++ b/src/dev/loadErrorMessageHandler.ts @@ -1,27 +1,31 @@ import type { ErrorCodes } from "../invariantErrorCodes.js"; import { global } from "../utilities/globals/index.js"; import { ApolloErrorMessageHandler } from "../utilities/globals/invariantWrappers.js"; +import type { ErrorMessageHandler } from "./setErrorMessageHandler.js"; +import { setErrorMessageHandler } from "./setErrorMessageHandler.js"; +/** + * Injects Apollo Client's default error message handler into the application and + * also loads the error codes that are passed in as arguments. + */ export function loadErrorMessageHandler(...errorCodes: ErrorCodes[]) { - if (!global[ApolloErrorMessageHandler]) { - global[ApolloErrorMessageHandler] = handler as typeof handler & ErrorCodes; - } + setErrorMessageHandler(handler as typeof handler & ErrorCodes); for (const codes of errorCodes) { - Object.assign(global[ApolloErrorMessageHandler], codes); + Object.assign(handler, codes); } - return global[ApolloErrorMessageHandler]; + return handler; +} - function handler(message: string | number, args: unknown[]) { - if (typeof message === "number") { - const definition = global[ApolloErrorMessageHandler]![message]; - if (!message || !definition?.message) return; - message = definition.message; - } - return args.reduce( - (msg, arg) => msg.replace(/%[sdfo]/, String(arg)), - String(message) - ); +const handler = ((message: string | number, args: unknown[]) => { + if (typeof message === "number") { + const definition = global[ApolloErrorMessageHandler]![message]; + if (!message || !definition?.message) return; + message = definition.message; } -} + return args.reduce( + (msg, arg) => msg.replace(/%[sdfo]/, String(arg)), + String(message) + ); +}) as ErrorMessageHandler & ErrorCodes; diff --git a/src/dev/setErrorMessageHandler.ts b/src/dev/setErrorMessageHandler.ts new file mode 100644 index 00000000000..2dc822d0485 --- /dev/null +++ b/src/dev/setErrorMessageHandler.ts @@ -0,0 +1,40 @@ +import type { ErrorCodes } from "../invariantErrorCodes.js"; +import { global } from "../utilities/globals/index.js"; +import { ApolloErrorMessageHandler } from "../utilities/globals/invariantWrappers.js"; + +/** + * The error message handler is a function that is called when a message is + * logged or an error is thrown to determine the contents of the error message + * to be logged or thrown. + */ +export type ErrorMessageHandler = { + /** + * @param message - Usually the error message number (as defined in + * `@apollo/client/invariantErrorCodes.js`). + * In some edge cases, this can already be a string, that can be passed through + * as an error message. + * + * @param args - The placeholders that can be passed into the error message (pre-stringified). + * These relate with the `%s` and `%d` [substitution strings](https://developer.mozilla.org/en-US/docs/Web/API/console#using_string_substitutions) + * in the error message defined in `@apollo/client/invariantErrorCodes.js`. + * + * ⚠️ Note that arguments will only be passed in for error messages. + * For normal log messages, you will get an empty array here and they will directly + * be passed to `console.log` instead, to have the string subsitution done by the + * engine, as that allows for nicer (and in the case of a browser, interactive) + * output. + * + * @returns The error message to be logged or thrown. If it returns `undefined`, + * the mechanism will fall back to the default: + * A link to https://go.apollo.dev/c/err with Apollo Client version, + * the error message number, and the error message arguments encoded into + * the URL hash. + */ (message: string | number, args: string[]): string | undefined; +}; + +/** + * Overrides the global "Error Message Handler" with a custom implementation. + */ +export function setErrorMessageHandler(handler: ErrorMessageHandler) { + global[ApolloErrorMessageHandler] = handler as typeof handler & ErrorCodes; +} diff --git a/src/utilities/globals/__tests__/invariantWrappers.test.ts b/src/utilities/globals/__tests__/invariantWrappers.test.ts index 2b750c534ed..b8f51390944 100644 --- a/src/utilities/globals/__tests__/invariantWrappers.test.ts +++ b/src/utilities/globals/__tests__/invariantWrappers.test.ts @@ -1,34 +1,56 @@ -import { loadErrorMessageHandler } from "../../../dev"; -import { spyOnConsole, withCleanup } from "../../../testing/internal"; +import { spyOnConsole } from "../../../testing/internal"; import { ApolloErrorMessageHandler, InvariantError, invariant, } from "../invariantWrappers"; +function withDev() { + const originalErrorMessageHandler = window[ApolloErrorMessageHandler]; + window[ApolloErrorMessageHandler] = undefined; + let dev: typeof import("../../../dev"); + let restore = () => {}; + // we're running the test inside of `jest.isolateModulesAsync` to avoid + // the test overriding the module-level state of the `dev` module + const cleanupFinished = jest.isolateModulesAsync( + () => + new Promise((resolve) => { + dev = require("../../../dev"); + restore = resolve; + }) + ); + // replicate the code of `src/config/jest/setup.ts` + dev!.loadErrorMessageHandler(); + return { + ...dev!, + async [Symbol.asyncDispose]() { + restore(); + await cleanupFinished; + window[ApolloErrorMessageHandler] = originalErrorMessageHandler; + }, + }; +} + function disableErrorMessageHandler() { - const original = window[ApolloErrorMessageHandler]; + // eslint-disable-next-line local-rules/require-using-disposable + const dev = withDev(); delete window[ApolloErrorMessageHandler]; - return withCleanup({ original }, ({ original }) => { - window[ApolloErrorMessageHandler] = original; - }); + return dev; } function mockErrorMessageHandler() { - const original = window[ApolloErrorMessageHandler]; + // eslint-disable-next-line local-rules/require-using-disposable + const dev = withDev(); delete window[ApolloErrorMessageHandler]; - loadErrorMessageHandler({ + dev.loadErrorMessageHandler({ 5: { file: "foo", message: "Replacing %s, %d, %f, %o" }, }); - - return withCleanup({ original }, ({ original }) => { - window[ApolloErrorMessageHandler] = original; - }); + return dev; } -test("base invariant(false, 5, ...), no handlers", () => { - using _ = disableErrorMessageHandler(); +test("base invariant(false, 5, ...), no handlers", async () => { + await using _ = disableErrorMessageHandler(); expect(() => { invariant(false, 5, "string", 1, 1.1, { a: 1 }); }).toThrow( @@ -50,29 +72,47 @@ test("base invariant(false, 5, ...), no handlers", () => { ); }); -test("base invariant(false, 5, ...), handlers in place", () => { - using _ = mockErrorMessageHandler(); +test("base invariant(false, 5, ...), handlers in place", async () => { + await using _ = mockErrorMessageHandler(); expect(() => { invariant(false, 5, "string", 1, 1.1, { a: 1 }); }).toThrow(new InvariantError('Replacing string, 1, 1.1, {\n "a": 1\n}')); }); -test("base invariant(false, undefined), no handlers", () => { - using _ = disableErrorMessageHandler(); +test("base invariant(false, 5, ...), custom handler gets passed arguments", async () => { + await using dev = disableErrorMessageHandler(); + + const handler = jest.fn(() => ""); + dev.setErrorMessageHandler(handler); + + try { + invariant(false, 5, "string", 1, 1.1, { a: 1 }); + } catch {} + + expect(handler).toHaveBeenCalledWith(5, [ + "string", + "1", + "1.1", + '{\n "a": 1\n}', + ]); +}); + +test("base invariant(false, undefined), no handlers", async () => { + await using _ = disableErrorMessageHandler(); expect(() => { invariant(false); }).toThrow(new InvariantError("Invariant Violation")); }); -test("base invariant(false, undefined), handlers in place", () => { - using _ = mockErrorMessageHandler(); +test("base invariant(false, undefined), handlers in place", async () => { + await using _ = mockErrorMessageHandler(); expect(() => { invariant(false); }).toThrow(new InvariantError("Invariant Violation")); }); -test("invariant.log(5, ...), no handlers", () => { - using _ = disableErrorMessageHandler(); +test("invariant.log(5, ...), no handlers", async () => { + await using _ = disableErrorMessageHandler(); using consoleSpy = spyOnConsole("log"); invariant.log(5, "string", 1, 1.1, { a: 1 }); expect(consoleSpy.log).toHaveBeenCalledWith( @@ -87,8 +127,8 @@ test("invariant.log(5, ...), no handlers", () => { ); }); -test("invariant.log(5, ...), with handlers", () => { - using _ = mockErrorMessageHandler(); +test("invariant.log(5, ...), with handlers", async () => { + await using _ = mockErrorMessageHandler(); using consoleSpy = spyOnConsole("log"); invariant.log(5, "string", 1, 1.1, { a: 1 }); expect(consoleSpy.log).toHaveBeenCalledWith( @@ -100,8 +140,22 @@ test("invariant.log(5, ...), with handlers", () => { ); }); -test("base invariant(false, 6, ...), raises fallback", () => { - using _ = mockErrorMessageHandler(); +test("invariant.log(5, ...), custom handler does not get passed arguments", async () => { + await using dev = disableErrorMessageHandler(); + using _consoleSpy = spyOnConsole("log"); + + const handler = jest.fn(() => ""); + dev.setErrorMessageHandler(handler); + + try { + invariant.log(5, "string", 1, 1.1, { a: 1 }); + } catch {} + + expect(handler).toHaveBeenCalledWith(5, []); +}); + +test("base invariant(false, 6, ...), raises fallback", async () => { + await using _ = mockErrorMessageHandler(); expect(() => { invariant(false, 6, "hello"); }).toThrow( diff --git a/src/utilities/globals/invariantWrappers.ts b/src/utilities/globals/invariantWrappers.ts index 6ea4c4d884b..81070cbbb7d 100644 --- a/src/utilities/globals/invariantWrappers.ts +++ b/src/utilities/globals/invariantWrappers.ts @@ -111,7 +111,7 @@ const ApolloErrorMessageHandler = Symbol.for( declare global { interface Window { [ApolloErrorMessageHandler]?: { - (message: string | number, args: unknown[]): string | undefined; + (message: string | number, args: string[]): string | undefined; } & ErrorCodes; } } From 591c2b61e535240a488ba765485d9444ac47c7b8 Mon Sep 17 00:00:00 2001 From: Alessia Bellisario Date: Tue, 19 Mar 2024 14:19:47 -0400 Subject: [PATCH 10/13] chore: skip prerelease versioning step if head commit contains version packages (#11703) --- .github/workflows/prerelease.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 610364b8625..7b33c3e8d63 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -59,7 +59,9 @@ jobs: run: npx changeset pre enter alpha - name: Create prerelease PR - if: steps.check_files.outputs.files_exists == 'true' + # If .changeset/pre.json exists and we are not currently cutting a + # release after merging a Version Packages PR + if: steps.check_files.outputs.files_exists == 'true' && !startsWith(github.event.head_commit.message, 'Version Packages') uses: changesets/action@v1 with: version: npm run changeset-version From 8619bc7e569c1c732afa6faf605c83a6ce0cdf0c Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Wed, 20 Mar 2024 12:01:48 -0600 Subject: [PATCH 11/13] Fix issue where an empty array returned from `fetchMore` would rerender with an empty list (#11706) --- .changeset/curly-berries-hammer.md | 5 + .size-limits.json | 2 +- .../__tests__/useBackgroundQuery.test.tsx | 11 +- .../hooks/__tests__/useLoadableQuery.test.tsx | 26 +++- .../__tests__/useQueryRefHandlers.test.tsx | 65 +++++++- .../hooks/__tests__/useSuspenseQuery.test.tsx | 144 ++++++++++++++++++ src/react/internal/cache/QueryReference.ts | 14 +- 7 files changed, 252 insertions(+), 15 deletions(-) create mode 100644 .changeset/curly-berries-hammer.md diff --git a/.changeset/curly-berries-hammer.md b/.changeset/curly-berries-hammer.md new file mode 100644 index 00000000000..7b05ebad124 --- /dev/null +++ b/.changeset/curly-berries-hammer.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Fix issue in all suspense hooks where returning an empty array after calling `fetchMore` would rerender the component with an empty list. diff --git a/.size-limits.json b/.size-limits.json index 6ea6a4c6ebc..2c7dbd56314 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,4 +1,4 @@ { - "dist/apollo-client.min.cjs": 39267, + "dist/apollo-client.min.cjs": 39273, "import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32630 } diff --git a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx index ac7477d51f7..adcc9f430d2 100644 --- a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx +++ b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx @@ -4795,6 +4795,15 @@ describe("refetch", () => { describe("fetchMore", () => { it("re-suspends when calling `fetchMore` with different variables", async () => { const { query, link } = setupPaginatedCase(); + const cache = new InMemoryCache({ + typePolicies: { + Query: { + fields: { + letters: { keyArgs: false }, + }, + }, + }, + }); const user = userEvent.setup(); const Profiler = createDefaultProfiler(); const { SuspenseFallback, ReadQueryHook } = @@ -4818,7 +4827,7 @@ describe("fetchMore", () => { ); } - renderWithMocks(, { link, wrapper: Profiler }); + renderWithMocks(, { cache, link, wrapper: Profiler }); { const { renderedComponents } = await Profiler.takeRender(); diff --git a/src/react/hooks/__tests__/useLoadableQuery.test.tsx b/src/react/hooks/__tests__/useLoadableQuery.test.tsx index 68ef6a7e9a7..4001dea7bd6 100644 --- a/src/react/hooks/__tests__/useLoadableQuery.test.tsx +++ b/src/react/hooks/__tests__/useLoadableQuery.test.tsx @@ -49,6 +49,7 @@ import { Profiler, SimpleCaseData, createProfiler, + setupPaginatedCase, setupSimpleCase, spyOnConsole, useTrackRenders, @@ -3205,7 +3206,22 @@ it("`refetch` works with startTransition to allow React to show stale UI until f }); it("re-suspends when calling `fetchMore` with different variables", async () => { - const { query, client } = usePaginatedQueryCase(); + const { query, link } = setupPaginatedCase(); + + const client = new ApolloClient({ + link, + cache: new InMemoryCache({ + typePolicies: { + Query: { + fields: { + letters: { + keyArgs: false, + }, + }, + }, + }, + }), + }); const Profiler = createDefaultProfiler(); const { SuspenseFallback, ReadQueryHook } = @@ -3244,8 +3260,8 @@ it("re-suspends when calling `fetchMore` with different variables", async () => expect(snapshot.result).toEqual({ data: { letters: [ - { letter: "A", position: 1 }, - { letter: "B", position: 2 }, + { __typename: "Letter", letter: "A", position: 1 }, + { __typename: "Letter", letter: "B", position: 2 }, ], }, error: undefined, @@ -3268,8 +3284,8 @@ it("re-suspends when calling `fetchMore` with different variables", async () => expect(snapshot.result).toEqual({ data: { letters: [ - { letter: "C", position: 3 }, - { letter: "D", position: 4 }, + { __typename: "Letter", letter: "C", position: 3 }, + { __typename: "Letter", letter: "D", position: 4 }, ], }, error: undefined, diff --git a/src/react/hooks/__tests__/useQueryRefHandlers.test.tsx b/src/react/hooks/__tests__/useQueryRefHandlers.test.tsx index a7f2dd72f43..a81c64d8373 100644 --- a/src/react/hooks/__tests__/useQueryRefHandlers.test.tsx +++ b/src/react/hooks/__tests__/useQueryRefHandlers.test.tsx @@ -1100,7 +1100,18 @@ test("resuspends when calling `fetchMore`", async () => { const user = userEvent.setup(); - const client = new ApolloClient({ cache: new InMemoryCache(), link }); + const client = new ApolloClient({ + cache: new InMemoryCache({ + typePolicies: { + Query: { + fields: { + letters: { keyArgs: false }, + }, + }, + }, + }), + link, + }); const preloadQuery = createQueryPreloader(client); const Profiler = createProfiler({ @@ -1397,7 +1408,18 @@ test("paginates from queryRefs produced by useBackgroundQuery", async () => { const { query, link } = setupPaginatedCase(); const user = userEvent.setup(); - const client = new ApolloClient({ cache: new InMemoryCache(), link }); + const client = new ApolloClient({ + cache: new InMemoryCache({ + typePolicies: { + Query: { + fields: { + letters: { keyArgs: false }, + }, + }, + }, + }), + link, + }); const Profiler = createProfiler({ initialSnapshot: { @@ -1489,7 +1511,18 @@ test("paginates from queryRefs produced by useLoadableQuery", async () => { const { query, link } = setupPaginatedCase(); const user = userEvent.setup(); - const client = new ApolloClient({ cache: new InMemoryCache(), link }); + const client = new ApolloClient({ + cache: new InMemoryCache({ + typePolicies: { + Query: { + fields: { + letters: { keyArgs: false }, + }, + }, + }, + }), + link, + }); const Profiler = createProfiler({ initialSnapshot: { @@ -1589,7 +1622,18 @@ test("`fetchMore` works with startTransition", async () => { const { query, link } = setupPaginatedCase(); const user = userEvent.setup(); - const client = new ApolloClient({ cache: new InMemoryCache(), link }); + const client = new ApolloClient({ + cache: new InMemoryCache({ + typePolicies: { + Query: { + fields: { + letters: { keyArgs: false }, + }, + }, + }, + }), + link, + }); const preloadQuery = createQueryPreloader(client); const Profiler = createProfiler({ @@ -1708,7 +1752,18 @@ test("`fetchMore` works with startTransition from useBackgroundQuery and useQuer const { query, link } = setupPaginatedCase(); const user = userEvent.setup(); - const client = new ApolloClient({ cache: new InMemoryCache(), link }); + const client = new ApolloClient({ + cache: new InMemoryCache({ + typePolicies: { + Query: { + fields: { + letters: { keyArgs: false }, + }, + }, + }, + }), + link, + }); const Profiler = createProfiler({ initialSnapshot: { diff --git a/src/react/hooks/__tests__/useSuspenseQuery.test.tsx b/src/react/hooks/__tests__/useSuspenseQuery.test.tsx index 4e32f276c72..9a0e61fd55f 100644 --- a/src/react/hooks/__tests__/useSuspenseQuery.test.tsx +++ b/src/react/hooks/__tests__/useSuspenseQuery.test.tsx @@ -10109,6 +10109,150 @@ describe("useSuspenseQuery", () => { await expect(Profiler).not.toRerender(); }); + // https://github.com/apollographql/apollo-client/issues/11642 + it("returns merged array when `fetchMore` returns empty array of results", async () => { + const query: TypedDocumentNode = + gql` + query LettersQuery($limit: Int, $offset: Int) { + letters(limit: $limit, offset: $offset) { + letter + position + } + } + `; + + const data = "ABCD".split("").map((letter, index) => ({ + __typename: "Letter", + letter, + position: index + 1, + })); + + const link = new MockLink([ + { + request: { query, variables: { offset: 0, limit: 2 } }, + result: { data: { letters: data.slice(0, 2) } }, + delay: 20, + }, + { + request: { query, variables: { offset: 2, limit: 2 } }, + result: { data: { letters: data.slice(2, 4) } }, + delay: 20, + }, + { + request: { query, variables: { offset: 4, limit: 2 } }, + result: { data: { letters: [] } }, + delay: 20, + }, + ]); + + const user = userEvent.setup(); + const client = new ApolloClient({ + cache: new InMemoryCache({ + typePolicies: { + Query: { + fields: { + letters: offsetLimitPagination(), + }, + }, + }, + }), + link, + }); + + const Profiler = createProfiler({ + initialSnapshot: { + result: null as UseSuspenseQueryResult< + PaginatedCaseData, + PaginatedCaseVariables + > | null, + }, + }); + + function App() { + useTrackRenders(); + const result = useSuspenseQuery(query, { + variables: { offset: 0, limit: 2 }, + }); + const { data, fetchMore } = result; + + Profiler.mergeSnapshot({ result }); + + return ( + + ); + } + + render(, { + wrapper: ({ children }) => ( + + + Loading...}>{children} + + + ), + }); + + // initial suspended render + await Profiler.takeRender(); + + { + const { snapshot, renderedComponents } = await Profiler.takeRender(); + + expect(renderedComponents).toStrictEqual([App]); + expect(snapshot.result?.data).toEqual({ + letters: [ + { __typename: "Letter", letter: "A", position: 1 }, + { __typename: "Letter", letter: "B", position: 2 }, + ], + }); + } + + await act(() => user.click(screen.getByText("Fetch next"))); + await Profiler.takeRender(); + + { + const { snapshot } = await Profiler.takeRender(); + + expect(snapshot.result?.data).toEqual({ + letters: [ + { __typename: "Letter", letter: "A", position: 1 }, + { __typename: "Letter", letter: "B", position: 2 }, + { __typename: "Letter", letter: "C", position: 3 }, + { __typename: "Letter", letter: "D", position: 4 }, + ], + }); + } + + await act(() => user.click(screen.getByText("Fetch next"))); + await Profiler.takeRender(); + + { + const { snapshot } = await Profiler.takeRender(); + + expect(snapshot.result?.data).toEqual({ + letters: [ + { __typename: "Letter", letter: "A", position: 1 }, + { __typename: "Letter", letter: "B", position: 2 }, + { __typename: "Letter", letter: "C", position: 3 }, + { __typename: "Letter", letter: "D", position: 4 }, + ], + }); + } + + await expect(Profiler).not.toRerender(); + }); + describe.skip("type tests", () => { it("returns unknown when TData cannot be inferred", () => { const query = gql` diff --git a/src/react/internal/cache/QueryReference.ts b/src/react/internal/cache/QueryReference.ts index 83b4f20ac49..110a0823bb8 100644 --- a/src/react/internal/cache/QueryReference.ts +++ b/src/react/internal/cache/QueryReference.ts @@ -377,7 +377,7 @@ export class InternalQueryReference { // to resolve the promise if `handleNext` hasn't been run to ensure the // promise is resolved correctly. returnedPromise - .then((result) => { + .then(() => { // In the case of `fetchMore`, this promise is resolved before a cache // result is emitted due to the fact that `fetchMore` sets a `no-cache` // fetch policy and runs `cache.batch` in its `.then` handler. Because @@ -390,8 +390,16 @@ export class InternalQueryReference { // more information setTimeout(() => { if (this.promise.status === "pending") { - this.result = result; - this.resolve?.(result); + // Use the current result from the observable instead of the value + // resolved from the promise. This avoids issues in some cases where + // the raw resolved value should not be the emitted value, such as + // when a `fetchMore` call returns an empty array after it has + // reached the end of the list. + // + // See the following for more information: + // https://github.com/apollographql/apollo-client/issues/11642 + this.result = this.observable.getCurrentResult(); + this.resolve?.(this.result); } }); }) From 642092c713199093aede45f105a1ee3f637614cd Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Wed, 20 Mar 2024 12:33:21 -0600 Subject: [PATCH 12/13] Fix issue where setting `defaultOptions` would sometimes break `startTransition` for suspense hooks (#11713) --- .changeset/tasty-hotels-press.md | 5 + .size-limits.json | 2 +- .../__tests__/useBackgroundQuery.test.tsx | 204 ++++++++++++++++ .../hooks/__tests__/useSuspenseQuery.test.tsx | 219 ++++++++++++++++++ src/react/internal/cache/QueryReference.ts | 1 + 5 files changed, 430 insertions(+), 1 deletion(-) create mode 100644 .changeset/tasty-hotels-press.md diff --git a/.changeset/tasty-hotels-press.md b/.changeset/tasty-hotels-press.md new file mode 100644 index 00000000000..c79a5db61d6 --- /dev/null +++ b/.changeset/tasty-hotels-press.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Fix issue where setting a default `watchQuery` option in the `ApolloClient` constructor could break `startTransition` when used with suspense hooks. diff --git a/.size-limits.json b/.size-limits.json index 2c7dbd56314..10e91f0ebf7 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,4 +1,4 @@ { - "dist/apollo-client.min.cjs": 39273, + "dist/apollo-client.min.cjs": 39277, "import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32630 } diff --git a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx index adcc9f430d2..045f7221e7a 100644 --- a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx +++ b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx @@ -5249,6 +5249,210 @@ describe("fetchMore", () => { await expect(Profiler).not.toRerender(); }); + + // https://github.com/apollographql/apollo-client/issues/11708 + it("`fetchMore` works with startTransition when setting errorPolicy as default option in ApolloClient constructor", async () => { + type Variables = { + offset: number; + }; + + interface Todo { + __typename: "Todo"; + id: string; + name: string; + completed: boolean; + } + interface Data { + todos: Todo[]; + } + const user = userEvent.setup(); + + const query: TypedDocumentNode = gql` + query TodosQuery($offset: Int!) { + todos(offset: $offset) { + id + name + completed + } + } + `; + + const mocks: MockedResponse[] = [ + { + request: { query, variables: { offset: 0 } }, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "1", + name: "Clean room", + completed: false, + }, + ], + }, + }, + delay: 10, + }, + { + request: { query, variables: { offset: 1 } }, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "2", + name: "Take out trash", + completed: true, + }, + ], + }, + }, + delay: 10, + }, + ]; + + const Profiler = createProfiler({ + initialSnapshot: { + isPending: false, + result: null as UseReadQueryResult | null, + }, + }); + + const { SuspenseFallback, ReadQueryHook } = + createDefaultTrackedComponents(Profiler); + + const client = new ApolloClient({ + link: new MockLink(mocks), + cache: new InMemoryCache({ + typePolicies: { + Query: { + fields: { + todos: offsetLimitPagination(), + }, + }, + }, + }), + defaultOptions: { + watchQuery: { + errorPolicy: "all", + }, + }, + }); + + function App() { + useTrackRenders(); + const [isPending, startTransition] = React.useTransition(); + const [queryRef, { fetchMore }] = useBackgroundQuery(query, { + variables: { offset: 0 }, + }); + + Profiler.mergeSnapshot({ isPending }); + + return ( + <> + + }> + + + + ); + } + + renderWithClient(, { client, wrapper: Profiler }); + + { + const { renderedComponents } = await Profiler.takeRender(); + + expect(renderedComponents).toStrictEqual([App, SuspenseFallback]); + } + + { + const { snapshot } = await Profiler.takeRender(); + + expect(snapshot).toEqual({ + isPending: false, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "1", + name: "Clean room", + completed: false, + }, + ], + }, + error: undefined, + networkStatus: NetworkStatus.ready, + }, + }); + } + + await act(() => user.click(screen.getByText("Load more"))); + + { + const { snapshot, renderedComponents } = await Profiler.takeRender(); + + expect(renderedComponents).toStrictEqual([App, ReadQueryHook]); + expect(snapshot).toEqual({ + isPending: true, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "1", + name: "Clean room", + completed: false, + }, + ], + }, + error: undefined, + networkStatus: NetworkStatus.ready, + }, + }); + } + + { + const { snapshot, renderedComponents } = await Profiler.takeRender(); + + expect(renderedComponents).toStrictEqual([App, ReadQueryHook]); + expect(snapshot).toEqual({ + isPending: false, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "1", + name: "Clean room", + completed: false, + }, + { + __typename: "Todo", + id: "2", + name: "Take out trash", + completed: true, + }, + ], + }, + error: undefined, + networkStatus: NetworkStatus.ready, + }, + }); + } + + await expect(Profiler).not.toRerender(); + }); }); describe.skip("type tests", () => { diff --git a/src/react/hooks/__tests__/useSuspenseQuery.test.tsx b/src/react/hooks/__tests__/useSuspenseQuery.test.tsx index 9a0e61fd55f..9fbbc524521 100644 --- a/src/react/hooks/__tests__/useSuspenseQuery.test.tsx +++ b/src/react/hooks/__tests__/useSuspenseQuery.test.tsx @@ -10109,6 +10109,225 @@ describe("useSuspenseQuery", () => { await expect(Profiler).not.toRerender(); }); + // https://github.com/apollographql/apollo-client/issues/11708 + it("`fetchMore` works with startTransition when setting errorPolicy as default option in ApolloClient constructor", async () => { + type Variables = { + offset: number; + }; + + interface Todo { + __typename: "Todo"; + id: string; + name: string; + completed: boolean; + } + interface Data { + todos: Todo[]; + } + const user = userEvent.setup(); + + const query: TypedDocumentNode = gql` + query TodosQuery($offset: Int!) { + todos(offset: $offset) { + id + name + completed + } + } + `; + + const mocks: MockedResponse[] = [ + { + request: { query, variables: { offset: 0 } }, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "1", + name: "Clean room", + completed: false, + }, + ], + }, + }, + delay: 10, + }, + { + request: { query, variables: { offset: 1 } }, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "2", + name: "Take out trash", + completed: true, + }, + ], + }, + }, + delay: 10, + }, + ]; + + const Profiler = createProfiler({ + initialSnapshot: { + isPending: false, + result: null as Pick< + UseSuspenseQueryResult, + "data" | "error" | "networkStatus" + > | null, + }, + }); + + function SuspenseFallback() { + useTrackRenders(); + + return
Loading...
; + } + + const client = new ApolloClient({ + link: new MockLink(mocks), + cache: new InMemoryCache({ + typePolicies: { + Query: { + fields: { + todos: offsetLimitPagination(), + }, + }, + }, + }), + defaultOptions: { + watchQuery: { + errorPolicy: "all", + }, + }, + }); + + function App() { + useTrackRenders(); + const [isPending, startTransition] = React.useTransition(); + const { data, error, networkStatus, fetchMore } = useSuspenseQuery( + query, + { + variables: { offset: 0 }, + } + ); + + Profiler.mergeSnapshot({ + isPending, + result: { data, error, networkStatus }, + }); + + return ( + + ); + } + + render(, { + wrapper: ({ children }) => ( + + + }>{children} + + + ), + }); + + { + const { renderedComponents } = await Profiler.takeRender(); + + expect(renderedComponents).toStrictEqual([SuspenseFallback]); + } + + { + const { snapshot } = await Profiler.takeRender(); + + expect(snapshot).toEqual({ + isPending: false, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "1", + name: "Clean room", + completed: false, + }, + ], + }, + error: undefined, + networkStatus: NetworkStatus.ready, + }, + }); + } + + await act(() => user.click(screen.getByText("Load more"))); + + { + const { snapshot, renderedComponents } = await Profiler.takeRender(); + + expect(renderedComponents).toStrictEqual([App]); + expect(snapshot).toEqual({ + isPending: true, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "1", + name: "Clean room", + completed: false, + }, + ], + }, + error: undefined, + networkStatus: NetworkStatus.ready, + }, + }); + } + + { + const { snapshot, renderedComponents } = await Profiler.takeRender(); + + expect(renderedComponents).toStrictEqual([App]); + expect(snapshot).toEqual({ + isPending: false, + result: { + data: { + todos: [ + { + __typename: "Todo", + id: "1", + name: "Clean room", + completed: false, + }, + { + __typename: "Todo", + id: "2", + name: "Take out trash", + completed: true, + }, + ], + }, + error: undefined, + networkStatus: NetworkStatus.ready, + }, + }); + } + + await expect(Profiler).not.toRerender(); + }); + // https://github.com/apollographql/apollo-client/issues/11642 it("returns merged array when `fetchMore` returns empty array of results", async () => { const query: TypedDocumentNode = diff --git a/src/react/internal/cache/QueryReference.ts b/src/react/internal/cache/QueryReference.ts index 110a0823bb8..68efe9272b7 100644 --- a/src/react/internal/cache/QueryReference.ts +++ b/src/react/internal/cache/QueryReference.ts @@ -253,6 +253,7 @@ export class InternalQueryReference { didChangeOptions(watchQueryOptions: ObservedOptions) { return OBSERVED_CHANGED_OPTIONS.some( (option) => + option in watchQueryOptions && !equal(this.watchQueryOptions[option], watchQueryOptions[option]) ); } From a0d114e3545680ed75bc1edc096fd9de197969aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:07:25 -0600 Subject: [PATCH 13/13] Version Packages (#11695) Co-authored-by: github-actions[bot] --- .changeset/curly-berries-hammer.md | 5 ----- .changeset/eleven-doors-rescue.md | 5 ----- .changeset/flat-singers-kiss.md | 5 ----- .changeset/tasty-hotels-press.md | 5 ----- CHANGELOG.md | 12 ++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 .changeset/curly-berries-hammer.md delete mode 100644 .changeset/eleven-doors-rescue.md delete mode 100644 .changeset/flat-singers-kiss.md delete mode 100644 .changeset/tasty-hotels-press.md diff --git a/.changeset/curly-berries-hammer.md b/.changeset/curly-berries-hammer.md deleted file mode 100644 index 7b05ebad124..00000000000 --- a/.changeset/curly-berries-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Fix issue in all suspense hooks where returning an empty array after calling `fetchMore` would rerender the component with an empty list. diff --git a/.changeset/eleven-doors-rescue.md b/.changeset/eleven-doors-rescue.md deleted file mode 100644 index 89bc6bf6dbe..00000000000 --- a/.changeset/eleven-doors-rescue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Expose `setErrorMessageHandler` from `@apollo/client/dev` entrypoint. diff --git a/.changeset/flat-singers-kiss.md b/.changeset/flat-singers-kiss.md deleted file mode 100644 index 74727e85370..00000000000 --- a/.changeset/flat-singers-kiss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Fix issue where passing a new `from` option to `useFragment` would first render with the previous value before rerendering with the correct value. diff --git a/.changeset/tasty-hotels-press.md b/.changeset/tasty-hotels-press.md deleted file mode 100644 index c79a5db61d6..00000000000 --- a/.changeset/tasty-hotels-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Fix issue where setting a default `watchQuery` option in the `ApolloClient` constructor could break `startTransition` when used with suspense hooks. diff --git a/CHANGELOG.md b/CHANGELOG.md index 049c6173381..14782a4ef00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # @apollo/client +## 3.9.8 + +### Patch Changes + +- [#11706](https://github.com/apollographql/apollo-client/pull/11706) [`8619bc7`](https://github.com/apollographql/apollo-client/commit/8619bc7e569c1c732afa6faf605c83a6ce0cdf0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue in all suspense hooks where returning an empty array after calling `fetchMore` would rerender the component with an empty list. + +- [#11694](https://github.com/apollographql/apollo-client/pull/11694) [`835d5f3`](https://github.com/apollographql/apollo-client/commit/835d5f30c532c432e2434561580e6f1ec44cc908) Thanks [@phryneas](https://github.com/phryneas)! - Expose `setErrorMessageHandler` from `@apollo/client/dev` entrypoint. + +- [#11689](https://github.com/apollographql/apollo-client/pull/11689) [`cb8ffe5`](https://github.com/apollographql/apollo-client/commit/cb8ffe50e903397f741b62a44624bfe69b5f7b75) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where passing a new `from` option to `useFragment` would first render with the previous value before rerendering with the correct value. + +- [#11713](https://github.com/apollographql/apollo-client/pull/11713) [`642092c`](https://github.com/apollographql/apollo-client/commit/642092c713199093aede45f105a1ee3f637614cd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where setting a default `watchQuery` option in the `ApolloClient` constructor could break `startTransition` when used with suspense hooks. + ## 3.9.7 ### Patch Changes diff --git a/package-lock.json b/package-lock.json index 92224a3e029..8ff7c53fb85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@apollo/client", - "version": "3.9.7", + "version": "3.9.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@apollo/client", - "version": "3.9.7", + "version": "3.9.8", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 431659e8808..edd3b04303a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/client", - "version": "3.9.7", + "version": "3.9.8", "description": "A fully-featured caching GraphQL client.", "private": true, "keywords": [