From dc67e24e725c32ab62b7b3ce223fe211a16970ca Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Wed, 22 Nov 2023 11:33:23 +0100 Subject: [PATCH 01/12] disable `removeComments`, add docmodel, inheritDoc processing (#11290) Co-authored-by: Jerel Miller Co-authored-by: phryneas --- .api-reports/api-report-cache.md | 37 +-- .api-reports/api-report-core.md | 175 ++++-------- .api-reports/api-report-link_batch-http.md | 20 +- .api-reports/api-report-link_batch.md | 5 - .api-reports/api-report-link_error.md | 2 - .api-reports/api-report-link_http.md | 12 +- .api-reports/api-report-link_retry.md | 13 +- .api-reports/api-report-link_schema.md | 4 - .api-reports/api-report-link_ws.md | 8 - .api-reports/api-report-react.md | 212 +++++---------- .api-reports/api-report-react_components.md | 191 +++++-------- .api-reports/api-report-react_context.md | 189 +++++-------- .api-reports/api-report-react_hoc.md | 187 +++++-------- .api-reports/api-report-react_hooks.md | 204 +++++--------- .api-reports/api-report-react_ssr.md | 187 +++++-------- .api-reports/api-report-testing.md | 196 +++++--------- .api-reports/api-report-testing_core.md | 195 +++++--------- .api-reports/api-report-utilities.md | 205 +++++--------- .api-reports/api-report-utilities_globals.md | 4 +- .api-reports/api-report.md | 200 ++++---------- api-extractor.json | 13 +- config/apiExtractor.ts | 68 ++++- config/inlineInheritDoc.ts | 148 ++++++++++ config/rollup.config.js | 9 +- docs/source/api/core/ApolloClient.mdx | 268 +++---------------- netlify.toml | 7 +- package-lock.json | 154 +++++++++++ package.json | 20 +- src/cache/core/cache.ts | 5 - src/cache/inmemory/readFromStore.ts | 3 - src/cache/inmemory/types.ts | 6 + src/core/ApolloClient.ts | 115 +++++--- src/core/ObservableQuery.ts | 6 +- src/core/watchQueryOptions.ts | 31 ++- src/testing/core/observableToPromise.ts | 27 +- tsconfig.json | 1 - 36 files changed, 1265 insertions(+), 1862 deletions(-) create mode 100644 config/inlineInheritDoc.ts diff --git a/.api-reports/api-report-cache.md b/.api-reports/api-report-cache.md index 97cea465367..857db061da9 100644 --- a/.api-reports/api-report-cache.md +++ b/.api-reports/api-report-cache.md @@ -27,7 +27,6 @@ export abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -49,7 +48,6 @@ export abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -75,7 +73,7 @@ export type ApolloReducerConfig = { addTypename?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -219,40 +217,27 @@ export namespace DataProxy { }; // (undocumented) export interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) export interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // (undocumented) export interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) export interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) @@ -266,11 +251,8 @@ export namespace DataProxy { } // (undocumented) export interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // (undocumented) @@ -278,15 +260,11 @@ export namespace DataProxy { } } -// @public (undocumented) +// @public export interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -472,7 +450,7 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -706,7 +684,7 @@ export type Modifiers = Record> = [FieldName in keyof T]: Modifier>>; }>; -// @public (undocumented) +// @public export interface NormalizedCache { // (undocumented) canRead: CanReadFunction; @@ -732,17 +710,14 @@ export interface NormalizedCache { modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; // (undocumented) release(rootId: string): number; - // (undocumented) replace(newData: NormalizedCacheObject): void; - // (undocumented) retain(rootId: string): number; - // (undocumented) toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } -// @public (undocumented) +// @public export interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -960,7 +935,7 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:98:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:126:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// src/cache/inmemory/types.ts:132:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-core.md b/.api-reports/api-report-core.md index fd6d4166e6f..2204a1a7244 100644 --- a/.api-reports/api-report-core.md +++ b/.api-reports/api-report-core.md @@ -44,7 +44,6 @@ export abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -66,7 +65,6 @@ export abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -86,97 +84,82 @@ export abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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) __actionHookForDevTools(cb: () => any): void; constructor(options: ApolloClientOptions); // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // (undocumented) link: ApolloLink; - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; - // (undocumented) query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; - // (undocumented) + // 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"]; // (undocumented) version: string; - // (undocumented) watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -export type ApolloClientOptions = { - uri?: string | UriFunction; +export interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) export class ApolloError extends Error { @@ -271,7 +254,7 @@ export type ApolloReducerConfig = { addTypename?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -449,7 +432,7 @@ export const concat: typeof ApolloLink.concat; // @public (undocumented) export const createHttpLink: (linkOptions?: HttpOptions) => ApolloLink; -// @public (undocumented) +// @public @deprecated (undocumented) export const createSignalIfSupported: () => { controller: boolean; signal: boolean; @@ -469,40 +452,27 @@ export namespace DataProxy { }; // (undocumented) export interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) export interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // (undocumented) export interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) export interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) @@ -516,11 +486,8 @@ export namespace DataProxy { } // (undocumented) export interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // (undocumented) @@ -528,15 +495,11 @@ export namespace DataProxy { } } -// @public (undocumented) +// @public export interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -715,7 +678,7 @@ namespace EntityStore { } } -// @public (undocumented) +// @public export type ErrorPolicy = "none" | "ignore" | "all"; // @public (undocumented) @@ -787,7 +750,7 @@ export interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // @public (undocumented) @@ -862,7 +825,7 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -933,25 +896,15 @@ export class HttpLink extends ApolloLink { // @public (undocumented) export interface HttpOptions { - // (undocumented) credentials?: string; - // (undocumented) fetch?: WindowOrWorkerGlobalScope["fetch"]; - // (undocumented) fetchOptions?: any; - // (undocumented) headers?: Record; - // (undocumented) includeExtensions?: boolean; - // (undocumented) includeUnusedVariables?: boolean; - // (undocumented) preserveHeaderCase?: boolean; - // (undocumented) print?: Printer; - // (undocumented) uri?: string | UriFunction; - // (undocumented) useGETForQueries?: boolean; } @@ -1098,7 +1051,7 @@ const _invalidateModifier: unique symbol; // @public (undocumented) export function isApolloError(err: Error): err is ApolloError; -// @public (undocumented) +// @public export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; // @public (undocumented) @@ -1291,23 +1244,14 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // (undocumented) update?: MutationUpdaterFunction; - // (undocumented) updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1318,11 +1262,8 @@ export type MutationFetchPolicy = Extract = ApolloCache> extends MutationBaseOptions { - // (undocumented) fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1363,21 +1304,14 @@ export type MutationUpdaterFunction void; -// @public (undocumented) +// @public export enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1399,7 +1333,7 @@ export type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public export interface NormalizedCache { // (undocumented) canRead: CanReadFunction; @@ -1425,17 +1359,14 @@ export interface NormalizedCache { modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; // (undocumented) release(rootId: string): number; - // (undocumented) replace(newData: NormalizedCacheObject): void; - // (undocumented) retain(rootId: string): number; - // (undocumented) toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } -// @public (undocumented) +// @public export interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1479,7 +1410,6 @@ export class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1499,7 +1429,6 @@ export class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1776,7 +1705,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1788,27 +1716,17 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } export { QueryOptions as PureQueryOptions } @@ -2034,15 +1952,10 @@ export type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -2130,18 +2043,22 @@ export interface UriFunction { // @public (undocumented) export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -export interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +export interface WatchQueryOptions { + canonizeResults?: boolean; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - // (undocumented) + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // @public (undocumented) @@ -2181,13 +2098,13 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:98:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:126:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// src/cache/inmemory/types.ts:132:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_batch-http.md b/.api-reports/api-report-link_batch-http.md index 0e39566b61a..084012f6684 100644 --- a/.api-reports/api-report-link_batch-http.md +++ b/.api-reports/api-report-link_batch-http.md @@ -60,7 +60,7 @@ export namespace BatchHttpLink { // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // -// @public (undocumented) +// @public export class BatchHttpLink extends ApolloLink { constructor(fetchParams?: BatchHttpLink.Options); // (undocumented) @@ -71,17 +71,11 @@ export class BatchHttpLink extends ApolloLink { namespace BatchLink { // (undocumented) interface Options { - // (undocumented) batchDebounce?: boolean; // Warning: (ae-forgotten-export) The symbol "BatchHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) batchHandler?: BatchHandler; - // (undocumented) batchInterval?: number; - // (undocumented) batchKey?: (operation: Operation) => string; - // (undocumented) batchMax?: number; } } @@ -161,29 +155,17 @@ interface GraphQLRequest> { // @public (undocumented) interface HttpOptions { - // (undocumented) credentials?: string; - // (undocumented) fetch?: WindowOrWorkerGlobalScope["fetch"]; - // (undocumented) fetchOptions?: any; - // (undocumented) headers?: Record; - // (undocumented) includeExtensions?: boolean; - // (undocumented) includeUnusedVariables?: boolean; - // (undocumented) preserveHeaderCase?: boolean; // Warning: (ae-forgotten-export) The symbol "Printer" needs to be exported by the entry point index.d.ts - // - // (undocumented) print?: Printer; // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) uri?: string | UriFunction; - // (undocumented) useGETForQueries?: boolean; } diff --git a/.api-reports/api-report-link_batch.md b/.api-reports/api-report-link_batch.md index ecc43997ee7..7562ad80181 100644 --- a/.api-reports/api-report-link_batch.md +++ b/.api-reports/api-report-link_batch.md @@ -59,15 +59,10 @@ export type BatchHandler = (operations: Operation[], forward?: (NextLink | undef export namespace BatchLink { // (undocumented) export interface Options { - // (undocumented) batchDebounce?: boolean; - // (undocumented) batchHandler?: BatchHandler; - // (undocumented) batchInterval?: number; - // (undocumented) batchKey?: (operation: Operation) => string; - // (undocumented) batchMax?: number; } } diff --git a/.api-reports/api-report-link_error.md b/.api-reports/api-report-link_error.md index 71bb22bc33a..febf5b6be00 100644 --- a/.api-reports/api-report-link_error.md +++ b/.api-reports/api-report-link_error.md @@ -48,7 +48,6 @@ class ApolloLink { interface DefaultContext extends Record { } -// (undocumented) export interface ErrorHandler { // (undocumented) (error: ErrorResponse): Observable | void; @@ -56,7 +55,6 @@ export interface ErrorHandler { // @public (undocumented) export namespace ErrorLink { - // (undocumented) export interface ErrorHandler { // (undocumented) (error: ErrorResponse): Observable | void; diff --git a/.api-reports/api-report-link_http.md b/.api-reports/api-report-link_http.md index 8d6da95e4d4..2f059c22471 100644 --- a/.api-reports/api-report-link_http.md +++ b/.api-reports/api-report-link_http.md @@ -72,7 +72,7 @@ export type ClientParseError = InvariantError & { // @public (undocumented) export const createHttpLink: (linkOptions?: HttpOptions) => ApolloLink; -// @public (undocumented) +// @public @deprecated (undocumented) export const createSignalIfSupported: () => { controller: boolean; signal: boolean; @@ -185,25 +185,15 @@ export class HttpLink extends ApolloLink { // @public (undocumented) export interface HttpOptions { - // (undocumented) credentials?: string; - // (undocumented) fetch?: WindowOrWorkerGlobalScope["fetch"]; - // (undocumented) fetchOptions?: any; - // (undocumented) headers?: Record; - // (undocumented) includeExtensions?: boolean; - // (undocumented) includeUnusedVariables?: boolean; - // (undocumented) preserveHeaderCase?: boolean; - // (undocumented) print?: Printer; - // (undocumented) uri?: string | UriFunction; - // (undocumented) useGETForQueries?: boolean; } diff --git a/.api-reports/api-report-link_retry.md b/.api-reports/api-report-link_retry.md index a4ce34c4e29..1c3d0f2557d 100644 --- a/.api-reports/api-report-link_retry.md +++ b/.api-reports/api-report-link_retry.md @@ -48,7 +48,7 @@ class ApolloLink { interface DefaultContext extends Record { } -// @public (undocumented) +// @public interface DelayFunction { // (undocumented) (count: number, operation: Operation, error: any): number; @@ -56,11 +56,8 @@ interface DelayFunction { // @public (undocumented) interface DelayFunctionOptions { - // (undocumented) initial?: number; - // (undocumented) jitter?: boolean; - // (undocumented) max?: number; } @@ -167,7 +164,7 @@ type Path = ReadonlyArray; // @public (undocumented) type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; -// @public (undocumented) +// @public interface RetryFunction { // (undocumented) (count: number, operation: Operation, error: any): boolean | Promise; @@ -175,9 +172,7 @@ interface RetryFunction { // @public (undocumented) interface RetryFunctionOptions { - // (undocumented) max?: number; - // (undocumented) retryIf?: (error: any, operation: Operation) => boolean | Promise; } @@ -187,13 +182,9 @@ export namespace RetryLink { export interface Options { // Warning: (ae-forgotten-export) The symbol "RetryFunctionOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RetryFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) attempts?: RetryFunctionOptions | RetryFunction; // Warning: (ae-forgotten-export) The symbol "DelayFunctionOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DelayFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) delay?: DelayFunctionOptions | DelayFunction; } } diff --git a/.api-reports/api-report-link_schema.md b/.api-reports/api-report-link_schema.md index 676e4338cb9..31712ec362d 100644 --- a/.api-reports/api-report-link_schema.md +++ b/.api-reports/api-report-link_schema.md @@ -156,13 +156,9 @@ type RequestHandler = (operation: Operation, forward: NextLink) => Observable, TContext = DefaultC // @public (undocumented) export namespace WebSocketLink { - // (undocumented) export interface WebSocketParams { - // (undocumented) options?: ClientOptions; - // (undocumented) uri: string; - // (undocumented) webSocketImpl?: any; } } @@ -183,13 +179,9 @@ export class WebSocketLink extends ApolloLink { request(operation: Operation): Observable | null; } -// (undocumented) export interface WebSocketParams { - // (undocumented) options?: ClientOptions; - // (undocumented) uri: string; - // (undocumented) webSocketImpl?: any; } diff --git a/.api-reports/api-report-react.md b/.api-reports/api-report-react.md index a7a3937042d..e14e278cc70 100644 --- a/.api-reports/api-report-react.md +++ b/.api-reports/api-report-react.md @@ -40,7 +40,6 @@ abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -68,7 +67,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -90,40 +88,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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 // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -131,48 +124,30 @@ class ApolloClient implements DataProxy { link: ApolloLink; // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = Context, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) 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 - // - // (undocumented) + // 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; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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 // @@ -183,35 +158,41 @@ 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 - // - // (undocumented) + // 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; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) 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; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // Warning: (ae-forgotten-export) The symbol "ApolloConsumerProps" needs to be exported by the entry point index.d.ts // @@ -337,7 +318,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -355,7 +336,7 @@ export interface BackgroundQueryHookOptions) => any; // (undocumented) onError?: (error: ApolloError) => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionComplete?: () => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; // (undocumented) shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); @@ -577,44 +558,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -634,11 +602,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -648,15 +613,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -755,7 +716,7 @@ enum DocumentType_2 { } export { DocumentType_2 as DocumentType } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -821,7 +782,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -844,7 +805,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1007,7 +968,7 @@ export interface LazyQueryHookExecOptions extends Omit, "skip"> { } -// @public (undocumented) +// @public @deprecated (undocumented) export type LazyQueryResult = QueryResult; // @public (undocumented) @@ -1113,31 +1074,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1168,12 +1119,9 @@ export interface MutationHookOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1231,21 +1179,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1267,7 +1208,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public export type NoInfer = [T][T extends any ? 0 : never]; // @public (undocumented) @@ -1302,7 +1243,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1322,7 +1262,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1493,7 +1432,7 @@ class QueryInfo { variables?: Record; } -// @public (undocumented) +// @public @deprecated (undocumented) export interface QueryLazyOptions { // (undocumented) context?: Context; @@ -1612,7 +1551,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1624,31 +1562,25 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: Context; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } -// @public (undocumented) +// 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 { // Warning: (ae-forgotten-export) The symbol "InternalQueryReference" needs to be exported by the entry point index.d.ts // @@ -1679,7 +1611,7 @@ export interface QueryResult; -// @public (undocumented) +// @public @deprecated (undocumented) export type QueryTuple = LazyQueryResultTuple; // @public (undocumented) @@ -1792,7 +1724,7 @@ class RenderPromises { // @public (undocumented) type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; -// @public (undocumented) +// @public @deprecated (undocumented) export const resetApolloContext: typeof getApolloContext; // @public (undocumented) @@ -1896,15 +1828,12 @@ export interface SubscriptionHookOptions { - // (undocumented) context?: Context; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1929,7 +1858,7 @@ export interface SuspenseQueryHookOptions(queryRef: QueryReference): UseReadQue // @public (undocumented) export interface UseReadQueryResult { - // (undocumented) data: TData; - // (undocumented) error: ApolloError | undefined; - // (undocumented) networkStatus: NetworkStatus; } @@ -2178,20 +2104,27 @@ export interface UseSuspenseQueryResult extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + canonizeResults?: boolean; + 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; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -2202,7 +2135,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -66,7 +65,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -88,40 +86,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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 // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -130,48 +123,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) 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 - // - // (undocumented) + // 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; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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 // @@ -182,35 +157,41 @@ 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 - // - // (undocumented) + // 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; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) 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; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -300,7 +281,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -351,11 +332,11 @@ interface BaseSubscriptionOptions) => any; // (undocumented) onError?: (error: ApolloError) => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionComplete?: () => void; // Warning: (ae-forgotten-export) The symbol "OnSubscriptionDataOptions" needs to be exported by the entry point index.d.ts // - // (undocumented) + // @deprecated (undocumented) onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; // (undocumented) shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); @@ -512,44 +493,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -569,11 +537,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -583,15 +548,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -649,7 +610,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -702,7 +663,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -725,7 +686,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -926,31 +887,21 @@ export interface Mutation { // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -986,12 +937,9 @@ interface MutationFunctionOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1043,21 +991,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1115,7 +1056,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1135,7 +1075,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1408,7 +1347,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1420,27 +1358,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1633,15 +1563,12 @@ export interface SubscriptionComponentOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1710,20 +1637,27 @@ interface UriFunction { // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + canonizeResults?: boolean; + 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; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -1734,7 +1668,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -67,7 +66,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -89,40 +87,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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 // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -131,48 +124,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) 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 - // - // (undocumented) + // 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; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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 // @@ -183,35 +158,41 @@ 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 - // - // (undocumented) + // 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; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) 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; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) export const ApolloConsumer: React_2.FC; @@ -333,7 +314,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -497,44 +478,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -554,11 +522,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -568,15 +533,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -634,7 +595,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -687,7 +648,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -710,7 +671,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -899,31 +860,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -937,12 +888,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -978,21 +926,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1050,7 +991,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1070,7 +1010,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1318,7 +1257,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1330,27 +1268,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1468,7 +1398,7 @@ class RenderPromises { // @public (undocumented) type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; -// @public (undocumented) +// @public @deprecated (undocumented) export const resetApolloContext: typeof getApolloContext; // @public (undocumented) @@ -1543,15 +1473,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1608,20 +1535,27 @@ interface UriFunction { // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + canonizeResults?: boolean; + 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; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -1632,7 +1566,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -66,7 +65,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -88,40 +86,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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 // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -130,48 +123,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) 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 - // - // (undocumented) + // 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; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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 // @@ -182,35 +157,41 @@ 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 - // - // (undocumented) + // 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; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) 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; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -300,7 +281,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -495,44 +476,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -552,11 +520,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -566,15 +531,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -635,7 +596,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -697,7 +658,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -720,7 +681,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -921,31 +882,21 @@ export interface MutateProps = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -972,12 +923,9 @@ interface MutationFunctionOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1029,21 +977,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1101,7 +1042,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1121,7 +1061,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1386,7 +1325,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1398,27 +1336,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1564,15 +1494,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1635,20 +1562,27 @@ interface UriFunction { // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + canonizeResults?: boolean; + 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; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // @public (undocumented) @@ -1676,7 +1610,6 @@ export function withSubscription implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -63,7 +62,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -85,40 +83,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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 // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -127,48 +120,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) 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 - // - // (undocumented) + // 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; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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 // @@ -179,35 +154,41 @@ 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 - // - // (undocumented) + // 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; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) 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; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -297,7 +278,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -319,7 +300,7 @@ interface BackgroundQueryHookOptions) => any; // (undocumented) onError?: (error: ApolloError) => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionComplete?: () => void; // Warning: (ae-forgotten-export) The symbol "OnSubscriptionDataOptions" needs to be exported by the entry point index.d.ts // - // (undocumented) + // @deprecated (undocumented) onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; // (undocumented) shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); @@ -541,44 +522,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -598,11 +566,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -612,15 +577,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -712,7 +673,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -778,7 +739,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -801,7 +762,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1061,31 +1022,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1109,12 +1060,9 @@ interface MutationHookOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1175,21 +1123,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1211,7 +1152,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public type NoInfer = [T][T extends any ? 0 : never]; // @public (undocumented) @@ -1246,7 +1187,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1266,7 +1206,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1532,7 +1471,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1544,31 +1482,25 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } -// @public (undocumented) +// 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 { // Warning: (ae-forgotten-export) The symbol "InternalQueryReference" needs to be exported by the entry point index.d.ts // @@ -1775,15 +1707,12 @@ interface SubscriptionHookOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1810,7 +1739,7 @@ interface SuspenseQueryHookOptions(queryRef: QueryReference): UseReadQue // @public (undocumented) export interface UseReadQueryResult { - // (undocumented) data: TData; - // (undocumented) error: ApolloError | undefined; - // (undocumented) networkStatus: NetworkStatus; } @@ -2069,20 +1995,27 @@ export interface UseSuspenseQueryResult extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + canonizeResults?: boolean; + 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; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -2093,7 +2026,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -68,7 +67,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -90,40 +88,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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 // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -132,48 +125,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) 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 - // - // (undocumented) + // 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; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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 // @@ -184,35 +159,41 @@ 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 - // - // (undocumented) + // 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; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) 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; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -302,7 +283,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -468,44 +449,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -525,11 +493,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -539,15 +504,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -605,7 +566,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -658,7 +619,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -681,7 +642,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -886,31 +847,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -924,12 +875,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -965,21 +913,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1037,7 +978,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1057,7 +997,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1305,7 +1244,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1317,27 +1255,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1530,15 +1460,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1595,20 +1522,27 @@ interface UriFunction { // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + canonizeResults?: boolean; + 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; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -1619,7 +1553,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -64,7 +63,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -86,40 +84,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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 // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -128,48 +121,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) 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 - // - // (undocumented) + // 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; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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 // @@ -180,35 +155,41 @@ 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 - // - // (undocumented) + // 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; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) 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; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -298,7 +279,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -458,44 +439,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -515,11 +483,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -529,15 +494,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -595,7 +556,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -648,7 +609,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -671,7 +632,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -866,7 +827,6 @@ export interface MockedProviderProps { childProps?: object; // (undocumented) children?: any; - // (undocumented) connectToDevTools?: boolean; // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts // @@ -991,31 +951,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1029,12 +979,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1070,21 +1017,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1108,7 +1048,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1152,7 +1092,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1172,7 +1111,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1381,7 +1319,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1393,27 +1330,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1565,15 +1494,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1636,29 +1562,36 @@ export function wait(ms: number): Promise; // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + canonizeResults?: boolean; + 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; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } -// @public (undocumented) +// @public @deprecated (undocumented) export function withErrorSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; -// @public (undocumented) +// @public @deprecated (undocumented) export function withLogSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; -// @public (undocumented) +// @public @deprecated (undocumented) export function withWarningSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; // Warnings were encountered during analysis: @@ -1669,7 +1602,6 @@ export function withWarningSpy(it: (...args: TArgs // src/cache/core/types/common.ts:98:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:99:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:100:3 - (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts -// src/core/ApolloClient.ts:47:3 - (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts // src/core/LocalState.ts:46:5 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts @@ -1680,7 +1612,7 @@ export function withWarningSpy(it: (...args: TArgs // src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts // src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts // src/core/types.ts:205:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/utilities/graphql/DocumentTransform.ts:122:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-testing_core.md b/.api-reports/api-report-testing_core.md index 717e6e70674..01cd92a9a0e 100644 --- a/.api-reports/api-report-testing_core.md +++ b/.api-reports/api-report-testing_core.md @@ -35,7 +35,6 @@ abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -63,7 +62,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -85,40 +83,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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 // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -127,48 +120,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) 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 - // - // (undocumented) + // 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; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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 // @@ -179,35 +154,41 @@ 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 - // - // (undocumented) + // 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; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) 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; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -297,7 +278,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -457,44 +438,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -514,11 +482,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -528,15 +493,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -594,7 +555,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -647,7 +608,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -670,7 +631,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -945,31 +906,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -983,12 +934,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1024,21 +972,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1062,7 +1003,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1106,7 +1047,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1126,7 +1066,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1337,7 +1276,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1349,27 +1287,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1521,15 +1451,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1592,29 +1519,36 @@ export function wait(ms: number): Promise; // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + canonizeResults?: boolean; + 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; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } -// @public (undocumented) +// @public @deprecated (undocumented) export function withErrorSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; -// @public (undocumented) +// @public @deprecated (undocumented) export function withLogSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; -// @public (undocumented) +// @public @deprecated (undocumented) export function withWarningSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; // Warnings were encountered during analysis: @@ -1625,7 +1559,6 @@ export function withWarningSpy(it: (...args: TArgs // src/cache/core/types/common.ts:98:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:99:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:100:3 - (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts -// src/core/ApolloClient.ts:47:3 - (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts // src/core/LocalState.ts:46:5 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts @@ -1636,7 +1569,7 @@ export function withWarningSpy(it: (...args: TArgs // src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts // src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts // src/core/types.ts:205:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/utilities/graphql/DocumentTransform.ts:122:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-utilities.md b/.api-reports/api-report-utilities.md index 3b3396f5a87..51443cf5eda 100644 --- a/.api-reports/api-report-utilities.md +++ b/.api-reports/api-report-utilities.md @@ -53,7 +53,6 @@ abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -79,7 +78,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -99,38 +97,34 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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 // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -139,48 +133,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) 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 - // - // (undocumented) + // 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; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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 // @@ -191,35 +167,41 @@ 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 - // - // (undocumented) + // 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; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) 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; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -329,7 +311,7 @@ type ApolloReducerConfig = { // @public (undocumented) export function argumentsObjectFromField(field: FieldNode | DirectiveNode, variables?: Record): Object | null; -// @public (undocumented) +// @public export type AsStoreObject = { @@ -493,10 +475,10 @@ export const canUseWeakSet: boolean; // @public (undocumented) export function checkDocument(doc: DocumentNode): DocumentNode; -// @public (undocumented) +// @public export function cloneDeep(value: T): T; -// @public (undocumented) +// @public export function compact(...objects: TArgs): TupleToIntersection; // @public (undocumented) @@ -555,44 +537,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -612,11 +581,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -626,15 +592,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -720,7 +682,7 @@ interface DeleteModifier { // @public (undocumented) const _deleteModifier: unique symbol; -// @public (undocumented) +// @public @deprecated (undocumented) export const DEV: boolean; // @public (undocumented) @@ -867,7 +829,7 @@ namespace EntityStore { } } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -920,7 +882,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // @public (undocumented) @@ -1000,7 +962,7 @@ export function fixObservableSubclass Observab // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public export interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1048,7 +1010,7 @@ export function getFragmentDefinitions(doc: DocumentNode): FragmentDefinitionNod // @public (undocumented) export function getFragmentFromSelection(selection: SelectionNode, fragmentMap?: FragmentMap | FragmentMapFunction): InlineFragmentNode | FragmentDefinitionNode | null; -// @public (undocumented) +// @public export function getFragmentQueryDocument(document: DocumentNode, fragmentName?: string): DocumentNode; // @public (undocumented) @@ -1060,7 +1022,7 @@ export function getGraphQLErrorsFromResult(result: FetchResult): GraphQLEr // @public (undocumented) export function getInclusionDirectives(directives: ReadonlyArray): InclusionDirectives; -// @public (undocumented) +// @public export function getMainDefinition(queryDoc: DocumentNode): OperationDefinitionNode | FragmentDefinitionNode; // @public (undocumented) @@ -1541,31 +1503,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1579,12 +1531,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1620,21 +1569,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1658,7 +1600,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public interface NormalizedCache { // (undocumented) canRead: CanReadFunction; @@ -1684,17 +1626,14 @@ interface NormalizedCache { modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; // (undocumented) release(rootId: string): number; - // (undocumented) replace(newData: NormalizedCacheObject): void; - // (undocumented) retain(rootId: string): number; - // (undocumented) toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } -// @public (undocumented) +// @public interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1740,7 +1679,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1758,7 +1696,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -2048,7 +1985,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -2060,27 +1996,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -2330,15 +2258,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -2449,20 +2374,27 @@ export type VariableValue = (node: VariableNode) => any; // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + canonizeResults?: boolean; + 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; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // 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; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // @public (undocumented) @@ -2506,9 +2438,8 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:168:3 - (ae-forgotten-export) The symbol "FieldReadFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:169:3 - (ae-forgotten-export) The symbol "FieldMergeFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:126:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// src/cache/inmemory/types.ts:132:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/writeToStore.ts:65:7 - (ae-forgotten-export) The symbol "MergeTree" needs to be exported by the entry point index.d.ts -// src/core/ApolloClient.ts:47:3 - (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts // src/core/LocalState.ts:71:3 - (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts @@ -2519,7 +2450,7 @@ interface WriteContext extends ReadMergeModifyContext { // src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts // src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts // src/core/types.ts:205:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/utilities/graphql/storeUtils.ts:220:12 - (ae-forgotten-export) The symbol "stringify" needs to be exported by the entry point index.d.ts // src/utilities/policies/pagination.ts:76:3 - (ae-forgotten-export) The symbol "TRelayEdge" needs to be exported by the entry point index.d.ts // src/utilities/policies/pagination.ts:77:3 - (ae-forgotten-export) The symbol "TRelayPageInfo" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report-utilities_globals.md b/.api-reports/api-report-utilities_globals.md index cf51100b464..b9fcd7f40d5 100644 --- a/.api-reports/api-report-utilities_globals.md +++ b/.api-reports/api-report-utilities_globals.md @@ -6,7 +6,7 @@ import { InvariantError } from 'ts-invariant'; -// @public (undocumented) +// @public @deprecated (undocumented) const DEV: boolean; export { DEV } export { DEV as __DEV__ } @@ -30,7 +30,7 @@ type LogFunction = { // @public (undocumented) export function maybe(thunk: () => T): T | undefined; -// @public (undocumented) +// @public export function newInvariantError(message?: string | number, ...optionalParams: unknown[]): InvariantError; // @public (undocumented) diff --git a/.api-reports/api-report.md b/.api-reports/api-report.md index 35954d0b1c0..914be34a71e 100644 --- a/.api-reports/api-report.md +++ b/.api-reports/api-report.md @@ -49,7 +49,6 @@ export abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -71,7 +70,6 @@ export abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -91,97 +89,82 @@ export abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// 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) __actionHookForDevTools(cb: () => any): void; constructor(options: ApolloClientOptions); // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // (undocumented) link: ApolloLink; - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; - // (undocumented) query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; - // (undocumented) + // 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"]; // (undocumented) version: string; - // (undocumented) watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -export type ApolloClientOptions = { - uri?: string | UriFunction; +export interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // Warning: (ae-forgotten-export) The symbol "ApolloConsumerProps" needs to be exported by the entry point index.d.ts // @@ -310,7 +293,7 @@ export type ApolloReducerConfig = { addTypename?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -326,7 +309,7 @@ export interface BackgroundQueryHookOptions) => any; // (undocumented) onError?: (error: ApolloError) => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionComplete?: () => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; // (undocumented) shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); @@ -566,7 +549,7 @@ export const concat: typeof ApolloLink.concat; // @public (undocumented) export const createHttpLink: (linkOptions?: HttpOptions) => ApolloLink; -// @public (undocumented) +// @public @deprecated (undocumented) export const createSignalIfSupported: () => { controller: boolean; signal: boolean; @@ -586,40 +569,27 @@ export namespace DataProxy { }; // (undocumented) export interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) export interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // (undocumented) export interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) export interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) @@ -633,11 +603,8 @@ export namespace DataProxy { } // (undocumented) export interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // (undocumented) @@ -645,15 +612,11 @@ export namespace DataProxy { } } -// @public (undocumented) +// @public export interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -879,7 +842,7 @@ namespace EntityStore { } } -// @public (undocumented) +// @public export type ErrorPolicy = "none" | "ignore" | "all"; // @public (undocumented) @@ -962,7 +925,7 @@ export interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // @public (undocumented) @@ -1037,7 +1000,7 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1111,25 +1074,15 @@ export class HttpLink extends ApolloLink { // @public (undocumented) export interface HttpOptions { - // (undocumented) credentials?: string; - // (undocumented) fetch?: WindowOrWorkerGlobalScope["fetch"]; - // (undocumented) fetchOptions?: any; - // (undocumented) headers?: Record; - // (undocumented) includeExtensions?: boolean; - // (undocumented) includeUnusedVariables?: boolean; - // (undocumented) preserveHeaderCase?: boolean; - // (undocumented) print?: Printer; - // (undocumented) uri?: string | UriFunction; - // (undocumented) useGETForQueries?: boolean; } @@ -1334,7 +1287,7 @@ const _invalidateModifier: unique symbol; // @public (undocumented) export function isApolloError(err: Error): err is ApolloError; -// @public (undocumented) +// @public export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; // @public (undocumented) @@ -1406,7 +1359,7 @@ export interface LazyQueryHookExecOptions extends Omit, "skip"> { } -// @public (undocumented) +// @public @deprecated (undocumented) export type LazyQueryResult = QueryResult; // @public (undocumented) @@ -1549,23 +1502,14 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // (undocumented) update?: MutationUpdaterFunction; - // (undocumented) updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1595,11 +1539,8 @@ export interface MutationHookOptions = ApolloCache> extends MutationBaseOptions { - // (undocumented) fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1662,21 +1603,14 @@ export type MutationUpdaterFunction void; -// @public (undocumented) +// @public export enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1698,10 +1632,10 @@ export type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public export type NoInfer = [T][T extends any ? 0 : never]; -// @public (undocumented) +// @public export interface NormalizedCache { // (undocumented) canRead: CanReadFunction; @@ -1727,17 +1661,14 @@ export interface NormalizedCache { modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; // (undocumented) release(rootId: string): number; - // (undocumented) replace(newData: NormalizedCacheObject): void; - // (undocumented) retain(rootId: string): number; - // (undocumented) toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } -// @public (undocumented) +// @public export interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1781,7 +1712,6 @@ export class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1801,7 +1731,6 @@ export class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -2043,7 +1972,7 @@ class QueryInfo { variables?: Record; } -// @public (undocumented) +// @public @deprecated (undocumented) export interface QueryLazyOptions { // (undocumented) context?: DefaultContext; @@ -2157,7 +2086,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -2169,33 +2097,25 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } export { QueryOptions as PureQueryOptions } export { QueryOptions } -// @public (undocumented) +// 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 { // Warning: (ae-forgotten-export) The symbol "InternalQueryReference" needs to be exported by the entry point index.d.ts // @@ -2226,7 +2146,7 @@ export interface QueryResult; -// @public (undocumented) +// @public @deprecated (undocumented) export type QueryTuple = LazyQueryResultTuple; // @public (undocumented) @@ -2353,7 +2273,7 @@ class RenderPromises { // @public (undocumented) export type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; -// @public (undocumented) +// @public @deprecated (undocumented) export const resetApolloContext: typeof getApolloContext; export { resetCaches } @@ -2504,15 +2424,10 @@ export interface SubscriptionHookOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -2537,7 +2452,7 @@ export interface SuspenseQueryHookOptions(queryRef: QueryReference): UseReadQue // @public (undocumented) export interface UseReadQueryResult { - // (undocumented) data: TData; - // (undocumented) error: ApolloError | undefined; - // (undocumented) networkStatus: NetworkStatus; } @@ -2815,18 +2727,22 @@ export interface UseSuspenseQueryResult extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +export interface WatchQueryOptions { + canonizeResults?: boolean; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - // (undocumented) + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // @public (undocumented) @@ -2866,13 +2782,13 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:98:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:126:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// src/cache/inmemory/types.ts:132:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts // src/react/hooks/useBackgroundQuery.ts:26:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts // src/react/hooks/useBackgroundQuery.ts:27:3 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts diff --git a/api-extractor.json b/api-extractor.json index 20f6605a52a..5a0a74befa3 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -7,6 +7,7 @@ "mainEntryPointFilePath": "/dist/index.d.ts", "bundledPackages": [], "newlineKind": "lf", + "enumMemberOrder": "preserve", /** * Set to true when invoking API Extractor's test harness. When `testMode` is true, the `toolVersion` field in the @@ -37,14 +38,17 @@ }, "docModel": { - "enabled": false + "enabled": false, + "apiJsonFilePath": "/docs/public/.api.json", + "includeForgottenExports": true }, "dtsRollup": { "enabled": false }, "tsdocMetadata": { - "enabled": false + "enabled": false, + "tsdocMetadataFilePath": "/docs/public/tsdoc-metadata.json" }, /** @@ -113,6 +117,11 @@ "ae-missing-release-tag": { "logLevel": "none" + }, + + "ae-unresolved-link": { + "logLevel": "warning", + "addToApiReportFile": true } } diff --git a/config/apiExtractor.ts b/config/apiExtractor.ts index c1a1e90ec49..917986c3da2 100644 --- a/config/apiExtractor.ts +++ b/config/apiExtractor.ts @@ -2,11 +2,36 @@ import * as path from "path"; import { Extractor, ExtractorConfig, - ExtractorResult, + ExtractorLogLevel, + IConfigFile, } from "@microsoft/api-extractor"; +import { parseArgs } from "node:util"; + // @ts-ignore import { map } from "./entryPoints.js"; +const parsed = parseArgs({ + options: { + generate: { + type: "string", + multiple: true, + default: ["apiReport"], + }, + "main-only": { + type: "boolean", + default: false, + }, + }, +}); + +if ( + !parsed.values.generate!.every((v) => ["apiReport", "docModel"].includes(v)) +) { + throw new Error( + "invalid value for --generate. Only allowed values are `apiReport` and `docModel`!" + ); +} + // Load and parse the api-extractor.json file const configObjectFullPath = path.resolve(__dirname, "../api-extractor.json"); const baseConfig = ExtractorConfig.loadFile(configObjectFullPath); @@ -15,6 +40,8 @@ const packageJsonFullPath = path.resolve(__dirname, "../package.json"); process.exitCode = 0; map((entryPoint: { dirs: string[] }) => { + if (entryPoint.dirs.length > 0 && parsed.values["main-only"]) return; + const path = entryPoint.dirs.join("/"); const mainEntryPointFilePath = `/dist/${path}/index.d.ts`.replace("//", "/"); @@ -22,23 +49,36 @@ map((entryPoint: { dirs: string[] }) => { "\n\nCreating API extractor report for " + mainEntryPointFilePath ); - const extractorConfig: ExtractorConfig = ExtractorConfig.prepare({ - configObject: { - ...baseConfig, - mainEntryPointFilePath, - apiReport: { - enabled: true, - ...baseConfig.apiReport, - reportFileName: `api-report${ - path ? "-" + path.replace("/", "_") : "" - }.md`, - }, - }, + const configObject: IConfigFile = { + ...(JSON.parse(JSON.stringify(baseConfig)) as IConfigFile), + mainEntryPointFilePath, + }; + + configObject.apiReport!.reportFileName = `api-report${ + path ? "-" + path.replace("/", "_") : "" + }.md`; + + configObject.apiReport!.enabled = + parsed.values.generate?.includes("apiReport") || false; + + configObject.docModel!.enabled = + parsed.values.generate?.includes("docModel") || false; + + if (entryPoint.dirs.length !== 0) { + configObject.docModel = { enabled: false }; + configObject.tsdocMetadata = { enabled: false }; + configObject.messages!.extractorMessageReporting![ + "ae-unresolved-link" + ]!.logLevel = ExtractorLogLevel.None; + } + + const extractorConfig = ExtractorConfig.prepare({ + configObject, packageJsonFullPath, configObjectFullPath, }); - const extractorResult: ExtractorResult = Extractor.invoke(extractorConfig, { + const extractorResult = Extractor.invoke(extractorConfig, { localBuild: process.env.CI === undefined || process.env.CI === "false", showVerboseMessages: true, }); diff --git a/config/inlineInheritDoc.ts b/config/inlineInheritDoc.ts new file mode 100644 index 00000000000..5222dafde7a --- /dev/null +++ b/config/inlineInheritDoc.ts @@ -0,0 +1,148 @@ +/** + * This CLI tool will inline docblocks specified with `@inheritDoc` on build. + * + * + * E.g. a in a dockblock like this: + * ```js + * /** {@inheritDoc @apollo/client!QueryOptions#query:member} *\/ + * ``` + * + * the annotation (everything from `{` to `}`) will be replaced with the docblock + * of the `QueryOptions.query` member function. + * + * We need this here for situations where inheritance is not possible for `docModel` + * generation (`interface Foo extends Omit {}` is too complicated a + * type for it to parse) and we want to flatten types - or going forward, for + * generally flattening types without repeating docs everywhere. + * + * You can get these "canonical ids" by running + * ```sh + * yarn docmodel + * ``` + * and looking at the generated [`client.api.json`](../docs/shared/client.api.json) file. + */ +/** End file docs */ + +// @ts-ignore +import { Project, ts, printNode, Node } from "ts-morph"; +import { ApiModel, ApiDocumentedItem } from "@microsoft/api-extractor-model"; +import { DeclarationReference } from "@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference"; + +import fs from "node:fs"; +import path from "node:path"; +import { + Extractor, + ExtractorConfig, + ExtractorLogLevel, +} from "@microsoft/api-extractor"; + +console.log( + "Processing {@inheritDoc } comments in .d.ts files." +); + +const model = loadApiModel(); +processComments(); + +function getCommentFor(canonicalReference: string) { + const apiItem = model.resolveDeclarationReference( + DeclarationReference.parse(canonicalReference), + undefined + ).resolvedApiItem; + if (!apiItem) + throw new Error( + `Could not resolve canonical reference "${canonicalReference}"` + ); + if (apiItem instanceof ApiDocumentedItem) { + return apiItem.tsdocComment?.emitAsTsdoc(); + } else { + throw new Error( + `"${canonicalReference}" is not documented, so no documentation can be inherited.` + ); + } +} + +function loadApiModel() { + const tempDir = fs.mkdtempSync("api-model"); + try { + // Load and parse the api-extractor.json file + const configObjectFullPath = path.resolve( + __dirname, + "../api-extractor.json" + ); + const packageJsonFullPath = path.resolve(__dirname, "../package.json"); + const tempModelFile = path.join(tempDir, "client.api.json"); + + const configObject = ExtractorConfig.loadFile(configObjectFullPath); + configObject.docModel = { + ...configObject.docModel, + enabled: true, + apiJsonFilePath: tempModelFile, + }; + configObject.apiReport = { + enabled: false, + reportFileName: "disabled.md", + reportFolder: tempDir, + }; + + configObject.messages = { + extractorMessageReporting: { + default: { + logLevel: ExtractorLogLevel.None, + }, + }, + compilerMessageReporting: { + default: { + logLevel: ExtractorLogLevel.None, + }, + }, + tsdocMessageReporting: { + default: { + logLevel: ExtractorLogLevel.None, + }, + }, + }; + const extractorConfig = ExtractorConfig.prepare({ + configObject, + packageJsonFullPath, + configObjectFullPath, + }); + + Extractor.invoke(extractorConfig); + + const model = new ApiModel(); + model.loadPackage(tempModelFile); + return model; + } finally { + fs.rmSync(tempDir, { recursive: true }); + } +} + +function processComments() { + const inheritDocRegex = /\{@inheritDoc ([^}]+)\}/; + + const project = new Project({ + tsConfigFilePath: "tsconfig.json", + skipAddingFilesFromTsConfig: true, + }); + + const sourceFiles = project.addSourceFilesAtPaths("dist/**/*.d.ts"); + for (const file of sourceFiles) { + file.forEachDescendant((node) => { + if (Node.isPropertySignature(node)) { + const docsNode = node.getJsDocs()[0]; + if (!docsNode) return; + const oldText = docsNode.getInnerText(); + const newText = oldText.replace( + inheritDocRegex, + (_, canonicalReference) => { + return getCommentFor(canonicalReference) || ""; + } + ); + if (oldText !== newText) { + docsNode.replaceWithText(newText); + } + } + }); + file.saveSync(); + } +} diff --git a/config/rollup.config.js b/config/rollup.config.js index 7917a340f56..90dd8f56dec 100644 --- a/config/rollup.config.js +++ b/config/rollup.config.js @@ -3,10 +3,13 @@ import { promises as fs } from "fs"; import nodeResolve from "@rollup/plugin-node-resolve"; import { terser as minify } from "rollup-plugin-terser"; +import cleanup from "rollup-plugin-cleanup"; const entryPoints = require("./entryPoints"); const distDir = "./dist"; +const removeComments = cleanup({}); + function isExternal(id, parentId, entryPointsAreExternal = true) { let posixId = toPosixPath(id); const posixParentId = toPosixPath(parentId); @@ -63,7 +66,7 @@ function prepareCJS(input, output) { exports: "named", externalLiveBindings: false, }, - plugins: [nodeResolve()], + plugins: [nodeResolve(), removeComments], }; } @@ -79,6 +82,9 @@ function prepareCJSMinified(input) { mangle: { toplevel: true, }, + format: { + comments: "some", // keeps comments with a @license, @copyright or @preserve tag + }, compress: { toplevel: true, global_defs: { @@ -111,6 +117,7 @@ function prepareBundle({ externalLiveBindings: false, }, plugins: [ + removeComments, { name: "externalize-dependency", resolveId(id, parentId) { diff --git a/docs/source/api/core/ApolloClient.mdx b/docs/source/api/core/ApolloClient.mdx index d4a0467c424..8795e1d3d88 100644 --- a/docs/source/api/core/ApolloClient.mdx +++ b/docs/source/api/core/ApolloClient.mdx @@ -3,228 +3,62 @@ title: class ApolloClient description: API reference order: 11 api_reference: true +api_doc: + - "@apollo/client!ApolloClient:class" + - "@apollo/client!DefaultOptions:interface" --- The `ApolloClient` class encapsulates Apollo's core client-side API. It backs all available view-layer integrations (React, iOS, and so on). ## The `ApolloClient` constructor - + -Takes an `ApolloClientOptions` parameter that supports the [fields listed below](#options). +Takes an `ApolloClientOptions` parameter that supports the [fields listed below](#ApolloClientOptions). Returns an initialized `ApolloClient` object. #### Example -```js -import { ApolloClient, InMemoryCache } from '@apollo/client'; - -const cache = new InMemoryCache(); - -const client = new ApolloClient({ - // Provide required constructor fields - cache: cache, - uri: 'http://localhost:4000/', - - // Provide some optional constructor fields - name: 'react-web-client', - version: '1.3', - queryDeduplication: false, - defaultOptions: { - watchQuery: { - fetchPolicy: 'cache-and-network', - }, - }, -}); -``` - -#### Options - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +## Types - -
Name /
Type
Description
- -###### `uri` - -`String` - - -The URI of the GraphQL endpoint that Apollo Client will communicate with. - -One of `uri` or `link` is **required**. If you provide both, `link` takes precedence. -
- -###### `link` - -`ApolloLink` - - -You can provide an Apollo Link instance to serve as Apollo Client's network layer. For more information, see [Advanced HTTP networking](../../networking/advanced-http-networking/). - -One of `uri` or `link` is **required**. If you provide both, `link` takes precedence. -
- -###### `cache` - -`ApolloCache` (usually `InMemoryCache`) - - -**Required.** The cache that Apollo Client should use to store query results locally. The recommended cache is `InMemoryCache`, which is provided by the `@apollo/client` package. - -For more information, see [Configuring the cache](../../caching/cache-configuration/). -
- -###### `name` - -`String` - - -A custom name (e.g., `iOS`) that identifies this particular client among your set of clients. Apollo Server and Apollo Studio use this property as part of the [client awareness](/apollo-server/monitoring/metrics/#identifying-distinct-clients) feature. -
- -###### `version` - -`String` - - -A custom version that identifies the current version of this particular client (e.g., `1.2`). Apollo Server and Apollo Studio use this property as part of the [client awareness](/apollo-server/monitoring/metrics/#identifying-distinct-clients) feature. - -This is **not** the version of Apollo Client that you are using, but rather any version string that helps you differentiate between versions of your client. -
+For more information on the `defaultOptions` object, see the [Default Options](#DefaultOptions) section below. -###### `ssrMode` - -`Boolean` - - -When using Apollo Client for [server-side rendering](../../performance/server-side-rendering/), set this to `true` so that the [`getDataFromTree` function](../react/ssr/#getdatafromtree) can work effectively. - -The default value is `false`. -
- -###### `ssrForceFetchDelay` - -`Number` - - -The time interval (in milliseconds) before Apollo Client force-fetches queries after a server-side render. - -The default value is `0` (no delay). -
- -###### `connectToDevTools` - -`Boolean` - - -If `true`, the [Apollo Client Devtools](../../development-testing/developer-tooling/#apollo-client-devtools) browser extension can connect to Apollo Client in your production environment. The extension can _always_ connect in a non-production environment. - -The default value is `false`. -
- -###### `queryDeduplication` - -`Boolean` - - -If `false`, Apollo Client sends every created query to the server, even if a _completely_ identical query (identical in terms of query string, variable values, and operationName) is already in flight. - -The default value is `true`. -
- -###### `defaultOptions` - -`Object` - - -Provide this object to set application-wide default values for options you can provide to the `watchQuery`, `query`, and `mutate` functions. See below for an example object. - -See the [example object below](#example-defaultoptions-object). -
- -###### `assumeImmutableResults` - -`Boolean` - +## Functions -If `true`, Apollo Client will assume results read from the cache are never mutated by application code, which enables substantial performance optimizations. + + + + + + + + + + + + + + + + -The default value is `false`. -
+ + + ##### Example `defaultOptions` object @@ -248,27 +82,3 @@ You can override any default option you specify in this object by providing a different value for the same option in individual function calls. > **Note:** The `useQuery` hook uses Apollo Client's `watchQuery` function. To set `defaultOptions` when using the `useQuery` hook, make sure to set them under the `defaultOptions.watchQuery` property. - -## Functions - - - - - - - - - - - - - - - - - - -## Types - - - diff --git a/netlify.toml b/netlify.toml index 6e8d1ace9c9..e0dfc89a88f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,9 @@ [build] publish = "docs/public" - command = "npm run typedoc" + command = """\ + npm run typedoc + npm run docmodel + """ [build.environment] NODE_VERSION = "18" @@ -9,6 +12,8 @@ base = "docs" ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ." command = """\ + npm i + npm run docmodel cd ../ rm -rf monodocs git clone https://github.com/apollographql/docs --branch main --single-branch monodocs diff --git a/package-lock.json b/package-lock.json index dbd669f34a2..a0e60715ab1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -84,6 +84,7 @@ "resolve": "1.22.8", "rimraf": "5.0.5", "rollup": "2.79.1", + "rollup-plugin-cleanup": "3.2.1", "rollup-plugin-terser": "7.0.2", "rxjs": "7.8.1", "size-limit": "8.2.6", @@ -92,6 +93,7 @@ "ts-api-utils": "1.0.3", "ts-jest": "29.1.1", "ts-jest-resolver": "2.0.1", + "ts-morph": "20.0.0", "ts-node": "10.9.1", "typedoc": "0.25.0", "typescript": "5.2.2", @@ -2659,6 +2661,57 @@ "node": ">= 10" } }, + "node_modules/@ts-morph/common": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.21.0.tgz", + "integrity": "sha512-ES110Mmne5Vi4ypUKrtVQfXFDtCsDXiUiGxF6ILVlE90dDD4fdpC1LSjydl/ml7xJWKSDZwUYD2zkOePMSrPBA==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.12", + "minimatch": "^7.4.3", + "mkdirp": "^2.1.6", + "path-browserify": "^1.0.1" + } + }, + "node_modules/@ts-morph/common/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@ts-morph/common/node_modules/minimatch": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@ts-morph/common/node_modules/mkdirp": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", + "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", + "dev": true, + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -4166,6 +4219,12 @@ "node": ">= 0.12.0" } }, + "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==", + "dev": true + }, "node_modules/collect-v8-coverage": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", @@ -7973,6 +8032,20 @@ "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", "dev": true }, + "node_modules/js-cleanup": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/js-cleanup/-/js-cleanup-1.2.0.tgz", + "integrity": "sha512-JeDD0yiiSt80fXzAVa/crrS0JDPQljyBG/RpOtaSbyDq03VHa9szJWMaWOYU/bcTn412uMN2MxApXq8v79cUiQ==", + "dev": true, + "dependencies": { + "magic-string": "^0.25.7", + "perf-regexes": "^1.0.1", + "skip-regex": "^1.0.2" + }, + "engines": { + "node": "^10.14.2 || >=12.0.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -8329,6 +8402,15 @@ "lz-string": "bin/bin.js" } }, + "node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.8" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -9196,6 +9278,12 @@ "node": ">= 10.0.0" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -9269,6 +9357,15 @@ "node": ">=8" } }, + "node_modules/perf-regexes": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/perf-regexes/-/perf-regexes-1.0.1.tgz", + "integrity": "sha512-L7MXxUDtqr4PUaLFCDCXBfGV/6KLIuSEccizDI7JxT+c9x1G1v04BQ4+4oag84SHaCdrBgQAIs/Cqn+flwFPng==", + "dev": true, + "engines": { + "node": ">=6.14" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -9969,6 +10066,22 @@ "fsevents": "~2.3.2" } }, + "node_modules/rollup-plugin-cleanup": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-cleanup/-/rollup-plugin-cleanup-3.2.1.tgz", + "integrity": "sha512-zuv8EhoO3TpnrU8MX8W7YxSbO4gmOR0ny06Lm3nkFfq0IVKdBUtHwhVzY1OAJyNCIAdLiyPnOrU0KnO0Fri1GQ==", + "dev": true, + "dependencies": { + "js-cleanup": "^1.2.0", + "rollup-pluginutils": "^2.8.2" + }, + "engines": { + "node": "^10.14.2 || >=12.0.0" + }, + "peerDependencies": { + "rollup": ">=2.0" + } + }, "node_modules/rollup-plugin-terser": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", @@ -9998,6 +10111,21 @@ "node": ">= 10.13.0" } }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/rollup-pluginutils/node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -10180,6 +10308,15 @@ "node": "^14.0.0 || ^16.0.0 || >=18.0.0" } }, + "node_modules/skip-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/skip-regex/-/skip-regex-1.0.2.tgz", + "integrity": "sha512-pEjMUbwJ5Pl/6Vn6FsamXHXItJXSRftcibixDmNCWbWhic0hzHrwkMZo0IZ7fMRH9KxcWDFSkzhccB4285PutA==", + "dev": true, + "engines": { + "node": ">=4.2" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -10327,6 +10464,13 @@ "source-map": "^0.6.0" } }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true + }, "node_modules/spawndamnit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", @@ -10937,6 +11081,16 @@ "node": ">=10" } }, + "node_modules/ts-morph": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-20.0.0.tgz", + "integrity": "sha512-JVmEJy2Wow5n/84I3igthL9sudQ8qzjh/6i4tmYCm6IqYyKFlNbJZi7oBdjyqcWSWYRu3CtL0xbT6fS03ESZIg==", + "dev": true, + "dependencies": { + "@ts-morph/common": "~0.21.0", + "code-block-writer": "^12.0.0" + } + }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", diff --git a/package.json b/package.json index ec11352a8b6..46c649fce25 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "scripts": { "prebuild": "npm run clean", "build": "tsc", - "postbuild": "npm run update-version && npm run invariants && npm run sourcemaps && npm run rollup && npm run prepdist && npm run postprocess-dist && npm run verify-version", + "postbuild": "npm run update-version && npm run inline-inherit-doc && npm run invariants && npm run sourcemaps && npm run rollup && npm run prepdist && npm run postprocess-dist && npm run verify-version", "postinstall": "patch-package", "update-version": "node config/version.js update", "verify-version": "node config/version.js verify", @@ -42,12 +42,13 @@ "prepdist": "node ./config/prepareDist.js", "prepdist:changesets": "ts-node-script config/prepareChangesetsRelease.ts", "postprocess-dist": "ts-node-script config/postprocessDist.ts", - "extract-api": "ts-node-script config/apiExtractor.ts", + "extract-api": "ts-node-script config/apiExtractor.ts --generate apiReport", "clean": "rimraf dist coverage lib temp", "check:format": "prettier --check .", "ci:precheck": "node config/precheck.js", "format": "prettier --write .", "lint": "eslint 'src/**/*.{[jt]s,[jt]sx}'", + "inline-inherit-doc": "ts-node-script config/inlineInheritDoc.ts", "test": "jest --config ./config/jest.config.js", "test:debug": "node --inspect-brk node_modules/.bin/jest --config ./config/jest.config.js --runInBand --testTimeout 99999 --logHeapUsage", "test:ci": "TEST_ENV=ci npm run test:coverage -- --logHeapUsage && npm run test:memory", @@ -59,6 +60,7 @@ "predeploy": "npm run build", "deploy": "cd dist && npm publish --tag next", "typedoc": "typedoc src/index.ts --json docs/public/docs.json", + "docmodel": "tsc && npm run inline-inherit-doc && ts-node-script config/apiExtractor.ts --main-only --generate docModel", "changeset-publish": "npm run build && npm run prepdist:changesets && cd dist && changeset publish", "changeset-check": "changeset status --verbose --since=origin/main", "changeset-version": "changeset version && npm i", @@ -163,6 +165,7 @@ "resolve": "1.22.8", "rimraf": "5.0.5", "rollup": "2.79.1", + "rollup-plugin-cleanup": "3.2.1", "rollup-plugin-terser": "7.0.2", "rxjs": "7.8.1", "size-limit": "8.2.6", @@ -171,6 +174,7 @@ "ts-api-utils": "1.0.3", "ts-jest": "29.1.1", "ts-jest-resolver": "2.0.1", + "ts-morph": "20.0.0", "ts-node": "10.9.1", "typedoc": "0.25.0", "typescript": "5.2.2", @@ -180,5 +184,15 @@ }, "publishConfig": { "access": "public" - } + }, + "files": [ + "LICENSE", + "**/*.md", + "**/*.cjs", + "**/*.cjs.map", + "**/*.js", + "**/*.js.map", + "**/*.d.ts", + "**/*.json" + ] } diff --git a/src/cache/core/cache.ts b/src/cache/core/cache.ts index 2dffa982b1c..b897419fb1a 100644 --- a/src/cache/core/cache.ts +++ b/src/cache/core/cache.ts @@ -126,11 +126,6 @@ export abstract class ApolloCache implements DataProxy { } // DataProxy API - /** - * - * @param options - * @param optimistic - */ public readQuery( options: Cache.ReadQueryOptions, optimistic = !!options.optimistic diff --git a/src/cache/inmemory/readFromStore.ts b/src/cache/inmemory/readFromStore.ts index 34a81f07c93..50980c77597 100644 --- a/src/cache/inmemory/readFromStore.ts +++ b/src/cache/inmemory/readFromStore.ts @@ -227,9 +227,6 @@ export class StoreReader { /** * Given a store and a query, return as much of the result as possible and * identify if any data was missing from the store. - * @param {DocumentNode} query A parsed GraphQL query document - * @param {Store} store The Apollo Client store object - * @return {result: Object, complete: [boolean]} */ public diffQueryAgainstStore({ store, diff --git a/src/cache/inmemory/types.ts b/src/cache/inmemory/types.ts index 8a5bc71b583..5a8d66ec300 100644 --- a/src/cache/inmemory/types.ts +++ b/src/cache/inmemory/types.ts @@ -109,7 +109,13 @@ export type OptimisticStoreItem = { }; export type ReadQueryOptions = { + /** + * The Apollo Client store object. + */ store: NormalizedCache; + /** + * A parsed GraphQL query document. + */ query: DocumentNode; variables?: Object; previousResult?: any; diff --git a/src/core/ApolloClient.ts b/src/core/ApolloClient.ts index 5feb29f792d..967d9952739 100644 --- a/src/core/ApolloClient.ts +++ b/src/core/ApolloClient.ts @@ -43,25 +43,78 @@ export interface DefaultOptions { let hasSuggestedDevtools = false; -export type ApolloClientOptions = { +export interface ApolloClientOptions { + /** + * The URI of the GraphQL endpoint that Apollo Client will communicate with. + * + * One of `uri` or `link` is **required**. If you provide both, `link` takes precedence. + */ uri?: string | UriFunction; credentials?: string; 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/). + * + * One of `uri` or `link` is **required**. If you provide both, `link` takes precedence. + */ link?: ApolloLink; + /** + * The cache that Apollo Client should use to store query results locally. The recommended cache is `InMemoryCache`, which is provided by the `@apollo/client` package. + * + * For more information, see [Configuring the cache](https://www.apollographql.com/docs/react/caching/cache-configuration/). + */ cache: ApolloCache; + /** + * The time interval (in milliseconds) before Apollo Client force-fetches queries after a server-side render. + * + * @defaultValue `0` (no delay) + */ ssrForceFetchDelay?: number; + /** + * When using Apollo Client for [server-side rendering](https://www.apollographql.com/docs/react//performance/server-side-rendering/), set this to `true` so that the [`getDataFromTree` function](../react/ssr/#getdatafromtree) can work effectively. + * + * @defaultValue `false` + */ ssrMode?: boolean; + /** + * If `true`, the [Apollo Client Devtools](https://www.apollographql.com/docs/react/development-testing/developer-tooling/#apollo-client-devtools) browser extension can connect to Apollo Client. + * + * The default value is `false` in production and `true` in development (if there is a `window` object). + */ connectToDevTools?: boolean; + /** + * If `false`, Apollo Client sends every created query to the server, even if a _completely_ identical query (identical in terms of query string, variable values, and operationName) is already in flight. + * + * @defaultValue `true` + */ queryDeduplication?: boolean; + /** + * Provide this object to set application-wide default values for options you can provide to the `watchQuery`, `query`, and `mutate` functions. See below for an example object. + * + * See this [example object](https://www.apollographql.com/docs/react/api/core/ApolloClient#example-defaultoptions-object). + */ defaultOptions?: DefaultOptions; + /** + * If `true`, Apollo Client will assume results read from the cache are never mutated by application code, which enables substantial performance optimizations. + * + * @defaultValue `false` + */ assumeImmutableResults?: boolean; resolvers?: Resolvers | Resolvers[]; typeDefs?: string | string[] | DocumentNode | DocumentNode[]; fragmentMatcher?: FragmentMatcher; + /** + * A custom name (e.g., `iOS`) that identifies this particular client among your set of clients. Apollo Server and Apollo Studio use this property as part of the [client awareness](https://www.apollographql.com/docs/apollo-server/monitoring/metrics#identifying-distinct-clients) feature. + */ name?: string; + /** + * A custom version that identifies the current version of this particular client (e.g., `1.2`). Apollo Server and Apollo Studio use this property as part of the [client awareness](https://www.apollographql.com/docs/apollo-server/monitoring/metrics#identifying-distinct-clients) feature. + * + * This is **not** the version of Apollo Client that you are using, but rather any version string that helps you differentiate between versions of your client. + */ version?: string; documentTransform?: DocumentTransform; -}; +} // Though mergeOptions now resides in @apollo/client/utilities, it was // previously declared and exported from this module, and then reexported from @@ -72,7 +125,7 @@ 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 a {@link NetworkInterface} instance, + * and mutations) to a GraphQL spec-compliant server over an {@link 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. */ @@ -94,36 +147,28 @@ export class ApolloClient implements DataProxy { /** * Constructs an instance of {@link ApolloClient}. * - * @param uri The GraphQL endpoint that Apollo Client will connect to. If - * `link` is configured, this option is ignored. - * @param link The {@link ApolloLink} over which GraphQL documents will be resolved into a response. - * - * @param cache The initial cache to use in the data store. - * - * @param ssrMode Determines whether this is being run in Server Side Rendering (SSR) mode. - * - * @param ssrForceFetchDelay Determines the time interval before we force fetch queries for a - * server side render. - * - * @param queryDeduplication If set to false, a query will still be sent to the server even if a query - * with identical parameters (query, variables, operationName) is already in flight. - * - * @param defaultOptions Used to set application wide defaults for the - * options supplied to `watchQuery`, `query`, or - * `mutate`. + * @example + * ```js + * import { ApolloClient, InMemoryCache } from '@apollo/client'; * - * @param assumeImmutableResults When this option is true, the client will assume results - * read from the cache are never mutated by application code, - * which enables substantial performance optimizations. + * const cache = new InMemoryCache(); * - * @param name A custom name that can be used to identify this client, when - * using Apollo client awareness features. E.g. "iOS". + * const client = new ApolloClient({ + * // Provide required constructor fields + * cache: cache, + * uri: 'http://localhost:4000/', * - * @param version A custom version that can be used to identify this client, - * when using Apollo client awareness features. This is the - * version of your client, which you may want to increment on - * new builds. This is NOT the version of Apollo Client that - * you are using. + * // Provide some optional constructor fields + * name: 'react-web-client', + * version: '1.3', + * queryDeduplication: false, + * defaultOptions: { + * watchQuery: { + * fetchPolicy: 'cache-and-network', + * }, + * }, + * }); + * ``` */ constructor(options: ApolloClientOptions) { if (!options.cache) { @@ -339,10 +384,10 @@ export class ApolloClient implements DataProxy { /** * This resolves a single query according to the options specified and - * returns a {@link Promise} which is either resolved with the resulting data + * 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 {@link 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. */ @@ -371,7 +416,7 @@ export class ApolloClient implements DataProxy { /** * This resolves a single mutation according to the options specified and returns a - * {@link Promise} which is either resolved with the resulting data or rejected with an + * Promise which is either resolved with the resulting data or rejected with an * error. * * It takes options as an object with the following keys and values: @@ -409,7 +454,7 @@ export class ApolloClient implements DataProxy { * the root query. To start at a specific id returned by `dataIdFromObject` * use `readFragment`. * - * @param optimistic Set to `true` to allow `readQuery` to return + * @param optimistic - Set to `true` to allow `readQuery` to return * optimistic results. Is `false` by default. */ public readQuery( @@ -430,7 +475,7 @@ export class ApolloClient implements DataProxy { * in a document with multiple fragments then you must also specify a * `fragmentName`. * - * @param optimistic Set to `true` to allow `readFragment` to return + * @param optimistic - Set to `true` to allow `readFragment` to return * optimistic results. Is `false` by default. */ public readFragment( diff --git a/src/core/ObservableQuery.ts b/src/core/ObservableQuery.ts index bda85a543a7..9a306746d0d 100644 --- a/src/core/ObservableQuery.ts +++ b/src/core/ObservableQuery.ts @@ -364,7 +364,7 @@ export class ObservableQuery< * Update the variables of this observable query, and fetch the new results. * This method should be preferred over `setVariables` in most use cases. * - * @param variables: The new set of variables. If there are missing variables, + * @param variables - The new set of variables. If there are missing variables, * the previous values of those variables will be used. */ public refetch( @@ -614,9 +614,7 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`, * Note: the promise will return null immediately if the query is not active * (there are no subscribers). * - * @private - * - * @param variables: The new set of variables. If there are missing variables, + * @param variables - The new set of variables. If there are missing variables, * the previous values of those variables will be used. */ public setVariables( diff --git a/src/core/watchQueryOptions.ts b/src/core/watchQueryOptions.ts index a5a9a7d9afc..b74659b4a99 100644 --- a/src/core/watchQueryOptions.ts +++ b/src/core/watchQueryOptions.ts @@ -41,7 +41,7 @@ export type RefetchWritePolicy = "merge" | "overwrite"; /** * errorPolicy determines the level of events for errors in the execution result. The options are: - * - none (default): any errors from the request are treated like runtime errors and the observable is stopped (XXX this is default to lower breaking changes going from AC 1.0 => 2.0) + * - none (default): any errors from the request are treated like runtime errors and the observable is stopped * - ignore: errors from the request do not stop the observable, but also don't call `next` * - all: errors are treated like data and will notify observables */ @@ -118,7 +118,7 @@ export interface QueryOptions { export interface WatchQueryOptions< TVariables extends OperationVariables = OperationVariables, TData = any, -> extends Omit, "fetchPolicy"> { +> { /** * Specifies the {@link FetchPolicy} to be used for this query. */ @@ -149,6 +149,33 @@ export interface WatchQueryOptions< * behavior, for backwards compatibility with Apollo Client 3.x. */ refetchWritePolicy?: RefetchWritePolicy; + + /** {@inheritDoc @apollo/client!QueryOptions#query:member} */ + query: DocumentNode | TypedDocumentNode; + + /** {@inheritDoc @apollo/client!QueryOptions#variables:member} */ + variables?: TVariables; + + /** {@inheritDoc @apollo/client!QueryOptions#errorPolicy:member} */ + errorPolicy?: ErrorPolicy; + + /** {@inheritDoc @apollo/client!QueryOptions#context:member} */ + context?: DefaultContext; + + /** {@inheritDoc @apollo/client!QueryOptions#pollInterval:member} */ + pollInterval?: number; + + /** {@inheritDoc @apollo/client!QueryOptions#notifyOnNetworkStatusChange:member} */ + notifyOnNetworkStatusChange?: boolean; + + /** {@inheritDoc @apollo/client!QueryOptions#returnPartialData:member} */ + returnPartialData?: boolean; + + /** {@inheritDoc @apollo/client!QueryOptions#partialRefetch:member} */ + partialRefetch?: boolean; + + /** {@inheritDoc @apollo/client!QueryOptions#canonizeResults:member} */ + canonizeResults?: boolean; } export interface NextFetchPolicyContext< diff --git a/src/testing/core/observableToPromise.ts b/src/testing/core/observableToPromise.ts index 004a013593c..428517e1aff 100644 --- a/src/testing/core/observableToPromise.ts +++ b/src/testing/core/observableToPromise.ts @@ -1,21 +1,26 @@ import type { ObservableQuery, ApolloQueryResult } from "../../core/index.js"; import type { ObservableSubscription } from "../../utilities/index.js"; -/** - * - * @param observable the observable query to subscribe to - * @param shouldResolve should we resolve after seeing all our callbacks [default: true] - * (use this if you are racing the promise against another) - * @param wait how long to wait after seeing desired callbacks before resolving - * [default: -1 => don't wait] - * @param errorCallbacks an expected set of errors - */ -export type Options = { +export interface Options { + /** + * The ObservableQuery to subscribe to. + */ observable: ObservableQuery; + /** + * Should we resolve after seeing all our callbacks? [default: true] + * (use this if you are racing the promise against another) + */ shouldResolve?: boolean; + /** + * How long to wait after seeing desired callbacks before resolving? + * [default: -1 => don't wait] + */ wait?: number; + /** + * An expected set of errors. + */ errorCallbacks?: ((error: Error) => any)[]; -}; +} export type ResultCallback = (result: ApolloQueryResult) => any; diff --git a/tsconfig.json b/tsconfig.json index a872c60ff05..1285cfa64dd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,6 @@ "skipLibCheck": true, "moduleResolution": "node", "importHelpers": true, - "removeComments": true, "sourceMap": true, "declaration": true, "declarationMap": true, From 5216978a00fb10dc4f99cb62942d887db5e55ede Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Wed, 22 Nov 2023 11:48:50 +0100 Subject: [PATCH 02/12] try to fix netlify deploy --- netlify.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/netlify.toml b/netlify.toml index e0dfc89a88f..34a25b1e1dd 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,9 +1,6 @@ [build] publish = "docs/public" - command = """\ - npm run typedoc - npm run docmodel - """ + command = "npm run typedoc; npm run docmodel" [build.environment] NODE_VERSION = "18" From 7a49cd0db77f25917fc24d7c4a35b4bb68ec2c3e Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Wed, 22 Nov 2023 11:57:22 +0100 Subject: [PATCH 03/12] try to fix netlify deploy --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 34a25b1e1dd..67879a8b0ba 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] publish = "docs/public" - command = "npm run typedoc; npm run docmodel" + command = "npm run typedoc; npm run docmodel > docs/public/log.txt || true" [build.environment] NODE_VERSION = "18" From c05871c806bc75cb0206896cd39f0ba409d8dbe0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:11:44 +0100 Subject: [PATCH 04/12] chore(deps): update all dependencies - patch updates (#11360) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .circleci/config.yml | 2 +- .github/workflows/exit-prerelease.yml | 2 +- package-lock.json | 145 +++++++++++++++----------- package.json | 26 ++--- 4 files changed, 99 insertions(+), 76 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c2b00f8f508..dba3e58d143 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - secops: apollo/circleci-secops-orb@2.0.2 + secops: apollo/circleci-secops-orb@2.0.3 jobs: # Filesize: diff --git a/.github/workflows/exit-prerelease.yml b/.github/workflows/exit-prerelease.yml index a96c1781b1c..f683c605a7e 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.1 + uses: jaywcjlove/github-action-package@v1.3.2 with: version: ${{ steps.formatversion.outputs.value }} diff --git a/package-lock.json b/package-lock.json index a0e60715ab1..aa5ccca5fce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,11 +26,11 @@ }, "devDependencies": { "@arethetypeswrong/cli": "0.12.2", - "@babel/parser": "7.23.0", + "@babel/parser": "7.23.4", "@changesets/changelog-github": "0.4.8", "@changesets/cli": "2.26.2", - "@graphql-tools/schema": "10.0.0", - "@microsoft/api-extractor": "7.38.2", + "@graphql-tools/schema": "10.0.2", + "@microsoft/api-extractor": "7.38.3", "@rollup/plugin-node-resolve": "11.2.1", "@size-limit/esbuild-why": "8.2.6", "@size-limit/preset-small-lib": "8.2.6", @@ -39,17 +39,17 @@ "@testing-library/react-12": "npm:@testing-library/react@^12", "@testing-library/user-event": "14.5.1", "@tsconfig/node20": "20.1.2", - "@types/bytes": "3.1.3", - "@types/fetch-mock": "7.3.7", + "@types/bytes": "3.1.4", + "@types/fetch-mock": "7.3.8", "@types/glob": "8.1.0", - "@types/hoist-non-react-statics": "3.3.4", - "@types/jest": "29.5.7", - "@types/lodash": "4.14.200", + "@types/hoist-non-react-statics": "3.3.5", + "@types/jest": "29.5.10", + "@types/lodash": "4.14.202", "@types/node": "20.8.10", - "@types/node-fetch": "2.6.8", - "@types/react": "18.2.35", - "@types/react-dom": "18.2.14", - "@types/use-sync-external-store": "0.0.5", + "@types/node-fetch": "2.6.9", + "@types/react": "18.2.38", + "@types/react-dom": "18.2.17", + "@types/use-sync-external-store": "0.0.6", "@typescript-eslint/eslint-plugin": "6.7.5", "@typescript-eslint/parser": "6.7.5", "@typescript-eslint/rule-tester": "6.7.5", @@ -62,7 +62,7 @@ "eslint": "8.51.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c", - "eslint-plugin-local-rules": "2.0.0", + "eslint-plugin-local-rules": "2.0.1", "eslint-plugin-testing-library": "5.11.1", "expect-type": "0.17.3", "fetch-mock": "9.11.0", @@ -537,9 +537,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.4.tgz", + "integrity": "sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1411,12 +1411,12 @@ } }, "node_modules/@graphql-tools/merge": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.0.tgz", - "integrity": "sha512-J7/xqjkGTTwOJmaJQJ2C+VDBDOWJL3lKrHJN4yMaRLAJH3PosB7GiPRaSDZdErs0+F77sH2MKs2haMMkywzx7Q==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.1.tgz", + "integrity": "sha512-hIEExWO9fjA6vzsVjJ3s0cCQ+Q/BEeMVJZtMXd7nbaVefVy0YDyYlEkeoYYNV3NVVvu1G9lr6DM1Qd0DGo9Caw==", "dev": true, "dependencies": { - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/utils": "^10.0.10", "tslib": "^2.4.0" }, "engines": { @@ -1427,13 +1427,13 @@ } }, "node_modules/@graphql-tools/schema": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.0.tgz", - "integrity": "sha512-kf3qOXMFcMs2f/S8Y3A8fm/2w+GaHAkfr3Gnhh2LOug/JgpY/ywgFVxO3jOeSpSEdoYcDKLcXVjMigNbY4AdQg==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.2.tgz", + "integrity": "sha512-TbPsIZnWyDCLhgPGnDjt4hosiNU2mF/rNtSk5BVaXWnZqvKJ6gzJV4fcHcvhRIwtscDMW2/YTnK6dLVnk8pc4w==", "dev": true, "dependencies": { - "@graphql-tools/merge": "^9.0.0", - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/merge": "^9.0.1", + "@graphql-tools/utils": "^10.0.10", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" }, @@ -1445,12 +1445,14 @@ } }, "node_modules/@graphql-tools/utils": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.0.tgz", - "integrity": "sha512-ndBPc6zgR+eGU/jHLpuojrs61kYN3Z89JyMLwK3GCRkPv4EQn9EOr1UWqF1JO0iM+/jAVHY0mvfUxyrFFN9DUQ==", + "version": "10.0.11", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.11.tgz", + "integrity": "sha512-vVjXgKn6zjXIlYBd7yJxCVMYGb5j18gE3hx3Qw3mNsSEsYQXbJbPdlwb7Fc9FogsJei5AaqiQerqH4kAosp1nQ==", "dev": true, "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", + "cross-inspect": "1.0.0", + "dset": "^3.1.2", "tslib": "^2.4.0" }, "engines": { @@ -2113,9 +2115,9 @@ } }, "node_modules/@microsoft/api-extractor": { - "version": "7.38.2", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.38.2.tgz", - "integrity": "sha512-JOARuhTwOcOMIU0O2czscoJy3ddVzIRhSA9/7T1ALuZSNphgWsPk+Bv4E7AnBDmTV4pP4lBNLtCxEHjjpWaytQ==", + "version": "7.38.3", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.38.3.tgz", + "integrity": "sha512-xt9iYyC5f39281j77JTA9C3ISJpW1XWkCcnw+2vM78CPnro6KhPfwQdPDfwS5JCPNuq0grm8cMdPUOPvrchDWw==", "dev": true, "dependencies": { "@microsoft/api-extractor-model": "7.28.2", @@ -2796,15 +2798,15 @@ } }, "node_modules/@types/bytes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@types/bytes/-/bytes-3.1.3.tgz", - "integrity": "sha512-eEgZiWn6cjG8tc+AkI3FIa9ub9zhLMSRHqbecHe5yffqws+848zoHdbgFYxvUks4RElfJB9cupvqcd1gvDFQig==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/bytes/-/bytes-3.1.4.tgz", + "integrity": "sha512-A0uYgOj3zNc4hNjHc5lYUfJQ/HVyBXiUMKdXd7ysclaE6k9oJdavQzODHuwjpUu2/boCP8afjQYi8z/GtvNCWA==", "dev": true }, "node_modules/@types/fetch-mock": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/@types/fetch-mock/-/fetch-mock-7.3.7.tgz", - "integrity": "sha512-VKtaL2UUTFLXN+JoBOhF0elvQ5eu7ViSVAJDnogsDz4ygWV8/SaAKfJjFbZkHeV/jpAotObjitXM+VZcs+mwGQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/@types/fetch-mock/-/fetch-mock-7.3.8.tgz", + "integrity": "sha512-ztsIGiyUvD0GaqPc9/hb8k20gnr6lupqA6SFtqt+8v2mtHhNO/Ebb6/b7N6af/7x0A7s1C8nxrEGzajMBqz8qA==", "dev": true }, "node_modules/@types/glob": { @@ -2827,9 +2829,9 @@ } }, "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.4.tgz", - "integrity": "sha512-ZchYkbieA+7tnxwX/SCBySx9WwvWR8TaP5tb2jRAzwvLb/rWchGw3v0w3pqUbUvj0GCwW2Xz/AVPSk6kUGctXQ==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", "dev": true, "dependencies": { "@types/react": "*", @@ -2870,9 +2872,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.7", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.7.tgz", - "integrity": "sha512-HLyetab6KVPSiF+7pFcUyMeLsx25LDNDemw9mGsJBkai/oouwrjTycocSDYopMEwFhN2Y4s9oPyOCZNofgSt2g==", + "version": "29.5.10", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.10.tgz", + "integrity": "sha512-tE4yxKEphEyxj9s4inideLHktW/x6DwesIwWZ9NN1FKf9zbJYsnhBoA9vrHA/IuIOKwPa5PcFBNV4lpMIOEzyQ==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -2935,9 +2937,9 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.14.200", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.200.tgz", - "integrity": "sha512-YI/M/4HRImtNf3pJgbF+W6FrXovqj+T+/HpENLTooK9PnkacBsDpeP3IpHab40CClUfhNmdM2WTNP2sa2dni5Q==", + "version": "4.14.202", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", + "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==", "dev": true }, "node_modules/@types/minimatch": { @@ -2962,9 +2964,9 @@ } }, "node_modules/@types/node-fetch": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.8.tgz", - "integrity": "sha512-nnH5lV9QCMPsbEVdTb5Y+F3GQxLSw1xQgIydrb2gSfEavRPs50FnMr+KUaa+LoPSqibm2N+ZZxH7lavZlAT4GA==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.9.tgz", + "integrity": "sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA==", "dev": true, "dependencies": { "@types/node": "*", @@ -2984,9 +2986,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.35", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.35.tgz", - "integrity": "sha512-LG3xpFZ++rTndV+/XFyX5vUP7NI9yxyk+MQvBDq+CVs8I9DLSc3Ymwb1Vmw5YDoeNeHN4PDZa3HylMKJYT9PNQ==", + "version": "18.2.38", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.38.tgz", + "integrity": "sha512-cBBXHzuPtQK6wNthuVMV6IjHAFkdl/FOPFIlkd81/Cd1+IqkHu/A+w4g43kaQQoYHik/ruaQBDL72HyCy1vuMw==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -2995,9 +2997,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.14", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.14.tgz", - "integrity": "sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==", + "version": "18.2.17", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.17.tgz", + "integrity": "sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==", "dev": true, "dependencies": { "@types/react": "*" @@ -3046,9 +3048,9 @@ "dev": true }, "node_modules/@types/use-sync-external-store": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.5.tgz", - "integrity": "sha512-+fHc7rdrgMIng29ISUqNjsbPl1EMo1PCDh/+16HNlTOJeQzs6c9Om23rVizETd3dDx4YM+aWGbyF/KP4FUwZyg==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz", + "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==", "dev": true }, "node_modules/@types/yargs": { @@ -4335,6 +4337,18 @@ "node-fetch": "^2.6.12" } }, + "node_modules/cross-inspect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cross-inspect/-/cross-inspect-1.0.0.tgz", + "integrity": "sha512-4PFfn4b5ZN6FMNGSZlyb7wUhuN8wvj8t/VQHZdM4JsDcruGJ8L2kf9zao98QIrBPFCpdk27qst/AGTl7pL3ypQ==", + "dev": true, + "dependencies": { + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -4706,6 +4720,15 @@ "node": ">=10" } }, + "node_modules/dset": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.3.tgz", + "integrity": "sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -5141,9 +5164,9 @@ } }, "node_modules/eslint-plugin-local-rules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-local-rules/-/eslint-plugin-local-rules-2.0.0.tgz", - "integrity": "sha512-sWueme0kUcP0JC1+6OBDQ9edBDVFJR92WJHSRbhiRExlenMEuUisdaVBPR+ItFBFXo2Pdw6FD2UfGZWkz8e93g==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-local-rules/-/eslint-plugin-local-rules-2.0.1.tgz", + "integrity": "sha512-AJhGd+GcI5r2dbjiGPixM8jnBl0XFxqoVbqzwKbYz+nTk+Cj5dNE3+OlhC176bl5r25KsGsIthLi1VqIW5Ga+A==", "dev": true }, "node_modules/eslint-plugin-testing-library": { diff --git a/package.json b/package.json index 46c649fce25..321937de254 100644 --- a/package.json +++ b/package.json @@ -107,11 +107,11 @@ }, "devDependencies": { "@arethetypeswrong/cli": "0.12.2", - "@babel/parser": "7.23.0", + "@babel/parser": "7.23.4", "@changesets/changelog-github": "0.4.8", "@changesets/cli": "2.26.2", - "@graphql-tools/schema": "10.0.0", - "@microsoft/api-extractor": "7.38.2", + "@graphql-tools/schema": "10.0.2", + "@microsoft/api-extractor": "7.38.3", "@rollup/plugin-node-resolve": "11.2.1", "@size-limit/esbuild-why": "8.2.6", "@size-limit/preset-small-lib": "8.2.6", @@ -120,17 +120,17 @@ "@testing-library/react-12": "npm:@testing-library/react@^12", "@testing-library/user-event": "14.5.1", "@tsconfig/node20": "20.1.2", - "@types/bytes": "3.1.3", - "@types/fetch-mock": "7.3.7", + "@types/bytes": "3.1.4", + "@types/fetch-mock": "7.3.8", "@types/glob": "8.1.0", - "@types/hoist-non-react-statics": "3.3.4", - "@types/jest": "29.5.7", - "@types/lodash": "4.14.200", + "@types/hoist-non-react-statics": "3.3.5", + "@types/jest": "29.5.10", + "@types/lodash": "4.14.202", "@types/node": "20.8.10", - "@types/node-fetch": "2.6.8", - "@types/react": "18.2.35", - "@types/react-dom": "18.2.14", - "@types/use-sync-external-store": "0.0.5", + "@types/node-fetch": "2.6.9", + "@types/react": "18.2.38", + "@types/react-dom": "18.2.17", + "@types/use-sync-external-store": "0.0.6", "@typescript-eslint/eslint-plugin": "6.7.5", "@typescript-eslint/parser": "6.7.5", "@typescript-eslint/rule-tester": "6.7.5", @@ -143,7 +143,7 @@ "eslint": "8.51.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c", - "eslint-plugin-local-rules": "2.0.0", + "eslint-plugin-local-rules": "2.0.1", "eslint-plugin-testing-library": "5.11.1", "expect-type": "0.17.3", "fetch-mock": "9.11.0", From 25d0968d1be572e1700e620112a6779dc0d402de Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Mon, 27 Nov 2023 15:34:11 +0100 Subject: [PATCH 05/12] update size-limit, pin compression to gzip --- .size-limit.cjs | 4 + package-lock.json | 850 ++++++++++++++++++++++++++++++++++++++++------ package.json | 6 +- 3 files changed, 756 insertions(+), 104 deletions(-) diff --git a/.size-limit.cjs b/.size-limit.cjs index b6edc78d7bb..a519fd10994 100644 --- a/.size-limit.cjs +++ b/.size-limit.cjs @@ -30,8 +30,12 @@ const checks = [ config.name || config.import ? `import ${config.import} from "${config.path}"` : config.path, + // newer versions of size-limit changed to brotli as a default + // we'll stay on gzip for now, so results are easier to compare + gzip: true, ignore: [ ...(config.ignore || []), + "rehackt", "react", "react-dom", "@graphql-typed-document-node/core", diff --git a/package-lock.json b/package-lock.json index aa5ccca5fce..735965f0162 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,8 +32,8 @@ "@graphql-tools/schema": "10.0.2", "@microsoft/api-extractor": "7.38.3", "@rollup/plugin-node-resolve": "11.2.1", - "@size-limit/esbuild-why": "8.2.6", - "@size-limit/preset-small-lib": "8.2.6", + "@size-limit/esbuild-why": "11.0.0", + "@size-limit/preset-small-lib": "11.0.0", "@testing-library/jest-dom": "5.17.0", "@testing-library/react": "14.0.0", "@testing-library/react-12": "npm:@testing-library/react@^12", @@ -87,7 +87,7 @@ "rollup-plugin-cleanup": "3.2.1", "rollup-plugin-terser": "7.0.2", "rxjs": "7.8.1", - "size-limit": "8.2.6", + "size-limit": "11.0.0", "subscriptions-transport-ws": "0.11.0", "terser": "5.21.0", "ts-api-utils": "1.0.3", @@ -1293,10 +1293,58 @@ "node": ">=12" } }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.8.tgz", + "integrity": "sha512-31E2lxlGM1KEfivQl8Yf5aYU/mflz9g06H6S15ITUFQueMFtFjESRMoDSkvMo8thYvLBax+VKTPlpnx+sPicOA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.8.tgz", + "integrity": "sha512-B8JbS61bEunhfx8kasogFENgQfr/dIp+ggYXwTqdbMAgGDhRa3AaPpQMuQU0rNxDLECj6FhDzk1cF9WHMVwrtA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.8.tgz", + "integrity": "sha512-rdqqYfRIn4jWOp+lzQttYMa2Xar3OK9Yt2fhOhzFXqg0rVWEfSclJvZq5fZslnz6ypHvVf3CT7qyf0A5pM682A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.7.tgz", - "integrity": "sha512-FVDOdfgyGOOISpd0b+UtA6YNbu5+RzZu7kDztjVsA/iZhGnyxbCR/vZ+B2j5yxbMZ9j3iz5uFiHIq1sl6nrZ0Q==", + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.8.tgz", + "integrity": "sha512-RQw9DemMbIq35Bprbboyf8SmOr4UXsRVxJ97LgB55VKKeJOOdvsIPy0nFyF2l8U+h4PtBx/1kRf0BelOYCiQcw==", "cpu": [ "arm64" ], @@ -1309,6 +1357,294 @@ "node": ">=12" } }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.8.tgz", + "integrity": "sha512-3sur80OT9YdeZwIVgERAysAbwncom7b4bCI2XKLjMfPymTud7e/oY4y+ci1XVp5TfQp/bppn7xLw1n/oSQY3/Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.8.tgz", + "integrity": "sha512-WAnPJSDattvS/XtPCTj1tPoTxERjcTpH6HsMr6ujTT+X6rylVe8ggxk8pVxzf5U1wh5sPODpawNicF5ta/9Tmw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.8.tgz", + "integrity": "sha512-ICvZyOplIjmmhjd6mxi+zxSdpPTKFfyPPQMQTK/w+8eNK6WV01AjIztJALDtwNNfFhfZLux0tZLC+U9nSyA5Zg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.8.tgz", + "integrity": "sha512-H4vmI5PYqSvosPaTJuEppU9oz1dq2A7Mr2vyg5TF9Ga+3+MGgBdGzcyBP7qK9MrwFQZlvNyJrvz6GuCaj3OukQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.8.tgz", + "integrity": "sha512-z1zMZivxDLHWnyGOctT9JP70h0beY54xDDDJt4VpTX+iwA77IFsE1vCXWmprajJGa+ZYSqkSbRQ4eyLCpCmiCQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.8.tgz", + "integrity": "sha512-1a8suQiFJmZz1khm/rDglOc8lavtzEMRo0v6WhPgxkrjcU0LkHj+TwBrALwoz/OtMExvsqbbMI0ChyelKabSvQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.8.tgz", + "integrity": "sha512-fHZWS2JJxnXt1uYJsDv9+b60WCc2RlvVAy1F76qOLtXRO+H4mjt3Tr6MJ5l7Q78X8KgCFudnTuiQRBhULUyBKQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.8.tgz", + "integrity": "sha512-Wy/z0EL5qZYLX66dVnEg9riiwls5IYnziwuju2oUiuxVc+/edvqXa04qNtbrs0Ukatg5HEzqT94Zs7J207dN5Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.8.tgz", + "integrity": "sha512-ETaW6245wK23YIEufhMQ3HSeHO7NgsLx8gygBVldRHKhOlD1oNeNy/P67mIh1zPn2Hr2HLieQrt6tWrVwuqrxg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.8.tgz", + "integrity": "sha512-T2DRQk55SgoleTP+DtPlMrxi/5r9AeFgkhkZ/B0ap99zmxtxdOixOMI570VjdRCs9pE4Wdkz7JYrsPvsl7eESg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.8.tgz", + "integrity": "sha512-NPxbdmmo3Bk7mbNeHmcCd7R7fptJaczPYBaELk6NcXxy7HLNyWwCyDJ/Xx+/YcNH7Im5dHdx9gZ5xIwyliQCbg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.8.tgz", + "integrity": "sha512-lytMAVOM3b1gPypL2TRmZ5rnXl7+6IIk8uB3eLsV1JwcizuolblXRrc5ShPrO9ls/b+RTp+E6gbsuLWHWi2zGg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.8.tgz", + "integrity": "sha512-hvWVo2VsXz/8NVt1UhLzxwAfo5sioj92uo0bCfLibB0xlOmimU/DeAEsQILlBQvkhrGjamP0/el5HU76HAitGw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.8.tgz", + "integrity": "sha512-/7Y7u77rdvmGTxR83PgaSvSBJCC2L3Kb1M/+dmSIvRvQPXXCuC97QAwMugBNG0yGcbEGfFBH7ojPzAOxfGNkwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.8.tgz", + "integrity": "sha512-9Lc4s7Oi98GqFA4HzA/W2JHIYfnXbUYgekUP/Sm4BG9sfLjyv6GKKHKKVs83SMicBF2JwAX6A1PuOLMqpD001w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.8.tgz", + "integrity": "sha512-rq6WzBGjSzihI9deW3fC2Gqiak68+b7qo5/3kmB6Gvbh/NYPA0sJhrnp7wgV4bNwjqM+R2AApXGxMO7ZoGhIJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.8.tgz", + "integrity": "sha512-AIAbverbg5jMvJznYiGhrd3sumfwWs8572mIJL5NQjJa06P8KfCPWZQ0NwZbPQnbQi9OWSZhFVSUWjjIrn4hSw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.8.tgz", + "integrity": "sha512-bfZ0cQ1uZs2PqpulNL5j/3w+GDhP36k1K5c38QdQg+Swy51jFZWWeIkteNsufkQxp986wnqRRsb/bHbY1WQ7TA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -2361,6 +2697,18 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, + "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==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sinonjs/commons": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", @@ -2380,96 +2728,79 @@ } }, "node_modules/@size-limit/esbuild": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/@size-limit/esbuild/-/esbuild-8.2.6.tgz", - "integrity": "sha512-a4c8xVDuDMYw5jF655ADjQDluw3jGPPYer6UJock5rSnUlWnIbmT/Ohud7gJGq5gqyLUQOCrBD7NB3g+mlhj4g==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@size-limit/esbuild/-/esbuild-11.0.0.tgz", + "integrity": "sha512-OOmba2ZuMpaUhmBXgCfgrO7L6zkUDwvFFfW8T+dK08968LQ79Q+kNgEXQAd+dhj9TlTkHyyEDczWmx16e9cXoQ==", "dev": true, "dependencies": { - "esbuild": "^0.18.6", - "nanoid": "^3.3.6" + "esbuild": "^0.19.5", + "nanoid": "^5.0.3" }, "engines": { - "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + "node": "^18.0.0 || >=20.0.0" }, "peerDependencies": { - "size-limit": "8.2.6" + "size-limit": "11.0.0" } }, "node_modules/@size-limit/esbuild-why": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/@size-limit/esbuild-why/-/esbuild-why-8.2.6.tgz", - "integrity": "sha512-Zd+24d5RKpB1ow//ICyDHq8BCx9dF5DZ3FyssYFwdZe/ljE1qpXfz8NpEOJCH4fDlSiTSsWmnWYW8VarfsiXEw==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@size-limit/esbuild-why/-/esbuild-why-11.0.0.tgz", + "integrity": "sha512-YTEmxCBE5PF6LH9lvNYXJM/h7XqVjpCVFVf2NrsJ75d3HdU8q77WriI7/T1++reBf8GfUhY5RIyASdR1ZJ8S4w==", "dev": true, "dependencies": { - "esbuild-visualizer": "^0.4.0", - "open": "^8.4.2" + "esbuild-visualizer": "^0.4.1", + "open": "^9.1.0" }, "engines": { - "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + "node": "^18.0.0 || >=20.0.0" }, "peerDependencies": { - "size-limit": "8.2.6" + "size-limit": "11.0.0" } }, "node_modules/@size-limit/esbuild-why/node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", "dev": true, "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", "is-wsl": "^2.2.0" }, "engines": { - "node": ">=12" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@size-limit/file": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/@size-limit/file/-/file-8.2.6.tgz", - "integrity": "sha512-B7ayjxiJsbtXdIIWazJkB5gezi5WBMecdHTFPMDhI3NwEML1RVvUjAkrb1mPAAkIpt2LVHPnhdCUHjqDdjugwg==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@size-limit/file/-/file-11.0.0.tgz", + "integrity": "sha512-tTg6sSiFbiogiof3GV4iIRCPS4+46Hvq4QWXGXp00Be/tOnpglXF62xNpCfFwefx9YCXxCyeYSqqaRBjpRCsmQ==", "dev": true, - "dependencies": { - "semver": "7.5.3" - }, "engines": { - "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + "node": "^18.0.0 || >=20.0.0" }, "peerDependencies": { - "size-limit": "8.2.6" - } - }, - "node_modules/@size-limit/file/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "size-limit": "11.0.0" } }, "node_modules/@size-limit/preset-small-lib": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/@size-limit/preset-small-lib/-/preset-small-lib-8.2.6.tgz", - "integrity": "sha512-roanEuscDaaXDsT5Cg9agMbmsQVlMr66eRg3AwT2o4vE7WFLR8Z42p0AHZiwucW1nGpCxAh8E08Qa/yyVuj5nA==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@size-limit/preset-small-lib/-/preset-small-lib-11.0.0.tgz", + "integrity": "sha512-B4KDPbx5E8Vsn/aXilt2iAeofRBJdT8svQRSylTQPw5RkrumXUBKioM1dmWUXcnuHR2zUveJXlMxGmbdmxbJpQ==", "dev": true, "dependencies": { - "@size-limit/esbuild": "8.2.6", - "@size-limit/file": "8.2.6", - "size-limit": "8.2.6" + "@size-limit/esbuild": "11.0.0", + "@size-limit/file": "11.0.0", + "size-limit": "11.0.0" }, "peerDependencies": { - "size-limit": "8.2.6" + "size-limit": "11.0.0" } }, "node_modules/@testing-library/dom": { @@ -3834,6 +4165,15 @@ "node": ">=4" } }, + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -3849,6 +4189,18 @@ "integrity": "sha512-oD8Ydw+5lNoqq+en24iuPt1QixdPpe/nUF8azTHnviCZYu9zUC+TwdzIp5orpblJosNlgNbVmmAb//c6d6ImUQ==", "dev": true }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3972,6 +4324,21 @@ "node": ">=10" } }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -4578,6 +4945,150 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/default-browser/node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/default-browser/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -4591,12 +5102,15 @@ } }, "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/define-properties": { @@ -4876,9 +5390,9 @@ "dev": true }, "node_modules/esbuild": { - "version": "0.18.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.7.tgz", - "integrity": "sha512-46V0EFvQ/urmruUCChD1e0SZJWM0Ulny5F+uf5QkBry97HfvgvZTnjpTrwmw0+CGRhqTh9zpFeB+W8WGIEXOAQ==", + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.8.tgz", + "integrity": "sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==", "dev": true, "hasInstallScript": true, "bin": { @@ -4888,34 +5402,34 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.18.7", - "@esbuild/android-arm64": "0.18.7", - "@esbuild/android-x64": "0.18.7", - "@esbuild/darwin-arm64": "0.18.7", - "@esbuild/darwin-x64": "0.18.7", - "@esbuild/freebsd-arm64": "0.18.7", - "@esbuild/freebsd-x64": "0.18.7", - "@esbuild/linux-arm": "0.18.7", - "@esbuild/linux-arm64": "0.18.7", - "@esbuild/linux-ia32": "0.18.7", - "@esbuild/linux-loong64": "0.18.7", - "@esbuild/linux-mips64el": "0.18.7", - "@esbuild/linux-ppc64": "0.18.7", - "@esbuild/linux-riscv64": "0.18.7", - "@esbuild/linux-s390x": "0.18.7", - "@esbuild/linux-x64": "0.18.7", - "@esbuild/netbsd-x64": "0.18.7", - "@esbuild/openbsd-x64": "0.18.7", - "@esbuild/sunos-x64": "0.18.7", - "@esbuild/win32-arm64": "0.18.7", - "@esbuild/win32-ia32": "0.18.7", - "@esbuild/win32-x64": "0.18.7" + "@esbuild/android-arm": "0.19.8", + "@esbuild/android-arm64": "0.19.8", + "@esbuild/android-x64": "0.19.8", + "@esbuild/darwin-arm64": "0.19.8", + "@esbuild/darwin-x64": "0.19.8", + "@esbuild/freebsd-arm64": "0.19.8", + "@esbuild/freebsd-x64": "0.19.8", + "@esbuild/linux-arm": "0.19.8", + "@esbuild/linux-arm64": "0.19.8", + "@esbuild/linux-ia32": "0.19.8", + "@esbuild/linux-loong64": "0.19.8", + "@esbuild/linux-mips64el": "0.19.8", + "@esbuild/linux-ppc64": "0.19.8", + "@esbuild/linux-riscv64": "0.19.8", + "@esbuild/linux-s390x": "0.19.8", + "@esbuild/linux-x64": "0.19.8", + "@esbuild/netbsd-x64": "0.19.8", + "@esbuild/openbsd-x64": "0.19.8", + "@esbuild/sunos-x64": "0.19.8", + "@esbuild/win32-arm64": "0.19.8", + "@esbuild/win32-ia32": "0.19.8", + "@esbuild/win32-x64": "0.19.8" } }, "node_modules/esbuild-visualizer": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/esbuild-visualizer/-/esbuild-visualizer-0.4.0.tgz", - "integrity": "sha512-Sa1nXTxAPasvsyYKx/LVLgFy9CUY9rC4wGCkxjhB9+oL3bTYAlqAo2TcWaGS01T/KwG5qGOfyFWLTjjfokaAEA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/esbuild-visualizer/-/esbuild-visualizer-0.4.1.tgz", + "integrity": "sha512-5XI3unzqPr3xqfzR/mzK3LhoAJs3FQhiIXBsKJ3Oh6CjyjuXz6HVmhJMoisrcpeTZip65fR54Dk53MZncA0AUQ==", "dev": true, "dependencies": { "open": "^8.4.0", @@ -4928,6 +5442,15 @@ "node": ">=14.20" } }, + "node_modules/esbuild-visualizer/node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/esbuild-visualizer/node_modules/open": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", @@ -5711,9 +6234,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -6721,6 +7244,39 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -8751,9 +9307,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.3.tgz", + "integrity": "sha512-I7X2b22cxA4LIHXPSqbBCEQSL+1wv8TuoefejsX4HFWyC6jc5JG7CEaxOltiKjc1M+YCS2YkrZZcj4+dytw9GA==", "dev": true, "funding": [ { @@ -8762,10 +9318,10 @@ } ], "bin": { - "nanoid": "bin/nanoid.cjs" + "nanoid": "bin/nanoid.js" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": "^18 || >=20" } }, "node_modules/nanospinner": { @@ -10149,6 +10705,21 @@ "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", "dev": true }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -10312,14 +10883,14 @@ "dev": true }, "node_modules/size-limit": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/size-limit/-/size-limit-8.2.6.tgz", - "integrity": "sha512-zpznim/tX/NegjoQuRKgWTF4XiB0cn2qt90uJzxYNTFAqexk4b94DOAkBD3TwhC6c3kw2r0KcnA5upziVMZqDg==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/size-limit/-/size-limit-11.0.0.tgz", + "integrity": "sha512-6+i4rE1GRzx/vRpuitRYQiZJNTXJjde+4P2NPg8AK7pURrE1+hA3mGstzvT8vQ8DuYFnvp9fh4CHM7Heq3EKXA==", "dev": true, "dependencies": { "bytes-iec": "^3.1.1", "chokidar": "^3.5.3", - "globby": "^11.1.0", + "globby": "^14.0.0", "lilconfig": "^2.1.0", "nanospinner": "^1.1.0", "picocolors": "^1.0.0" @@ -10328,7 +10899,51 @@ "size-limit": "bin.js" }, "engines": { - "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + "node": "^18.0.0 || >=20.0.0" + } + }, + "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==", + "dev": true, + "dependencies": { + "@sindresorhus/merge-streams": "^1.0.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/size-limit/node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/size-limit/node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/skip-regex": { @@ -10933,6 +11548,18 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -11367,6 +11994,18 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -11376,6 +12015,15 @@ "node": ">= 4.0.0" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index 321937de254..e42c2e04087 100644 --- a/package.json +++ b/package.json @@ -113,8 +113,8 @@ "@graphql-tools/schema": "10.0.2", "@microsoft/api-extractor": "7.38.3", "@rollup/plugin-node-resolve": "11.2.1", - "@size-limit/esbuild-why": "8.2.6", - "@size-limit/preset-small-lib": "8.2.6", + "@size-limit/esbuild-why": "11.0.0", + "@size-limit/preset-small-lib": "11.0.0", "@testing-library/jest-dom": "5.17.0", "@testing-library/react": "14.0.0", "@testing-library/react-12": "npm:@testing-library/react@^12", @@ -168,7 +168,7 @@ "rollup-plugin-cleanup": "3.2.1", "rollup-plugin-terser": "7.0.2", "rxjs": "7.8.1", - "size-limit": "8.2.6", + "size-limit": "11.0.0", "subscriptions-transport-ws": "0.11.0", "terser": "5.21.0", "ts-api-utils": "1.0.3", From c0c05ed2e96c81facfe4dfec770f004f37834910 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Mon, 27 Nov 2023 15:53:23 +0100 Subject: [PATCH 06/12] update some devDependencies (#11386) --- package-lock.json | 56 +++++++++++-------- package.json | 4 +- .../__tests__/mutations/lifecycle.test.tsx | 4 +- .../queries/observableQuery.test.tsx | 2 +- .../hoc/__tests__/shared-operations.test.tsx | 4 +- 5 files changed, 38 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index 735965f0162..c35093241b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "@rollup/plugin-node-resolve": "11.2.1", "@size-limit/esbuild-why": "11.0.0", "@size-limit/preset-small-lib": "11.0.0", - "@testing-library/jest-dom": "5.17.0", + "@testing-library/jest-dom": "6.1.4", "@testing-library/react": "14.0.0", "@testing-library/react-12": "npm:@testing-library/react@^12", "@testing-library/user-event": "14.5.1", @@ -63,7 +63,7 @@ "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c", "eslint-plugin-local-rules": "2.0.1", - "eslint-plugin-testing-library": "5.11.1", + "eslint-plugin-testing-library": "6.2.0", "expect-type": "0.17.3", "fetch-mock": "9.11.0", "glob": "8.1.0", @@ -136,9 +136,9 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.0.1.tgz", - "integrity": "sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", + "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==", "dev": true }, "node_modules/@andrewbranch/untar.js": { @@ -2823,14 +2823,13 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.17.0.tgz", - "integrity": "sha512-ynmNeT7asXyH3aSVv4vvX4Rb+0qjOhdNHnO/3vuZNqPmhDpV/+rCSGwQ7bLcmU2cJ4dvoheIO85LQj0IbJHEtg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz", + "integrity": "sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==", "dev": true, "dependencies": { - "@adobe/css-tools": "^4.0.1", + "@adobe/css-tools": "^4.3.1", "@babel/runtime": "^7.9.2", - "@types/testing-library__jest-dom": "^5.9.1", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", @@ -2839,9 +2838,29 @@ "redent": "^3.0.0" }, "engines": { - "node": ">=8", + "node": ">=14", "npm": ">=6", "yarn": ">=1" + }, + "peerDependencies": { + "@jest/globals": ">= 28", + "@types/jest": ">= 28", + "jest": ">= 28", + "vitest": ">= 0.32" + }, + "peerDependenciesMeta": { + "@jest/globals": { + "optional": true + }, + "@types/jest": { + "optional": true + }, + "jest": { + "optional": true + }, + "vitest": { + "optional": true + } } }, "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": { @@ -3363,15 +3382,6 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, - "node_modules/@types/testing-library__jest-dom": { - "version": "5.14.5", - "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz", - "integrity": "sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ==", - "dev": true, - "dependencies": { - "@types/jest": "*" - } - }, "node_modules/@types/tough-cookie": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", @@ -5693,9 +5703,9 @@ "dev": true }, "node_modules/eslint-plugin-testing-library": { - "version": "5.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.1.tgz", - "integrity": "sha512-5eX9e1Kc2PqVRed3taaLnAAqPZGEX75C+M/rXzUAI3wIg/ZxzUm1OVAwfe/O+vE+6YXOLetSe9g5GKD2ecXipw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.0.tgz", + "integrity": "sha512-+LCYJU81WF2yQ+Xu4A135CgK8IszcFcyMF4sWkbiu6Oj+Nel0TrkZq/HvDw0/1WuO3dhDQsZA/OpEMGd0NfcUw==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.58.0" diff --git a/package.json b/package.json index e42c2e04087..bb965256226 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "@rollup/plugin-node-resolve": "11.2.1", "@size-limit/esbuild-why": "11.0.0", "@size-limit/preset-small-lib": "11.0.0", - "@testing-library/jest-dom": "5.17.0", + "@testing-library/jest-dom": "6.1.4", "@testing-library/react": "14.0.0", "@testing-library/react-12": "npm:@testing-library/react@^12", "@testing-library/user-event": "14.5.1", @@ -144,7 +144,7 @@ "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c", "eslint-plugin-local-rules": "2.0.1", - "eslint-plugin-testing-library": "5.11.1", + "eslint-plugin-testing-library": "6.2.0", "expect-type": "0.17.3", "fetch-mock": "9.11.0", "glob": "8.1.0", diff --git a/src/react/hoc/__tests__/mutations/lifecycle.test.tsx b/src/react/hoc/__tests__/mutations/lifecycle.test.tsx index 0c0b88efd8e..f74895780a3 100644 --- a/src/react/hoc/__tests__/mutations/lifecycle.test.tsx +++ b/src/react/hoc/__tests__/mutations/lifecycle.test.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { render, cleanup } from "@testing-library/react"; +import { render } from "@testing-library/react"; import gql from "graphql-tag"; import { ApolloProvider } from "../../../context/ApolloProvider"; @@ -21,8 +21,6 @@ const expectedData = { }; describe("graphql(mutation) lifecycle", () => { - afterEach(cleanup); - itAsync( "allows falsy values in the mapped variables from props", (resolve, reject) => { diff --git a/src/react/hoc/__tests__/queries/observableQuery.test.tsx b/src/react/hoc/__tests__/queries/observableQuery.test.tsx index dd05663aac2..c05755b115b 100644 --- a/src/react/hoc/__tests__/queries/observableQuery.test.tsx +++ b/src/react/hoc/__tests__/queries/observableQuery.test.tsx @@ -64,7 +64,7 @@ describe("[queries] observableQuery", () => { // ensure first assertion and umount tree await assert1(); - userEvent.click(screen.getByText("Break things")); + await userEvent.click(screen.getByText("Break things")); // ensure cleanup await assert2(); diff --git a/src/react/hoc/__tests__/shared-operations.test.tsx b/src/react/hoc/__tests__/shared-operations.test.tsx index efd0b12924c..74c2df89820 100644 --- a/src/react/hoc/__tests__/shared-operations.test.tsx +++ b/src/react/hoc/__tests__/shared-operations.test.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { render, cleanup } from "@testing-library/react"; +import { render } from "@testing-library/react"; import gql from "graphql-tag"; import { DocumentNode } from "graphql"; @@ -25,8 +25,6 @@ function compose(...funcs: Function[]) { } describe("shared operations", () => { - afterEach(cleanup); - describe("withApollo", () => { it("passes apollo-client to props", () => { const client = new ApolloClient({ From f373f017794bc53ee688bffdfcb5ab6321d84d62 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:07:36 +0100 Subject: [PATCH 07/12] chore(deps): update all devdependencies (major) (#11148) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 156 ++++++++++++++++++++++++++++++++++++---------- package.json | 6 +- 2 files changed, 125 insertions(+), 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index c35093241b8..72fcd868a38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,7 +58,7 @@ "acorn": "8.10.0", "blob-polyfill": "7.0.20220408", "bytes": "3.1.2", - "cross-fetch": "3.1.8", + "cross-fetch": "4.0.0", "eslint": "8.51.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c", @@ -73,13 +73,13 @@ "jest-environment-jsdom": "29.7.0", "jest-junit": "16.0.0", "lodash": "4.17.21", - "patch-package": "7.0.2", + "patch-package": "8.0.0", "prettier": "3.0.3", "react": "18.2.0", "react-17": "npm:react@^17", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@^17", - "react-error-boundary": "3.1.4", + "react-error-boundary": "4.0.11", "recast": "0.23.4", "resolve": "1.22.8", "rimraf": "5.0.5", @@ -4368,13 +4368,14 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4706,9 +4707,9 @@ "dev": true }, "node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", "dev": true, "dependencies": { "node-fetch": "^2.6.12" @@ -5111,6 +5112,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/define-lazy-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", @@ -6533,10 +6548,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.5", @@ -6584,14 +6602,15 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6849,6 +6868,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -6876,6 +6907,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -7509,6 +7552,12 @@ "node": ">=8" } }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -8778,6 +8827,24 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/json-stable-stringify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz", + "integrity": "sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -8811,6 +8878,15 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -9747,9 +9823,9 @@ } }, "node_modules/patch-package": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-7.0.2.tgz", - "integrity": "sha512-PMYfL8LXxGIRmxXLqlEaBxzKPu7/SdP13ld6GSfAUJUZRmBDPp8chZs0dpzaAFn9TSPnFiMwkC6PJt6pBiAl8Q==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", + "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", "dev": true, "dependencies": { "@yarnpkg/lockfile": "^1.1.0", @@ -9758,6 +9834,7 @@ "cross-spawn": "^7.0.3", "find-yarn-workspace-root": "^2.0.0", "fs-extra": "^9.0.0", + "json-stable-stringify": "^1.0.2", "klaw-sync": "^6.0.0", "minimist": "^1.2.6", "open": "^7.4.2", @@ -9859,9 +9936,9 @@ } }, "node_modules/patch-package/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "engines": { "node": ">= 10.0.0" @@ -10314,17 +10391,13 @@ } }, "node_modules/react-error-boundary": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz", - "integrity": "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.0.11.tgz", + "integrity": "sha512-U13ul67aP5DOSPNSCWQ/eO0AQEYzEFkVljULQIjMV0KlffTAhxuDoBKdO0pb/JZ8mDhMKFZ9NZi0BmLGUiNphw==", "dev": true, "dependencies": { "@babel/runtime": "^7.12.5" }, - "engines": { - "node": ">=10", - "npm": ">=6" - }, "peerDependencies": { "react": ">=16.13.1" } @@ -10833,6 +10906,21 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/package.json b/package.json index bb965256226..e86e4ca7428 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "acorn": "8.10.0", "blob-polyfill": "7.0.20220408", "bytes": "3.1.2", - "cross-fetch": "3.1.8", + "cross-fetch": "4.0.0", "eslint": "8.51.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c", @@ -154,13 +154,13 @@ "jest-environment-jsdom": "29.7.0", "jest-junit": "16.0.0", "lodash": "4.17.21", - "patch-package": "7.0.2", + "patch-package": "8.0.0", "prettier": "3.0.3", "react": "18.2.0", "react-17": "npm:react@^17", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@^17", - "react-error-boundary": "3.1.4", + "react-error-boundary": "4.0.11", "recast": "0.23.4", "resolve": "1.22.8", "rimraf": "5.0.5", From eef3a75530e92e7edfcec4e207738798964cf734 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:01:49 +0100 Subject: [PATCH 08/12] chore(deps): update all devdependencies (#11321) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lenz Weber-Tronic Co-authored-by: phryneas --- .api-reports/api-report-core.md | 2 +- .api-reports/api-report-react.md | 14 +- .api-reports/api-report-react_components.md | 12 +- .api-reports/api-report-react_context.md | 12 +- .api-reports/api-report-react_hoc.md | 12 +- .api-reports/api-report-react_hooks.md | 14 +- .api-reports/api-report-react_ssr.md | 12 +- .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 | 4 +- .prettierrc | 3 +- .size-limit.cjs | 34 +- .size-limits.json | 4 +- config/prepareChangesetsRelease.ts | 6 +- .../require-using-disposable.ts | 10 +- integration-tests/cra4/src/App.tsx | 10 +- integration-tests/cra5/src/App.tsx | 10 +- integration-tests/vite-swc/src/App.tsx | 10 +- integration-tests/vite/src/App.tsx | 10 +- package-lock.json | 557 ++++++++++++------ package.json | 26 +- scripts/codemods/ac2-to-ac3/imports.js | 4 +- src/cache/core/cache.ts | 8 +- src/cache/core/types/common.ts | 20 +- src/cache/inmemory/__tests__/readFromStore.ts | 12 +- src/cache/inmemory/entityStore.ts | 64 +- src/cache/inmemory/helpers.ts | 21 +- src/cache/inmemory/inMemoryCache.ts | 14 +- src/cache/inmemory/key-extractor.ts | 4 +- src/cache/inmemory/object-canon.ts | 4 +- src/cache/inmemory/policies.ts | 73 +-- src/cache/inmemory/readFromStore.ts | 15 +- src/cache/inmemory/writeToStore.ts | 75 +-- src/core/ApolloClient.ts | 10 +- src/core/LocalState.ts | 5 +- src/core/ObservableQuery.ts | 55 +- src/core/QueryInfo.ts | 10 +- src/core/QueryManager.ts | 47 +- src/core/__tests__/QueryManager/index.ts | 5 +- src/core/__tests__/fetchPolicies.ts | 11 +- src/core/types.ts | 44 +- src/link/core/ApolloLink.ts | 8 +- src/link/http/parseAndCheckHttpResponse.ts | 11 +- src/link/persisted-queries/index.ts | 5 +- .../removeTypenameFromVariables.ts | 15 +- src/link/schema/index.ts | 6 +- src/link/utils/transformOperation.ts | 6 +- .../__tests__/client/Query.test.tsx | 20 +- src/react/context/ApolloContext.ts | 5 +- .../__tests__/queries/recomposeWithState.ts | 6 +- .../__tests__/ssr/getDataFromTree.test.tsx | 72 +-- src/react/hoc/mutation-hoc.tsx | 5 +- src/react/hoc/query-hoc.tsx | 5 +- src/react/hoc/subscription-hoc.tsx | 5 +- src/react/hoc/withApollo.tsx | 5 +- .../__tests__/useBackgroundQuery.test.tsx | 56 +- .../hooks/__tests__/useFragment.test.tsx | 46 +- .../hooks/__tests__/useMutation.test.tsx | 5 +- src/react/hooks/__tests__/useQuery.test.tsx | 9 +- .../hooks/__tests__/useSuspenseQuery.test.tsx | 96 ++- .../internal/useIsomorphicLayoutEffect.ts | 5 +- src/react/hooks/useBackgroundQuery.ts | 13 +- src/react/hooks/useFragment.ts | 8 +- src/react/hooks/useLazyQuery.ts | 5 +- src/react/hooks/useMutation.ts | 6 +- src/react/hooks/useQuery.ts | 4 +- src/react/hooks/useSubscription.ts | 12 +- src/react/hooks/useSuspenseQuery.ts | 25 +- src/react/parser/index.ts | 7 +- src/react/ssr/getDataFromTree.ts | 4 +- src/testing/core/mocking/mockFetch.ts | 9 +- src/testing/core/mocking/mockLink.ts | 21 +- src/testing/internal/profile/Render.tsx | 12 +- src/testing/internal/profile/profile.tsx | 38 +- src/testing/internal/profile/traces.ts | 8 +- src/testing/matchers/ProfiledComponent.ts | 6 +- src/testing/matchers/index.d.ts | 34 +- src/testing/react/MockedProvider.tsx | 10 +- src/utilities/common/errorHandling.ts | 5 +- src/utilities/common/mergeDeep.ts | 19 +- src/utilities/globals/invariantWrappers.ts | 6 +- src/utilities/graphql/DocumentTransform.ts | 5 +- .../graphql/__tests__/DocumentTransform.ts | 4 +- src/utilities/graphql/storeUtils.ts | 5 +- src/utilities/graphql/transform.ts | 17 +- .../observables/__tests__/asyncMap.ts | 22 +- src/utilities/observables/asyncMap.ts | 6 +- src/utilities/policies/pagination.ts | 5 +- src/utilities/types/DeepOmit.ts | 16 +- src/utilities/types/DeepPartial.ts | 34 +- src/utilities/types/IsStrictlyAny.ts | 11 +- 92 files changed, 1126 insertions(+), 941 deletions(-) diff --git a/.api-reports/api-report-core.md b/.api-reports/api-report-core.md index 2204a1a7244..7dd6cb37a62 100644 --- a/.api-reports/api-report-core.md +++ b/.api-reports/api-report-core.md @@ -2103,7 +2103,7 @@ interface WriteContext extends ReadMergeModifyContext { // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:380:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts // src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report-react.md b/.api-reports/api-report-react.md index e14e278cc70..851130e8f65 100644 --- a/.api-reports/api-report-react.md +++ b/.api-reports/api-report-react.md @@ -629,7 +629,7 @@ interface DataProxy { // Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts // // @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends ReadonlyArray ? TItem[] extends T ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; +type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; // Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts // @@ -2140,15 +2140,15 @@ interface WatchQueryOptions = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends ReadonlyArray ? TItem[] extends T ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; +type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; // Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts // @@ -2031,15 +2031,15 @@ interface WatchQueryOptions(it: (...args: TArgs // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts -// src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts -// src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:205:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:380:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/types.ts:154:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts +// src/core/types.ts:156:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts +// src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts +// src/core/types.ts:201:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts // src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts -// src/utilities/graphql/DocumentTransform.ts:122:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts +// src/utilities/graphql/DocumentTransform.ts:121:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-testing_core.md b/.api-reports/api-report-testing_core.md index 01cd92a9a0e..71f9db61e0c 100644 --- a/.api-reports/api-report-testing_core.md +++ b/.api-reports/api-report-testing_core.md @@ -1564,13 +1564,13 @@ export function withWarningSpy(it: (...args: TArgs // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts -// src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts -// src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:205:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:380:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/types.ts:154:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts +// src/core/types.ts:156:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts +// src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts +// src/core/types.ts:201:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts // src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts -// src/utilities/graphql/DocumentTransform.ts:122:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts +// src/utilities/graphql/DocumentTransform.ts:121:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-utilities.md b/.api-reports/api-report-utilities.md index 51443cf5eda..46a9d71f9dd 100644 --- a/.api-reports/api-report-utilities.md +++ b/.api-reports/api-report-utilities.md @@ -637,7 +637,7 @@ type DeepOmitPrimitive = Primitive | Function; // Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends ReadonlyArray ? TItem[] extends T ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; +export type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; // @public (undocumented) type DeepPartialMap = {} & Map, DeepPartial>; @@ -2445,11 +2445,11 @@ interface WriteContext extends ReadMergeModifyContext { // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts -// src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts -// src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:205:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:380:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/types.ts:154:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts +// src/core/types.ts:156:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts +// src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts +// src/core/types.ts:201:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts // src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/utilities/graphql/storeUtils.ts:220:12 - (ae-forgotten-export) The symbol "stringify" needs to be exported by the entry point index.d.ts // src/utilities/policies/pagination.ts:76:3 - (ae-forgotten-export) The symbol "TRelayEdge" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report.md b/.api-reports/api-report.md index 914be34a71e..77f78c50806 100644 --- a/.api-reports/api-report.md +++ b/.api-reports/api-report.md @@ -628,7 +628,7 @@ export interface DataProxy { // Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts // // @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends ReadonlyArray ? TItem[] extends T ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; +type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; // Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts // @@ -2787,7 +2787,7 @@ interface WriteContext extends ReadMergeModifyContext { // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:380:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts // src/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts // src/react/hooks/useBackgroundQuery.ts:26:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts diff --git a/.prettierrc b/.prettierrc index c21d016783a..e2511027712 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,5 +4,6 @@ "semi": true, "singleQuote": false, "tabWidth": 2, - "trailingComma": "es5" + "trailingComma": "es5", + "experimentalTernaries": true } diff --git a/.size-limit.cjs b/.size-limit.cjs index a519fd10994..5d8c63f865d 100644 --- a/.size-limit.cjs +++ b/.size-limit.cjs @@ -27,9 +27,9 @@ const checks = [ .map((config) => ({ ...config, name: - config.name || config.import - ? `import ${config.import} from "${config.path}"` - : config.path, + config.name || config.import ? + `import ${config.import} from "${config.path}"` + : config.path, // newer versions of size-limit changed to brotli as a default // we'll stay on gzip for now, so results are easier to compare gzip: true, @@ -54,21 +54,21 @@ const checks = [ ], })) .flatMap((value) => - value.path == "dist/apollo-client.min.cjs" - ? value - : [ - value, - { - ...value, - name: `${value.name} (production)`, - modifyEsbuildConfig(config) { - config.define = { - "globalThis.__DEV__": `false`, - }; - return config; - }, + value.path == "dist/apollo-client.min.cjs" ? + value + : [ + value, + { + ...value, + name: `${value.name} (production)`, + modifyEsbuildConfig(config) { + config.define = { + "globalThis.__DEV__": `false`, + }; + return config; }, - ] + }, + ] ) .map((value) => { value.limit = limits[value.name]; diff --git a/.size-limits.json b/.size-limits.json index f71b98fe37c..2b7fa71c6e3 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,4 +1,4 @@ { - "dist/apollo-client.min.cjs": 37975, - "import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32019 + "dist/apollo-client.min.cjs": 37973, + "import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32022 } diff --git a/config/prepareChangesetsRelease.ts b/config/prepareChangesetsRelease.ts index d24a28a4c06..171503939b0 100644 --- a/config/prepareChangesetsRelease.ts +++ b/config/prepareChangesetsRelease.ts @@ -30,9 +30,9 @@ function copyDir(src: string, dest: string) { let srcPath = path.join(src, entry.name); let destPath = path.join(dest, entry.name); - entry.isDirectory() - ? copyDir(srcPath, destPath) - : fs.copyFileSync(srcPath, destPath); + entry.isDirectory() ? + copyDir(srcPath, destPath) + : fs.copyFileSync(srcPath, destPath); } } diff --git a/eslint-local-rules/require-using-disposable.ts b/eslint-local-rules/require-using-disposable.ts index 35489c166a3..efeb5cce7b6 100644 --- a/eslint-local-rules/require-using-disposable.ts +++ b/eslint-local-rules/require-using-disposable.ts @@ -55,9 +55,9 @@ export const rule = ESLintUtils.RuleCreator.withoutDocs({ }); function parts(type: ts.Type): ts.Type[] { - return type.isUnion() - ? utils.unionTypeParts(type).flatMap(parts) - : type.isIntersection() - ? utils.intersectionTypeParts(type).flatMap(parts) - : [type]; + return ( + type.isUnion() ? utils.unionTypeParts(type).flatMap(parts) + : type.isIntersection() ? utils.intersectionTypeParts(type).flatMap(parts) + : [type] + ); } diff --git a/integration-tests/cra4/src/App.tsx b/integration-tests/cra4/src/App.tsx index cf87849afbd..189ee26af73 100644 --- a/integration-tests/cra4/src/App.tsx +++ b/integration-tests/cra4/src/App.tsx @@ -55,9 +55,9 @@ export default function App() { function Main() { const { data } = useQuery(QUERY); - return data ? ( -
    {data?.products.map(({ id, title }) =>
  • {title}
  • )}
- ) : ( - <>loading - ); + return data ? +
    + {data?.products.map(({ id, title }) =>
  • {title}
  • )} +
+ : <>loading; } diff --git a/integration-tests/cra5/src/App.tsx b/integration-tests/cra5/src/App.tsx index cf87849afbd..189ee26af73 100644 --- a/integration-tests/cra5/src/App.tsx +++ b/integration-tests/cra5/src/App.tsx @@ -55,9 +55,9 @@ export default function App() { function Main() { const { data } = useQuery(QUERY); - return data ? ( -
    {data?.products.map(({ id, title }) =>
  • {title}
  • )}
- ) : ( - <>loading - ); + return data ? +
    + {data?.products.map(({ id, title }) =>
  • {title}
  • )} +
+ : <>loading; } diff --git a/integration-tests/vite-swc/src/App.tsx b/integration-tests/vite-swc/src/App.tsx index cf87849afbd..189ee26af73 100644 --- a/integration-tests/vite-swc/src/App.tsx +++ b/integration-tests/vite-swc/src/App.tsx @@ -55,9 +55,9 @@ export default function App() { function Main() { const { data } = useQuery(QUERY); - return data ? ( -
    {data?.products.map(({ id, title }) =>
  • {title}
  • )}
- ) : ( - <>loading - ); + return data ? +
    + {data?.products.map(({ id, title }) =>
  • {title}
  • )} +
+ : <>loading; } diff --git a/integration-tests/vite/src/App.tsx b/integration-tests/vite/src/App.tsx index cf87849afbd..189ee26af73 100644 --- a/integration-tests/vite/src/App.tsx +++ b/integration-tests/vite/src/App.tsx @@ -55,9 +55,9 @@ export default function App() { function Main() { const { data } = useQuery(QUERY); - return data ? ( -
    {data?.products.map(({ id, title }) =>
  • {title}
  • )}
- ) : ( - <>loading - ); + return data ? +
    + {data?.products.map(({ id, title }) =>
  • {title}
  • )} +
+ : <>loading; } diff --git a/package-lock.json b/package-lock.json index 72fcd868a38..7100340c794 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "zen-observable-ts": "^1.2.5" }, "devDependencies": { - "@arethetypeswrong/cli": "0.12.2", + "@arethetypeswrong/cli": "0.13.2", "@babel/parser": "7.23.4", "@changesets/changelog-github": "0.4.8", "@changesets/cli": "2.26.2", @@ -35,7 +35,7 @@ "@size-limit/esbuild-why": "11.0.0", "@size-limit/preset-small-lib": "11.0.0", "@testing-library/jest-dom": "6.1.4", - "@testing-library/react": "14.0.0", + "@testing-library/react": "14.1.2", "@testing-library/react-12": "npm:@testing-library/react@^12", "@testing-library/user-event": "14.5.1", "@tsconfig/node20": "20.1.2", @@ -45,21 +45,21 @@ "@types/hoist-non-react-statics": "3.3.5", "@types/jest": "29.5.10", "@types/lodash": "4.14.202", - "@types/node": "20.8.10", + "@types/node": "20.10.0", "@types/node-fetch": "2.6.9", "@types/react": "18.2.38", "@types/react-dom": "18.2.17", "@types/use-sync-external-store": "0.0.6", - "@typescript-eslint/eslint-plugin": "6.7.5", - "@typescript-eslint/parser": "6.7.5", - "@typescript-eslint/rule-tester": "6.7.5", - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/utils": "6.7.5", - "acorn": "8.10.0", + "@typescript-eslint/eslint-plugin": "6.12.0", + "@typescript-eslint/parser": "6.12.0", + "@typescript-eslint/rule-tester": "6.12.0", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/utils": "6.12.0", + "acorn": "8.11.2", "blob-polyfill": "7.0.20220408", "bytes": "3.1.2", "cross-fetch": "4.0.0", - "eslint": "8.51.0", + "eslint": "8.54.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c", "eslint-plugin-local-rules": "2.0.1", @@ -74,7 +74,7 @@ "jest-junit": "16.0.0", "lodash": "4.17.21", "patch-package": "8.0.0", - "prettier": "3.0.3", + "prettier": "3.1.0", "react": "18.2.0", "react-17": "npm:react@^17", "react-dom": "18.2.0", @@ -89,14 +89,14 @@ "rxjs": "7.8.1", "size-limit": "11.0.0", "subscriptions-transport-ws": "0.11.0", - "terser": "5.21.0", + "terser": "5.24.0", "ts-api-utils": "1.0.3", "ts-jest": "29.1.1", "ts-jest-resolver": "2.0.1", "ts-morph": "20.0.0", "ts-node": "10.9.1", "typedoc": "0.25.0", - "typescript": "5.2.2", + "typescript": "5.3.2", "wait-for-observables": "1.0.3", "web-streams-polyfill": "3.2.1", "whatwg-fetch": "3.6.19" @@ -148,22 +148,24 @@ "dev": true }, "node_modules/@arethetypeswrong/cli": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@arethetypeswrong/cli/-/cli-0.12.2.tgz", - "integrity": "sha512-SE4Rqy8LM8zgRLeVXZqFIOg4w4TCDG2AMguuZDDRcrUmVQj7phW0tWJnKwsZtyJ6SdqXTIzWvGYiUJiHg2hb9w==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@arethetypeswrong/cli/-/cli-0.13.2.tgz", + "integrity": "sha512-eqRWeFFiI58xwsiUfZSdZsmNCaqqtxmSPP9554ajiCDrB/aNzq5VktVK7dNiT9PamunNeoej4KbDBnkNwVacvg==", "dev": true, "dependencies": { - "@arethetypeswrong/core": "0.12.2", + "@arethetypeswrong/core": "0.13.2", "chalk": "^4.1.2", "cli-table3": "^0.6.3", "commander": "^10.0.1", - "marked": "^5.1.0", - "marked-terminal": "^5.2.0", - "node-fetch": "^2.6.4", + "marked": "^9.1.2", + "marked-terminal": "^6.0.0", "semver": "^7.5.4" }, "bin": { "attw": "dist/index.js" + }, + "engines": { + "node": ">=18" } }, "node_modules/@arethetypeswrong/cli/node_modules/commander": { @@ -176,9 +178,9 @@ } }, "node_modules/@arethetypeswrong/cli/node_modules/marked": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-5.1.2.tgz", - "integrity": "sha512-ahRPGXJpjMjwSOlBoTMZAK7ATXkli5qCPxZ21TG44rx1KEo44bii4ekgTDQPNRQ4Kh7JMb9Ub1PVk1NxRSsorg==", + "version": "9.1.6", + "resolved": "https://registry.npmjs.org/marked/-/marked-9.1.6.tgz", + "integrity": "sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==", "dev": true, "bin": { "marked": "bin/marked.js" @@ -203,17 +205,19 @@ } }, "node_modules/@arethetypeswrong/core": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@arethetypeswrong/core/-/core-0.12.2.tgz", - "integrity": "sha512-ez/quGfC6RVg7VrwCgMVreJ01jbkfJQRNxOG7Bpl4YGcPRs45ZE1AzpHiIdzqfwFg9EBVSaewaffrsK5MVbALw==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@arethetypeswrong/core/-/core-0.13.2.tgz", + "integrity": "sha512-1l6ygar+6TH4o1JipWWGCEZlOhAwEShm1yKx+CgIByNjCzufbu6k9DNbDmBjdouusNRhBIOYQe1UHnJig+GtAw==", "dev": true, "dependencies": { "@andrewbranch/untar.js": "^1.0.3", - "fetch-ponyfill": "^7.1.0", "fflate": "^0.7.4", "semver": "^7.5.4", - "typescript": "^5.2.2", + "typescript": "5.3.2", "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": ">=18" } }, "node_modules/@arethetypeswrong/core/node_modules/semver": { @@ -1670,9 +1674,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1738,9 +1742,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.51.0.tgz", - "integrity": "sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1807,12 +1811,12 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" }, @@ -1834,9 +1838,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@isaacs/cliui": { @@ -2697,6 +2701,18 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, "node_modules/@sindresorhus/merge-streams": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-1.0.0.tgz", @@ -2910,9 +2926,9 @@ "dev": true }, "node_modules/@testing-library/react": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.0.0.tgz", - "integrity": "sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.1.2.tgz", + "integrity": "sha512-z4p7DVBTPjKM5qDZ0t5ZjzkpSNb+fZy1u6bzO7kk8oeGagpPCAtgh4cx1syrfp7a+QWkM021jGqjJaxJJnXAZg==", "dev": true, "dependencies": { "@babel/runtime": "^7.12.5", @@ -2967,18 +2983,18 @@ } }, "node_modules/@testing-library/react/node_modules/@testing-library/dom": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.0.0.tgz", - "integrity": "sha512-+/TLgKNFsYUshOY/zXsQOk+PlFQK+eyJ9T13IDVNJEi+M+Un7xlJK+FZKkbGSnf0+7E1G6PlDhkSYQ/GFiruBQ==", + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.3.tgz", + "integrity": "sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", - "aria-query": "^5.0.0", + "aria-query": "5.1.3", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.4.4", + "lz-string": "^1.5.0", "pretty-format": "^27.0.2" }, "engines": { @@ -2986,9 +3002,9 @@ } }, "node_modules/@testing-library/react/node_modules/@types/aria-query": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz", - "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "dev": true }, "node_modules/@testing-library/user-event": { @@ -3305,9 +3321,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.8.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", - "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", + "version": "20.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz", + "integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -3410,16 +3426,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.5.tgz", - "integrity": "sha512-JhtAwTRhOUcP96D0Y6KYnwig/MRQbOoLGXTON2+LlyB/N35SP9j1boai2zzwXb7ypKELXMx3DVk9UTaEq1vHEw==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.12.0.tgz", + "integrity": "sha512-XOpZ3IyJUIV1b15M7HVOpgQxPPF7lGXgsfcEIu3yDxFPaf/xZKt7s9QO/pbk7vpWQyVulpJbu4E5LwpZiQo4kA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.7.5", - "@typescript-eslint/type-utils": "6.7.5", - "@typescript-eslint/utils": "6.7.5", - "@typescript-eslint/visitor-keys": "6.7.5", + "@typescript-eslint/scope-manager": "6.12.0", + "@typescript-eslint/type-utils": "6.12.0", + "@typescript-eslint/utils": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -3460,15 +3476,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.5.tgz", - "integrity": "sha512-bIZVSGx2UME/lmhLcjdVc7ePBwn7CLqKarUBL4me1C5feOd663liTGjMBGVcGr+BhnSLeP4SgwdvNnnkbIdkCw==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz", + "integrity": "sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.7.5", - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/typescript-estree": "6.7.5", - "@typescript-eslint/visitor-keys": "6.7.5", + "@typescript-eslint/scope-manager": "6.12.0", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/typescript-estree": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0", "debug": "^4.3.4" }, "engines": { @@ -3488,13 +3504,13 @@ } }, "node_modules/@typescript-eslint/rule-tester": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-6.7.5.tgz", - "integrity": "sha512-rDUQDkMg577jA7U+2NFlgLv3S43epbjruLZ4MQaELhH+WZLmmGylFbcCWeonRmtFjF2Xd/lfYsjqQ+p61XZDkw==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-6.12.0.tgz", + "integrity": "sha512-O1kFPAuX9H63GNDTyd8GKO5RioxRX96mAVcevbUywVtkrp8eoVLEf2VmKIKCeYAM5oZst52DMVCQXjcQuyxq5w==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.7.5", - "@typescript-eslint/utils": "6.7.5", + "@typescript-eslint/typescript-estree": "6.12.0", + "@typescript-eslint/utils": "6.12.0", "ajv": "^6.10.0", "lodash.merge": "4.6.2", "semver": "^7.5.4" @@ -3527,13 +3543,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.5.tgz", - "integrity": "sha512-GAlk3eQIwWOJeb9F7MKQ6Jbah/vx1zETSDw8likab/eFcqkjSD7BI75SDAeC5N2L0MmConMoPvTsmkrg71+B1A==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.12.0.tgz", + "integrity": "sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/visitor-keys": "6.7.5" + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3544,13 +3560,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.5.tgz", - "integrity": "sha512-Gs0qos5wqxnQrvpYv+pf3XfcRXW6jiAn9zE/K+DlmYf6FcpxeNYN0AIETaPR7rHO4K2UY+D0CIbDP9Ut0U4m1g==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.12.0.tgz", + "integrity": "sha512-WWmRXxhm1X8Wlquj+MhsAG4dU/Blvf1xDgGaYCzfvStP2NwPQh6KBvCDbiOEvaE0filhranjIlK/2fSTVwtBng==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.7.5", - "@typescript-eslint/utils": "6.7.5", + "@typescript-eslint/typescript-estree": "6.12.0", + "@typescript-eslint/utils": "6.12.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -3571,9 +3587,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.5.tgz", - "integrity": "sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.12.0.tgz", + "integrity": "sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3584,13 +3600,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.5.tgz", - "integrity": "sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.12.0.tgz", + "integrity": "sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/visitor-keys": "6.7.5", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3626,17 +3642,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.5.tgz", - "integrity": "sha512-pfRRrH20thJbzPPlPc4j0UNGvH1PjPlhlCMq4Yx7EGjV7lvEeGX0U6MJYe8+SyFutWgSHsdbJ3BXzZccYggezA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.12.0.tgz", + "integrity": "sha512-LywPm8h3tGEbgfyjYnu3dauZ0U7R60m+miXgKcZS8c7QALO9uWJdvNoP+duKTk2XMWc7/Q3d/QiCuLN9X6SWyQ==", "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": "6.7.5", - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/typescript-estree": "6.7.5", + "@typescript-eslint/scope-manager": "6.12.0", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/typescript-estree": "6.12.0", "semver": "^7.5.4" }, "engines": { @@ -3666,12 +3682,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.5.tgz", - "integrity": "sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.12.0.tgz", + "integrity": "sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", + "@typescript-eslint/types": "6.12.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -3682,6 +3698,12 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@wry/context": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.7.3.tgz", @@ -3728,9 +3750,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -3893,12 +3915,25 @@ } }, "node_modules/aria-query": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz", - "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", "dev": true, - "engines": { - "node": ">=6.0" + "dependencies": { + "deep-equal": "^2.0.5" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/array-includes": { @@ -4941,6 +4976,38 @@ } } }, + "node_modules/deep-equal": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -5139,11 +5206,12 @@ } }, "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -5298,6 +5366,12 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/emojilib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/emojilib/-/emojilib-2.4.0.tgz", + "integrity": "sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==", + "dev": true + }, "node_modules/enhanced-resolve": { "version": "5.15.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", @@ -5382,6 +5456,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-shim-unscopables": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", @@ -5534,18 +5628,19 @@ } }, "node_modules/eslint": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.51.0.tgz", - "integrity": "sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.51.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.54.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -6337,15 +6432,6 @@ } } }, - "node_modules/fetch-ponyfill": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-7.1.0.tgz", - "integrity": "sha512-FhbbL55dj/qdVO3YNK7ZEkshvj3eQ7EuIGV2I6ic/2YiocvyWv+7jg2s4AyS0wdRU75s3tA8ZxI/xPigb0v5Aw==", - "dev": true, - "dependencies": { - "node-fetch": "~2.6.1" - } - }, "node_modules/fflate": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.4.tgz", @@ -7102,13 +7188,13 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -7131,6 +7217,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -7330,6 +7430,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -7428,6 +7537,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-shared-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", @@ -7519,6 +7637,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -7531,6 +7658,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -9059,9 +9199,9 @@ "dev": true }, "node_modules/lz-string": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "bin": { "lz-string": "bin/bin.js" @@ -9146,23 +9286,23 @@ } }, "node_modules/marked-terminal": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-5.2.0.tgz", - "integrity": "sha512-Piv6yNwAQXGFjZSaiNljyNFw7jKDdGrw70FSbtxEyldLsyeuV5ZHm/1wW++kWbrOF1VPnUgYOhB2oLL0ZpnekA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-6.1.0.tgz", + "integrity": "sha512-QaCSF6NV82oo6K0szEnmc65ooDeW0T/Adcyf0fcW+Hto2GT1VADFg8dn1zaeHqzj65fqDH1hMNChGNRaC/lbkA==", "dev": true, "dependencies": { "ansi-escapes": "^6.2.0", "cardinal": "^2.1.1", - "chalk": "^5.2.0", + "chalk": "^5.3.0", "cli-table3": "^0.6.3", - "node-emoji": "^1.11.0", - "supports-hyperlinks": "^2.3.0" + "node-emoji": "^2.1.0", + "supports-hyperlinks": "^3.0.0" }, "engines": { - "node": ">=14.13.1 || >=16.0.0" + "node": ">=16.0.0" }, "peerDependencies": { - "marked": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" + "marked": ">=1 <11" } }, "node_modules/marked-terminal/node_modules/ansi-escapes": { @@ -9181,9 +9321,9 @@ } }, "node_modules/marked-terminal/node_modules/chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -9426,12 +9566,18 @@ "dev": true }, "node_modules/node-emoji": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", - "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-2.1.3.tgz", + "integrity": "sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA==", "dev": true, "dependencies": { - "lodash": "^4.17.21" + "@sindresorhus/is": "^4.6.0", + "char-regex": "^1.0.2", + "emojilib": "^2.4.0", + "skin-tone": "^2.0.0" + }, + "engines": { + "node": ">=18" } }, "node_modules/node-fetch": { @@ -10166,9 +10312,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -10538,14 +10684,14 @@ "dev": true }, "node_modules/regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -10921,6 +11067,20 @@ "node": ">= 0.4" } }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -11044,6 +11204,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/skin-tone": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/skin-tone/-/skin-tone-2.0.0.tgz", + "integrity": "sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==", + "dev": true, + "dependencies": { + "unicode-emoji-modifier-base": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/skip-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/skip-regex/-/skip-regex-1.0.2.tgz", @@ -11336,6 +11508,18 @@ "node": ">=8" } }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dev": true, + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/stream-transform": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-2.1.3.tgz", @@ -11529,16 +11713,16 @@ } }, "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", + "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", "dev": true, "dependencies": { "has-flag": "^4.0.0", "supports-color": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=14.18" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -11589,9 +11773,9 @@ } }, "node_modules/terser": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.21.0.tgz", - "integrity": "sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.24.0.tgz", + "integrity": "sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -12059,9 +12243,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -12092,6 +12276,15 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, + "node_modules/unicode-emoji-modifier-base": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unicode-emoji-modifier-base/-/unicode-emoji-modifier-base-1.0.0.tgz", + "integrity": "sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/unicorn-magic": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", @@ -12383,6 +12576,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "dependencies": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", @@ -12403,17 +12611,16 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.4", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" diff --git a/package.json b/package.json index e86e4ca7428..81418c11b42 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "zen-observable-ts": "^1.2.5" }, "devDependencies": { - "@arethetypeswrong/cli": "0.12.2", + "@arethetypeswrong/cli": "0.13.2", "@babel/parser": "7.23.4", "@changesets/changelog-github": "0.4.8", "@changesets/cli": "2.26.2", @@ -116,7 +116,7 @@ "@size-limit/esbuild-why": "11.0.0", "@size-limit/preset-small-lib": "11.0.0", "@testing-library/jest-dom": "6.1.4", - "@testing-library/react": "14.0.0", + "@testing-library/react": "14.1.2", "@testing-library/react-12": "npm:@testing-library/react@^12", "@testing-library/user-event": "14.5.1", "@tsconfig/node20": "20.1.2", @@ -126,21 +126,21 @@ "@types/hoist-non-react-statics": "3.3.5", "@types/jest": "29.5.10", "@types/lodash": "4.14.202", - "@types/node": "20.8.10", + "@types/node": "20.10.0", "@types/node-fetch": "2.6.9", "@types/react": "18.2.38", "@types/react-dom": "18.2.17", "@types/use-sync-external-store": "0.0.6", - "@typescript-eslint/eslint-plugin": "6.7.5", - "@typescript-eslint/parser": "6.7.5", - "@typescript-eslint/rule-tester": "6.7.5", - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/utils": "6.7.5", - "acorn": "8.10.0", + "@typescript-eslint/eslint-plugin": "6.12.0", + "@typescript-eslint/parser": "6.12.0", + "@typescript-eslint/rule-tester": "6.12.0", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/utils": "6.12.0", + "acorn": "8.11.2", "blob-polyfill": "7.0.20220408", "bytes": "3.1.2", "cross-fetch": "4.0.0", - "eslint": "8.51.0", + "eslint": "8.54.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c", "eslint-plugin-local-rules": "2.0.1", @@ -155,7 +155,7 @@ "jest-junit": "16.0.0", "lodash": "4.17.21", "patch-package": "8.0.0", - "prettier": "3.0.3", + "prettier": "3.1.0", "react": "18.2.0", "react-17": "npm:react@^17", "react-dom": "18.2.0", @@ -170,14 +170,14 @@ "rxjs": "7.8.1", "size-limit": "11.0.0", "subscriptions-transport-ws": "0.11.0", - "terser": "5.21.0", + "terser": "5.24.0", "ts-api-utils": "1.0.3", "ts-jest": "29.1.1", "ts-jest-resolver": "2.0.1", "ts-morph": "20.0.0", "ts-node": "10.9.1", "typedoc": "0.25.0", - "typescript": "5.2.2", + "typescript": "5.3.2", "wait-for-observables": "1.0.3", "web-streams-polyfill": "3.2.1", "whatwg-fetch": "3.6.19" diff --git a/scripts/codemods/ac2-to-ac3/imports.js b/scripts/codemods/ac2-to-ac3/imports.js index e21dc594a6e..6ced8fff06f 100644 --- a/scripts/codemods/ac2-to-ac3/imports.js +++ b/scripts/codemods/ac2-to-ac3/imports.js @@ -103,8 +103,8 @@ export default function transformer(file, api) { function renameDefaultSpecifier(moduleImport, name) { function replacer(path) { - return path.value.local.name === name - ? j.importSpecifier(j.identifier(name)) + return path.value.local.name === name ? + j.importSpecifier(j.identifier(name)) : j.importSpecifier(j.identifier(name), path.value.local); } diff --git a/src/cache/core/cache.ts b/src/cache/core/cache.ts index b897419fb1a..44f283a2723 100644 --- a/src/cache/core/cache.ts +++ b/src/cache/core/cache.ts @@ -65,11 +65,9 @@ export abstract class ApolloCache implements DataProxy { // override the batch method to do more interesting things with its options. public batch(options: Cache.BatchOptions): U { const optimisticId = - typeof options.optimistic === "string" - ? options.optimistic - : options.optimistic === false - ? null - : void 0; + typeof options.optimistic === "string" ? options.optimistic + : options.optimistic === false ? null + : void 0; let updateResult: U; this.performTransaction( () => (updateResult = options.update(this)), diff --git a/src/cache/core/types/common.ts b/src/cache/core/types/common.ts index 9dc18d9197f..46c4fa8a155 100644 --- a/src/cache/core/types/common.ts +++ b/src/cache/core/types/common.ts @@ -105,22 +105,20 @@ export type Modifier = ( details: ModifierDetails ) => T | DeleteModifier | InvalidateModifier; -type StoreObjectValueMaybeReference = StoreVal extends Array< - Record -> - ? StoreVal extends Array - ? Item extends Record - ? ReadonlyArray | Reference> +type StoreObjectValueMaybeReference = + StoreVal extends Array> ? + StoreVal extends Array ? + Item extends Record ? + ReadonlyArray | Reference> : never : never - : StoreVal extends Record - ? AsStoreObject | Reference + : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; export type AllFieldsModifier> = Modifier< - Entity[keyof Entity] extends infer Value - ? StoreObjectValueMaybeReference> - : never + Entity[keyof Entity] extends infer Value ? + StoreObjectValueMaybeReference> + : never >; export type Modifiers = Record> = diff --git a/src/cache/inmemory/__tests__/readFromStore.ts b/src/cache/inmemory/__tests__/readFromStore.ts index 328336ec3ed..972e252215c 100644 --- a/src/cache/inmemory/__tests__/readFromStore.ts +++ b/src/cache/inmemory/__tests__/readFromStore.ts @@ -1477,12 +1477,12 @@ describe("reading from the store", () => { fields: { ruler(ruler, { canRead, toReference }) { // If the throne is empty, promote Apollo! - return canRead(ruler) - ? ruler - : toReference({ + return canRead(ruler) ? ruler : ( + toReference({ __typename: "Deity", name: "Apollo", - }); + }) + ); }, }, }, @@ -1654,8 +1654,8 @@ describe("reading from the store", () => { ...diffWithoutDevouredSons.result.ruler, children: diffWithoutDevouredSons.result.ruler.children.map( (child) => { - return child.name === "Zeus" - ? { + return child.name === "Zeus" ? + { ...child, children: childrenOfZeus // Remove empty child.children arrays. diff --git a/src/cache/inmemory/entityStore.ts b/src/cache/inmemory/entityStore.ts index a31f96db63a..5c617ce67a6 100644 --- a/src/cache/inmemory/entityStore.ts +++ b/src/cache/inmemory/entityStore.ts @@ -221,12 +221,12 @@ export abstract class EntityStore implements NormalizedCache { from?: StoreObject | Reference ) => this.policies.readField( - typeof fieldNameOrOptions === "string" - ? { - fieldName: fieldNameOrOptions, - from: from || makeReference(dataId), - } - : fieldNameOrOptions, + typeof fieldNameOrOptions === "string" ? + { + fieldName: fieldNameOrOptions, + from: from || makeReference(dataId), + } + : fieldNameOrOptions, { store: this } ), } satisfies Partial; @@ -236,19 +236,19 @@ export abstract class EntityStore implements NormalizedCache { let fieldValue = storeObject[storeFieldName]; if (fieldValue === void 0) return; const modify: Modifier | undefined = - typeof fields === "function" - ? fields - : fields[storeFieldName] || fields[fieldName]; + typeof fields === "function" ? fields : ( + fields[storeFieldName] || fields[fieldName] + ); if (modify) { let newValue = - modify === delModifier - ? DELETE - : modify(maybeDeepFreeze(fieldValue), { - ...sharedDetails, - fieldName, - storeFieldName, - storage: this.getStorage(dataId, storeFieldName), - }); + modify === delModifier ? DELETE : ( + modify(maybeDeepFreeze(fieldValue), { + ...sharedDetails, + fieldName, + storeFieldName, + storage: this.getStorage(dataId, storeFieldName), + }) + ); if (newValue === INVALIDATE) { this.group.dirty(dataId, storeFieldName); } else { @@ -344,16 +344,16 @@ export abstract class EntityStore implements NormalizedCache { if (storeObject) { const typename = this.getFieldValue(storeObject, "__typename"); const storeFieldName = - fieldName && args - ? this.policies.getStoreFieldName({ typename, fieldName, args }) - : fieldName; + fieldName && args ? + this.policies.getStoreFieldName({ typename, fieldName, args }) + : fieldName; return this.modify( dataId, - storeFieldName - ? { - [storeFieldName]: delModifier, - } - : delModifier + storeFieldName ? + { + [storeFieldName]: delModifier, + } + : delModifier ); } return false; @@ -534,17 +534,17 @@ export abstract class EntityStore implements NormalizedCache { storeFieldName: string ) => maybeDeepFreeze( - isReference(objectOrReference) - ? this.get(objectOrReference.__ref, storeFieldName) - : objectOrReference && objectOrReference[storeFieldName] + isReference(objectOrReference) ? + this.get(objectOrReference.__ref, storeFieldName) + : objectOrReference && objectOrReference[storeFieldName] ) as SafeReadonly; // Returns true for non-normalized StoreObjects and non-dangling // References, indicating that readField(name, objOrRef) has a chance of // working. Useful for filtering out dangling references from lists. public canRead: CanReadFunction = (objOrRef) => { - return isReference(objOrRef) - ? this.has(objOrRef.__ref) + return isReference(objOrRef) ? + this.has(objOrRef.__ref) : typeof objOrRef === "object"; }; @@ -789,8 +789,8 @@ class Layer extends EntityStore { public findChildRefIds(dataId: string): Record { const fromParent = this.parent.findChildRefIds(dataId); - return hasOwn.call(this.data, dataId) - ? { + return hasOwn.call(this.data, dataId) ? + { ...fromParent, ...super.findChildRefIds(dataId), } diff --git a/src/cache/inmemory/helpers.ts b/src/cache/inmemory/helpers.ts index f18d34da3f2..f8991653aed 100644 --- a/src/cache/inmemory/helpers.ts +++ b/src/cache/inmemory/helpers.ts @@ -43,10 +43,9 @@ export function defaultDataIdFromObject( ): string | undefined { if (typeof __typename === "string") { if (context) { - context.keyObject = !isNullish(id) - ? { id } - : !isNullish(_id) - ? { _id } + context.keyObject = + !isNullish(id) ? { id } + : !isNullish(_id) ? { _id } : void 0; } @@ -57,9 +56,9 @@ export function defaultDataIdFromObject( if (!isNullish(id)) { return `${__typename}:${ - typeof id === "number" || typeof id === "string" - ? id - : JSON.stringify(id) + typeof id === "number" || typeof id === "string" ? + id + : JSON.stringify(id) }`; } } @@ -89,8 +88,8 @@ export function getTypenameFromStoreObject( store: NormalizedCache, objectOrReference: StoreObject | Reference ): string | undefined { - return isReference(objectOrReference) - ? (store.get(objectOrReference.__ref, "__typename") as string) + return isReference(objectOrReference) ? + (store.get(objectOrReference.__ref, "__typename") as string) : objectOrReference && objectOrReference.__typename; } @@ -107,8 +106,8 @@ export function selectionSetMatchesResult( variables?: Record ): boolean { if (isNonNullObject(result)) { - return isArray(result) - ? result.every((item) => + return isArray(result) ? + result.every((item) => selectionSetMatchesResult(selectionSet, item, variables) ) : selectionSet.selections.every((field) => { diff --git a/src/cache/inmemory/inMemoryCache.ts b/src/cache/inmemory/inMemoryCache.ts index ff7e9cd8b91..45820e9d258 100644 --- a/src/cache/inmemory/inMemoryCache.ts +++ b/src/cache/inmemory/inMemoryCache.ts @@ -109,9 +109,10 @@ export class InMemoryCache extends ApolloCache { addTypename: this.addTypename, resultCacheMaxSize: this.config.resultCacheMaxSize, canonizeResults: shouldCanonizeResults(this.config), - canon: resetResultIdentities - ? void 0 - : previousReader && previousReader.canon, + canon: + resetResultIdentities ? void 0 : ( + previousReader && previousReader.canon + ), fragments, })), fragments @@ -225,8 +226,11 @@ export class InMemoryCache extends ApolloCache { // that nothing was modified. return false; } - const store = options.optimistic // Defaults to false. - ? this.optimisticData + const store = + ( + options.optimistic // Defaults to false. + ) ? + this.optimisticData : this.data; try { ++this.txCount; diff --git a/src/cache/inmemory/key-extractor.ts b/src/cache/inmemory/key-extractor.ts index 314da216800..38c5d14698e 100644 --- a/src/cache/inmemory/key-extractor.ts +++ b/src/cache/inmemory/key-extractor.ts @@ -250,8 +250,8 @@ export function extractKeyPath( extract = extract || extractKey; return normalize( path.reduce(function reducer(obj, key): any { - return isArray(obj) - ? obj.map((child) => reducer(child, key)) + return isArray(obj) ? + obj.map((child) => reducer(child, key)) : obj && extract!(obj, key); }, object) ); diff --git a/src/cache/inmemory/object-canon.ts b/src/cache/inmemory/object-canon.ts index 376b474f282..36b196d1519 100644 --- a/src/cache/inmemory/object-canon.ts +++ b/src/cache/inmemory/object-canon.ts @@ -8,8 +8,8 @@ import { isArray } from "./helpers.js"; function shallowCopy(value: T): T { if (isObjectOrArray(value)) { - return isArray(value) - ? (value.slice(0) as any as T) + return isArray(value) ? + (value.slice(0) as any as T) : { __proto__: Object.getPrototypeOf(value), ...value }; } return value; diff --git a/src/cache/inmemory/policies.ts b/src/cache/inmemory/policies.ts index 2b2caec7e9c..41db9853bb8 100644 --- a/src/cache/inmemory/policies.ts +++ b/src/cache/inmemory/policies.ts @@ -172,11 +172,11 @@ export type FieldPolicy< export type StorageType = Record; function argsFromFieldSpecifier(spec: FieldSpecifier) { - return spec.args !== void 0 - ? spec.args - : spec.field - ? argumentsObjectFromField(spec.field, spec.variables) - : null; + return ( + spec.args !== void 0 ? spec.args + : spec.field ? argumentsObjectFromField(spec.field, spec.variables) + : null + ); } export interface FieldFunctionOptions< @@ -451,17 +451,14 @@ export class Policies { merge?: FieldMergeFunction | boolean ) { existing.merge = - typeof merge === "function" - ? merge - : // Pass merge:true as a shorthand for a merge implementation + typeof merge === "function" ? merge + // Pass merge:true as a shorthand for a merge implementation // that returns options.mergeObjects(existing, incoming). - merge === true - ? mergeTrueFn - : // Pass merge:false to make incoming always replace existing + : merge === true ? mergeTrueFn + // Pass merge:false to make incoming always replace existing // without any warnings about data clobbering. - merge === false - ? mergeFalseFn - : existing.merge; + : merge === false ? mergeFalseFn + : existing.merge; } // Type policies can define merge functions, as an alternative to @@ -470,17 +467,14 @@ export class Policies { existing.keyFn = // Pass false to disable normalization for this typename. - keyFields === false - ? nullKeyFieldsFn - : // Pass an array of strings to use those fields to compute a + keyFields === false ? nullKeyFieldsFn + // Pass an array of strings to use those fields to compute a // composite ID for objects of this typename. - isArray(keyFields) - ? keyFieldsFnFromSpecifier(keyFields) - : // Pass a function to take full control over identification. - typeof keyFields === "function" - ? keyFields - : // Leave existing.keyFn unchanged if above cases fail. - existing.keyFn; + : isArray(keyFields) ? keyFieldsFnFromSpecifier(keyFields) + // Pass a function to take full control over identification. + : typeof keyFields === "function" ? keyFields + // Leave existing.keyFn unchanged if above cases fail. + : existing.keyFn; if (fields) { Object.keys(fields).forEach((fieldName) => { @@ -495,17 +489,14 @@ export class Policies { existing.keyFn = // Pass false to disable argument-based differentiation of // field identities. - keyArgs === false - ? simpleKeyArgsFn - : // Pass an array of strings to use named arguments to + keyArgs === false ? simpleKeyArgsFn + // Pass an array of strings to use named arguments to // compute a composite identity for the field. - isArray(keyArgs) - ? keyArgsFnFromSpecifier(keyArgs) - : // Pass a function to take full control over field identity. - typeof keyArgs === "function" - ? keyArgs - : // Leave existing.keyFn unchanged if above cases fail. - existing.keyFn; + : isArray(keyArgs) ? keyArgsFnFromSpecifier(keyArgs) + // Pass a function to take full control over field identity. + : typeof keyArgs === "function" ? keyArgs + // Leave existing.keyFn unchanged if above cases fail. + : existing.keyFn; if (typeof read === "function") { existing.read = read; @@ -803,8 +794,9 @@ export class Policies { } if (storeFieldName === void 0) { - storeFieldName = fieldSpec.field - ? storeKeyNameFromField(fieldSpec.field, fieldSpec.variables) + storeFieldName = + fieldSpec.field ? + storeKeyNameFromField(fieldSpec.field, fieldSpec.variables) : getStoreKeyName(fieldName, argsFromFieldSpecifier(fieldSpec)); } @@ -817,8 +809,7 @@ export class Policies { // Make sure custom field names start with the actual field.name.value // of the field, so we can always figure out which properties of a // StoreObject correspond to which original field names. - return fieldName === fieldNameFromStoreName(storeFieldName) - ? storeFieldName + return fieldName === fieldNameFromStoreName(storeFieldName) ? storeFieldName : fieldName + ":" + storeFieldName; } @@ -856,9 +847,9 @@ export class Policies { options, context, context.store.getStorage( - isReference(objectOrReference) - ? objectOrReference.__ref - : objectOrReference, + isReference(objectOrReference) ? + objectOrReference.__ref + : objectOrReference, storeFieldName ) ); diff --git a/src/cache/inmemory/readFromStore.ts b/src/cache/inmemory/readFromStore.ts index 50980c77597..9ad5455b457 100644 --- a/src/cache/inmemory/readFromStore.ts +++ b/src/cache/inmemory/readFromStore.ts @@ -383,9 +383,9 @@ export class StoreReader { if (!addTypenameToDocument.added(selection)) { missing = missingMerger.merge(missing, { [resultName]: `Can't find field '${selection.name.value}' on ${ - isReference(objectOrReference) - ? objectOrReference.__ref + " object" - : "object " + JSON.stringify(objectOrReference, null, 2) + isReference(objectOrReference) ? + objectOrReference.__ref + " object" + : "object " + JSON.stringify(objectOrReference, null, 2) }`, }); } @@ -443,11 +443,12 @@ export class StoreReader { const result = mergeDeepArray(objectsToMerge); const finalResult: ExecResult = { result, missing }; - const frozen = context.canonizeResults - ? this.canon.admit(finalResult) - : // Since this.canon is normally responsible for freezing results (only in + const frozen = + context.canonizeResults ? + this.canon.admit(finalResult) + // Since this.canon is normally responsible for freezing results (only in // development), freeze them manually if canonization is disabled. - maybeDeepFreeze(finalResult); + : maybeDeepFreeze(finalResult); // Store this result with its selection set so that we can quickly // recognize it again in the StoreReader#isFresh method. diff --git a/src/cache/inmemory/writeToStore.ts b/src/cache/inmemory/writeToStore.ts index 1d3f3fb01d4..3afbe6b04fc 100644 --- a/src/cache/inmemory/writeToStore.ts +++ b/src/cache/inmemory/writeToStore.ts @@ -95,13 +95,13 @@ function getContextFlavor( context.flavors.set( key, (flavored = - context.clientOnly === clientOnly && context.deferred === deferred - ? context - : { - ...context, - clientOnly, - deferred, - }) + context.clientOnly === clientOnly && context.deferred === deferred ? + context + : { + ...context, + clientOnly, + deferred, + }) ); } return flavored as TContext; @@ -330,9 +330,9 @@ export class StoreWriter { field, // Reset context.clientOnly and context.deferred to their default // values before processing nested selection sets. - field.selectionSet - ? getContextFlavor(context, false, false) - : context, + field.selectionSet ? + getContextFlavor(context, false, false) + : context, childTree ); @@ -633,13 +633,15 @@ export class StoreWriter { // Items in the same position in different arrays are not // necessarily related to each other, so when incoming is an array // we process its elements as if there was no existing data. - !isArray(incoming) && - // Likewise, existing must be either a Reference or a StoreObject - // in order for its fields to be safe to merge with the fields of - // the incoming object. - (isReference(existing) || storeValueIsStoreObject(existing)) - ? existing - : void 0; + ( + !isArray(incoming) && + // Likewise, existing must be either a Reference or a StoreObject + // in order for its fields to be safe to merge with the fields of + // the incoming object. + (isReference(existing) || storeValueIsStoreObject(existing)) + ) ? + existing + : void 0; // This narrowing is implied by mergeTree.map.size > 0 and // !isReference(incoming), though TypeScript understandably cannot @@ -665,11 +667,13 @@ export class StoreWriter { from: typeof e | typeof i, name: string | number ): StoreValue => { - return isArray(from) - ? typeof name === "number" - ? from[name] + return ( + isArray(from) ? + typeof name === "number" ? + from[name] : void 0 - : context.store.getFieldValue(from, String(name)); + : context.store.getFieldValue(from, String(name)) + ); }; mergeTree.map.forEach((childTree, storeFieldName) => { @@ -739,18 +743,17 @@ function mergeMergeTrees( if (!left || mergeTreeIsEmpty(left)) return right; const info = - left.info && right.info - ? { - ...left.info, - ...right.info, - } - : left.info || right.info; + left.info && right.info ? + { + ...left.info, + ...right.info, + } + : left.info || right.info; const needToMergeMaps = left.map.size && right.map.size; - const map = needToMergeMaps - ? new Map() - : left.map.size - ? left.map + const map = + needToMergeMaps ? new Map() + : left.map.size ? left.map : right.map; const merged = { info, map }; @@ -864,11 +867,11 @@ For more information about these options, please refer to the documentation: `, fieldName, parentType, - childTypenames.length - ? "either ensure all objects of type " + - childTypenames.join(" and ") + - " have an ID or a custom merge function, or " - : "", + childTypenames.length ? + "either ensure all objects of type " + + childTypenames.join(" and ") + + " have an ID or a custom merge function, or " + : "", typeDotName, existing, incoming diff --git a/src/core/ApolloClient.ts b/src/core/ApolloClient.ts index 967d9952739..3443cfa08e8 100644 --- a/src/core/ApolloClient.ts +++ b/src/core/ApolloClient.ts @@ -206,9 +206,8 @@ export class ApolloClient implements DataProxy { let { link } = options; if (!link) { - link = uri - ? new HttpLink({ uri, credentials, headers }) - : ApolloLink.empty(); + link = + uri ? new HttpLink({ uri, credentials, headers }) : ApolloLink.empty(); } this.link = link; @@ -253,8 +252,9 @@ export class ApolloClient implements DataProxy { }, localState: this.localState, assumeImmutableResults, - onBroadcast: connectToDevTools - ? () => { + onBroadcast: + connectToDevTools ? + () => { if (this.devToolsHookCb) { this.devToolsHookCb({ action: {}, diff --git a/src/core/LocalState.ts b/src/core/LocalState.ts index 4b68b787c2a..4d354349099 100644 --- a/src/core/LocalState.ts +++ b/src/core/LocalState.ts @@ -274,8 +274,9 @@ export class LocalState { const definitionOperation = mainDefinition.operation; - const defaultOperationType = definitionOperation - ? definitionOperation.charAt(0).toUpperCase() + + const defaultOperationType = + definitionOperation ? + definitionOperation.charAt(0).toUpperCase() + definitionOperation.slice(1) : "Query"; diff --git a/src/core/ObservableQuery.ts b/src/core/ObservableQuery.ts index 9a306746d0d..8516678dfc8 100644 --- a/src/core/ObservableQuery.ts +++ b/src/core/ObservableQuery.ts @@ -167,9 +167,9 @@ export class ObservableQuery< const { fetchPolicy = defaultFetchPolicy, // Make sure we don't store "standby" as the initialFetchPolicy. - initialFetchPolicy = fetchPolicy === "standby" - ? defaultFetchPolicy - : fetchPolicy, + initialFetchPolicy = fetchPolicy === "standby" ? defaultFetchPolicy : ( + fetchPolicy + ), } = options; this.options = { @@ -317,9 +317,9 @@ export class ObservableQuery< return true; } - const resultIsDifferent = this.queryManager.getDocumentInfo(this.query) - .hasNonreactiveDirective - ? !equalByQuery(this.query, this.last.result, newResult, this.variables) + const resultIsDifferent = + this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective ? + !equalByQuery(this.query, this.last.result, newResult, this.variables) : !equal(this.last.result, newResult); return ( @@ -427,17 +427,17 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`, } ): Promise> { const combinedOptions = { - ...(fetchMoreOptions.query - ? fetchMoreOptions - : { - ...this.options, - query: this.options.query, - ...fetchMoreOptions, - variables: { - ...this.options.variables, - ...fetchMoreOptions.variables, - }, - }), + ...(fetchMoreOptions.query ? fetchMoreOptions : ( + { + ...this.options, + query: this.options.query, + ...fetchMoreOptions, + variables: { + ...this.options.variables, + ...fetchMoreOptions.variables, + }, + } + )), // The fetchMore request goes immediately to the network and does // not automatically write its result to the cache (hence no-cache // instead of network-only), because we allow the caller of @@ -455,8 +455,9 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`, // pagination. We will however run the transforms on the original document // as well as the document passed in `fetchMoreOptions` to ensure the cache // uses the most up-to-date document which may rely on runtime conditionals. - this.lastQuery = fetchMoreOptions.query - ? this.transformDocument(this.options.query) + this.lastQuery = + fetchMoreOptions.query ? + this.transformDocument(this.options.query) : combinedOptions.query; // Simulate a loading result for the original query with @@ -783,9 +784,9 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`, // no-cache are both useful for when the user wants to control whether or not the // polled results are written to the cache. fetchPolicy: - this.options.initialFetchPolicy === "no-cache" - ? "no-cache" - : "network-only", + this.options.initialFetchPolicy === "no-cache" ? + "no-cache" + : "network-only", }, NetworkStatus.poll ).then(poll, poll); @@ -816,8 +817,9 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`, error = void 0; } return (this.last = { - result: this.queryManager.assumeImmutableResults - ? newResult + result: + this.queryManager.assumeImmutableResults ? + newResult : cloneDeep(newResult), variables, ...(error ? { error } : null), @@ -847,8 +849,9 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`, const oldFetchPolicy = this.options.fetchPolicy; const mergedOptions = compact(this.options, newOptions || {}); - const options = useDisposableConcast - ? // Disposable Concast fetches receive a shallow copy of this.options + const options = + useDisposableConcast ? + // Disposable Concast fetches receive a shallow copy of this.options // (merged with newOptions), leaving this.options unmodified. mergedOptions : assign(this.options, mergedOptions); diff --git a/src/core/QueryInfo.ts b/src/core/QueryInfo.ts index cdf0d358ceb..bd416b8b5be 100644 --- a/src/core/QueryInfo.ts +++ b/src/core/QueryInfo.ts @@ -184,8 +184,9 @@ export class QueryInfo { diff: Cache.DiffResult | null, options?: Cache.DiffOptions ) { - this.lastDiff = diff - ? { + this.lastDiff = + diff ? + { diff, options: options || this.getDiffOptions(), } @@ -360,9 +361,8 @@ export class QueryInfo { cacheWriteBehavior: CacheWriteBehavior ) { const merger = new DeepMerger(); - const graphQLErrors = isNonEmptyArray(result.errors) - ? result.errors.slice(0) - : []; + const graphQLErrors = + isNonEmptyArray(result.errors) ? result.errors.slice(0) : []; // Cancel the pending notify timeout (if it exists) to prevent extraneous network // requests. To allow future notify timeouts, diff and dirty are reset as well. diff --git a/src/core/QueryManager.ts b/src/core/QueryManager.ts index 23ee9320400..62909a7f7b9 100644 --- a/src/core/QueryManager.ts +++ b/src/core/QueryManager.ts @@ -164,8 +164,9 @@ export class QueryManager { this.localState = localState || new LocalState({ cache }); this.ssrMode = ssrMode; this.assumeImmutableResults = assumeImmutableResults; - this.documentTransform = documentTransform - ? defaultDocumentTransform + this.documentTransform = + documentTransform ? + defaultDocumentTransform .concat(documentTransform) // The custom document transform may add new fragment spreads or new // field selections, so we want to give the cache a chance to run @@ -351,11 +352,11 @@ export class QueryManager { self.broadcastQueries(); reject( - err instanceof ApolloError - ? err - : new ApolloError({ - networkError: err, - }) + err instanceof ApolloError ? err : ( + new ApolloError({ + networkError: err, + }) + ) ); }, }); @@ -593,9 +594,9 @@ export class QueryManager { } ) { const data = - typeof optimisticResponse === "function" - ? optimisticResponse(mutation.variables) - : optimisticResponse; + typeof optimisticResponse === "function" ? + optimisticResponse(mutation.variables) + : optimisticResponse; return this.cache.recordOptimisticTransaction((cache) => { try { @@ -915,9 +916,9 @@ export class QueryManager { queryNamesAndDocs.forEach((included, nameOrDoc) => { if (!included) { invariant.warn( - typeof nameOrDoc === "string" - ? `Unknown query named "%s" requested in refetchQueries options.include array` - : `Unknown query %s requested in refetchQueries options.include array`, + typeof nameOrDoc === "string" ? + `Unknown query named "%s" requested in refetchQueries options.include array` + : `Unknown query %s requested in refetchQueries options.include array`, nameOrDoc ); } @@ -1201,9 +1202,10 @@ export class QueryManager { }, (networkError) => { - const error = isApolloError(networkError) - ? networkError - : new ApolloError({ networkError }); + const error = + isApolloError(networkError) ? networkError : ( + new ApolloError({ networkError }) + ); // Avoid storing errors from older interrupted queries. if (requestId >= queryInfo.lastRequestId) { @@ -1565,14 +1567,15 @@ export class QueryManager { }; const cacheWriteBehavior = - fetchPolicy === "no-cache" - ? CacheWriteBehavior.FORBID - : // Watched queries must opt into overwriting existing data on refetch, + fetchPolicy === "no-cache" ? CacheWriteBehavior.FORBID + // Watched queries must opt into overwriting existing data on refetch, // by passing refetchWritePolicy: "overwrite" in their WatchQueryOptions. + : ( networkStatus === NetworkStatus.refetch && - refetchWritePolicy !== "merge" - ? CacheWriteBehavior.OVERWRITE - : CacheWriteBehavior.MERGE; + refetchWritePolicy !== "merge" + ) ? + CacheWriteBehavior.OVERWRITE + : CacheWriteBehavior.MERGE; const resultsFromLink = () => this.getResultsFromLink(queryInfo, cacheWriteBehavior, { diff --git a/src/core/__tests__/QueryManager/index.ts b/src/core/__tests__/QueryManager/index.ts index 11f92046721..083985c6e7c 100644 --- a/src/core/__tests__/QueryManager/index.ts +++ b/src/core/__tests__/QueryManager/index.ts @@ -5848,9 +5848,8 @@ describe("QueryManager", () => { const variables = { id: "1234" }; - const refetchError = testQueryError - ? new Error("Refetch failed") - : undefined; + const refetchError = + testQueryError ? new Error("Refetch failed") : undefined; const queryManager = mockQueryManager( { diff --git a/src/core/__tests__/fetchPolicies.ts b/src/core/__tests__/fetchPolicies.ts index 27c691aab06..6f1f1cac5e9 100644 --- a/src/core/__tests__/fetchPolicies.ts +++ b/src/core/__tests__/fetchPolicies.ts @@ -871,9 +871,9 @@ describe("nextFetchPolicy", () => { }) => itAsync( `transitions ${args.fetchPolicy} to ${ - typeof args.nextFetchPolicy === "function" - ? args.nextFetchPolicy.name - : args.nextFetchPolicy + typeof args.nextFetchPolicy === "function" ? + args.nextFetchPolicy.name + : args.nextFetchPolicy } (${args.useDefaultOptions ? "" : "not "}using defaults)`, (resolve, reject) => { const client = new ApolloClient({ @@ -882,8 +882,9 @@ describe("nextFetchPolicy", () => { addTypename: true, }), defaultOptions: { - watchQuery: args.useDefaultOptions - ? { + watchQuery: + args.useDefaultOptions ? + { nextFetchPolicy: args.nextFetchPolicy, } : {}, diff --git a/src/core/types.ts b/src/core/types.ts index 832f2533f57..eeda05fa41c 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -74,24 +74,21 @@ export type RefetchQueriesPromiseResults = // we get if we don't check for any. I hoped `any extends TResult` would do // the trick here, instead of IsStrictlyAny, but you can see for yourself what // fails in the refetchQueries tests if you try making that simplification. - IsStrictlyAny extends true - ? any[] - : // If the onQueryUpdated function passed to client.refetchQueries returns true - // or false, that means either to refetch the query (true) or to skip the - // query (false). Since refetching produces an ApolloQueryResult, and - // skipping produces nothing, the fully-resolved array of all results produced - // will be an ApolloQueryResult[], when TResult extends boolean. - TResult extends boolean - ? ApolloQueryResult[] - : // If onQueryUpdated returns a PromiseLike, that thenable will be passed as - // an array element to Promise.all, so we infer/unwrap the array type U here. - TResult extends PromiseLike - ? U[] - : // All other onQueryUpdated results end up in the final Promise.all array as - // themselves, with their original TResult type. Note that TResult will - // default to ApolloQueryResult if no onQueryUpdated function is passed - // to client.refetchQueries. - TResult[]; + IsStrictlyAny extends true ? any[] + : // If the onQueryUpdated function passed to client.refetchQueries returns true + // or false, that means either to refetch the query (true) or to skip the + // query (false). Since refetching produces an ApolloQueryResult, and + // skipping produces nothing, the fully-resolved array of all results produced + // will be an ApolloQueryResult[], when TResult extends boolean. + TResult extends boolean ? ApolloQueryResult[] + : // If onQueryUpdated returns a PromiseLike, that thenable will be passed as + // an array element to Promise.all, so we infer/unwrap the array type U here. + TResult extends PromiseLike ? U[] + : // All other onQueryUpdated results end up in the final Promise.all array as + // themselves, with their original TResult type. Note that TResult will + // default to ApolloQueryResult if no onQueryUpdated function is passed + // to client.refetchQueries. + TResult[]; // The result of client.refetchQueries is thenable/awaitable, if you just want // an array of fully resolved results, but you can also access the raw results @@ -126,12 +123,11 @@ export type InternalRefetchQueriesResult = // If onQueryUpdated returns a boolean, that's equivalent to refetching the // query when the boolean is true and skipping the query when false, so the // internal type of refetched results is Promise>. - TResult extends boolean - ? Promise> - : // Otherwise, onQueryUpdated returns whatever it returns. If onQueryUpdated is - // not provided, TResult defaults to Promise> (see the - // generic type parameters of client.refetchQueries). - TResult; + TResult extends boolean ? Promise> + : // Otherwise, onQueryUpdated returns whatever it returns. If onQueryUpdated is + // not provided, TResult defaults to Promise> (see the + // generic type parameters of client.refetchQueries). + TResult; export type InternalRefetchQueriesMap = Map< ObservableQuery, diff --git a/src/link/core/ApolloLink.ts b/src/link/core/ApolloLink.ts index c59219727ba..ca9d2cfcd72 100644 --- a/src/link/core/ApolloLink.ts +++ b/src/link/core/ApolloLink.ts @@ -47,14 +47,14 @@ export class ApolloLink { if (isTerminating(leftLink) && isTerminating(rightLink)) { return new ApolloLink((operation) => { - return test(operation) - ? leftLink.request(operation) || Observable.of() + return test(operation) ? + leftLink.request(operation) || Observable.of() : rightLink.request(operation) || Observable.of(); }); } else { return new ApolloLink((operation, forward) => { - return test(operation) - ? leftLink.request(operation, forward) || Observable.of() + return test(operation) ? + leftLink.request(operation, forward) || Observable.of() : rightLink.request(operation, forward) || Observable.of(); }); } diff --git a/src/link/http/parseAndCheckHttpResponse.ts b/src/link/http/parseAndCheckHttpResponse.ts index feb8a88d29d..e4126f9231f 100644 --- a/src/link/http/parseAndCheckHttpResponse.ts +++ b/src/link/http/parseAndCheckHttpResponse.ts @@ -29,8 +29,9 @@ export async function readMultipartBody< // https://www.rfc-editor.org/rfc/rfc9110.html#name-parameters // e.g. multipart/mixed;boundary="graphql";deferSpec=20220824 // if no boundary is specified, default to - - const boundaryVal = contentType?.includes(delimiter) - ? contentType + const boundaryVal = + contentType?.includes(delimiter) ? + contentType ?.substring(contentType?.indexOf(delimiter) + delimiter.length) .replace(/['"]/g, "") .replace(/\;(.*)/gm, "") @@ -222,9 +223,9 @@ export function parseAndCheckHttpResponse(operations: Operation | Operation[]) { response, result, `Server response was missing for query '${ - Array.isArray(operations) - ? operations.map((op) => op.operationName) - : operations.operationName + Array.isArray(operations) ? + operations.map((op) => op.operationName) + : operations.operationName }'.` ); } diff --git a/src/link/persisted-queries/index.ts b/src/link/persisted-queries/index.ts index b2a8c97fbce..fa4c64bac58 100644 --- a/src/link/persisted-queries/index.ts +++ b/src/link/persisted-queries/index.ts @@ -186,9 +186,8 @@ export const createPersistedQueryLink = ( response, networkError, operation, - graphQLErrors: isNonEmptyArray(graphQLErrors) - ? graphQLErrors - : void 0, + graphQLErrors: + isNonEmptyArray(graphQLErrors) ? graphQLErrors : void 0, meta: processErrors(graphQLErrors), }; diff --git a/src/link/remove-typename/removeTypenameFromVariables.ts b/src/link/remove-typename/removeTypenameFromVariables.ts index f8362dddbc3..b8c173b15d2 100644 --- a/src/link/remove-typename/removeTypenameFromVariables.ts +++ b/src/link/remove-typename/removeTypenameFromVariables.ts @@ -23,8 +23,9 @@ export function removeTypenameFromVariables( const { query, variables } = operation; if (variables) { - operation.variables = except - ? maybeStripTypenameUsingConfig(query, variables, except) + operation.variables = + except ? + maybeStripTypenameUsingConfig(query, variables, except) : stripTypename(variables); } @@ -45,8 +46,9 @@ function maybeStripTypenameUsingConfig( const typename = variableDefinitions[key]; const typenameConfig = config[typename]; - keyVal[1] = typenameConfig - ? maybeStripTypename(value, typenameConfig) + keyVal[1] = + typenameConfig ? + maybeStripTypename(value, typenameConfig) : stripTypename(value); return keyVal; @@ -81,8 +83,9 @@ function maybeStripTypename( const fieldConfig = config[key]; - modified[key] = fieldConfig - ? maybeStripTypename(child, fieldConfig) + modified[key] = + fieldConfig ? + maybeStripTypename(child, fieldConfig) : stripTypename(child); }); diff --git a/src/link/schema/index.ts b/src/link/schema/index.ts index 7809ec8f8a2..336fd9c9870 100644 --- a/src/link/schema/index.ts +++ b/src/link/schema/index.ts @@ -53,9 +53,9 @@ export class SchemaLink extends ApolloLink { return new Observable((observer) => { new Promise((resolve) => resolve( - typeof this.context === "function" - ? this.context(operation) - : this.context + typeof this.context === "function" ? + this.context(operation) + : this.context ) ) .then((context) => { diff --git a/src/link/utils/transformOperation.ts b/src/link/utils/transformOperation.ts index 9e640bb97c4..7509662d5c7 100644 --- a/src/link/utils/transformOperation.ts +++ b/src/link/utils/transformOperation.ts @@ -12,9 +12,9 @@ export function transformOperation(operation: GraphQLRequest): GraphQLRequest { // Best guess at an operation name if (!transformedOperation.operationName) { transformedOperation.operationName = - typeof transformedOperation.query !== "string" - ? getOperationName(transformedOperation.query) || undefined - : ""; + typeof transformedOperation.query !== "string" ? + getOperationName(transformedOperation.query) || undefined + : ""; } return transformedOperation as Operation; diff --git a/src/react/components/__tests__/client/Query.test.tsx b/src/react/components/__tests__/client/Query.test.tsx index acdd2015301..9182e61e19e 100644 --- a/src/react/components/__tests__/client/Query.test.tsx +++ b/src/react/components/__tests__/client/Query.test.tsx @@ -369,16 +369,16 @@ describe("Query component", () => { .fetchMore({ variables: { first: 1 }, updateQuery: (prev: any, { fetchMoreResult }: any) => - fetchMoreResult - ? { - allPeople: { - people: [ - ...prev.allPeople.people, - ...fetchMoreResult.allPeople.people, - ], - }, - } - : prev, + fetchMoreResult ? + { + allPeople: { + people: [ + ...prev.allPeople.people, + ...fetchMoreResult.allPeople.people, + ], + }, + } + : prev, }) .then((result2: any) => { expect(result2.data).toEqual(data2); diff --git a/src/react/context/ApolloContext.ts b/src/react/context/ApolloContext.ts index e942e8e9dad..de6203aaadc 100644 --- a/src/react/context/ApolloContext.ts +++ b/src/react/context/ApolloContext.ts @@ -13,9 +13,8 @@ export interface ApolloContextValue { // (which can lead to problems like having an Apollo Client instance added // in one context, then attempting to retrieve it from another different // context), a single Apollo context is created and tracked in global state. -const contextKey = canUseSymbol - ? Symbol.for("__APOLLO_CONTEXT__") - : "__APOLLO_CONTEXT__"; +const contextKey = + canUseSymbol ? Symbol.for("__APOLLO_CONTEXT__") : "__APOLLO_CONTEXT__"; export function getApolloContext(): React.Context { invariant( diff --git a/src/react/hoc/__tests__/queries/recomposeWithState.ts b/src/react/hoc/__tests__/queries/recomposeWithState.ts index a1bde0a6c18..2ec2ad79756 100644 --- a/src/react/hoc/__tests__/queries/recomposeWithState.ts +++ b/src/react/hoc/__tests__/queries/recomposeWithState.ts @@ -40,9 +40,9 @@ export const withState = > { state = { stateValue: - typeof initialState === "function" - ? initialState(this.props) - : initialState, + typeof initialState === "function" ? + initialState(this.props) + : initialState, }; updateStateValue = ( diff --git a/src/react/hoc/__tests__/ssr/getDataFromTree.test.tsx b/src/react/hoc/__tests__/ssr/getDataFromTree.test.tsx index 13172453f78..0a687741f64 100644 --- a/src/react/hoc/__tests__/ssr/getDataFromTree.test.tsx +++ b/src/react/hoc/__tests__/ssr/getDataFromTree.test.tsx @@ -52,9 +52,9 @@ describe("SSR", () => { const WrappedElement = graphql(query)( ({ data }: ChildProps) => (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
) ); @@ -105,9 +105,9 @@ describe("SSR", () => { options: { fetchPolicy: "network-only" }, })(({ data }: ChildProps) => (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
)); @@ -191,9 +191,9 @@ describe("SSR", () => { const WrappedElement = graphql(query)( ({ data }: ChildProps) => (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
) ); @@ -282,9 +282,9 @@ describe("SSR", () => { React.PropsWithChildren> > = ({ data }) => (
- {!data || data.loading || !data.user - ? "loading" - : data.user.firstName} + {!data || data.loading || !data.user ? + "loading" + : data.user.firstName}
); @@ -365,9 +365,9 @@ describe("SSR", () => { React.PropsWithChildren> > = ({ data }) => (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.lastName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.lastName}
@@ -521,9 +521,9 @@ describe("SSR", () => { const Element = graphql(query)( ({ data }: ChildProps) => (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
) ); @@ -595,9 +595,9 @@ describe("SSR", () => { expect(this.state.thing).toBe(2); return (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
); } @@ -714,9 +714,9 @@ describe("SSR", () => { expect(this.state.client).toBe(apolloClient); return (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
); } @@ -785,9 +785,9 @@ describe("SSR", () => { options: (props) => ({ variables: props, ssr: false }), })(({ data }) => (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
)); @@ -939,9 +939,9 @@ describe("SSR", () => { > > = ({ data }) => (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
); @@ -1024,9 +1024,9 @@ describe("SSR", () => { > > = ({ data }) => (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
); @@ -1069,9 +1069,9 @@ describe("SSR", () => { const WrappedElement = graphql<{}, Data>(query)( ({ data }: ChildProps<{}, Data>) => (
- {!data || data.loading || !data.currentUser - ? "loading" - : data.currentUser.firstName} + {!data || data.loading || !data.currentUser ? + "loading" + : data.currentUser.firstName}
) ); diff --git a/src/react/hoc/mutation-hoc.tsx b/src/react/hoc/mutation-hoc.tsx index 7705c1eeda4..8d4162eeee0 100644 --- a/src/react/hoc/mutation-hoc.tsx +++ b/src/react/hoc/mutation-hoc.tsx @@ -97,9 +97,8 @@ export function withMutation< // this matches the query HoC const result = Object.assign(r, data || {}); const name = operationOptions.name || "mutate"; - const resultName = operationOptions.name - ? `${name}Result` - : "result"; + const resultName = + operationOptions.name ? `${name}Result` : "result"; let childProps = { [name]: mutate, [resultName]: result, diff --git a/src/react/hoc/query-hoc.tsx b/src/react/hoc/query-hoc.tsx index 144133494c6..cccabd9722f 100644 --- a/src/react/hoc/query-hoc.tsx +++ b/src/react/hoc/query-hoc.tsx @@ -60,9 +60,8 @@ export function withQuery< render() { let props = this.props; const shouldSkip = mapPropsToSkip(props); - const opts = shouldSkip - ? Object.create(null) - : { ...mapPropsToOptions(props) }; + const opts = + shouldSkip ? Object.create(null) : { ...mapPropsToOptions(props) }; if (!shouldSkip && !opts.variables && operation.variables.length > 0) { opts.variables = calculateVariablesFromProps(operation, props); diff --git a/src/react/hoc/subscription-hoc.tsx b/src/react/hoc/subscription-hoc.tsx index b044c1c2658..fd3d035599b 100644 --- a/src/react/hoc/subscription-hoc.tsx +++ b/src/react/hoc/subscription-hoc.tsx @@ -79,9 +79,8 @@ export function withSubscription< render() { let props = this.props; const shouldSkip = mapPropsToSkip(props); - const opts = shouldSkip - ? Object.create(null) - : mapPropsToOptions(props); + const opts = + shouldSkip ? Object.create(null) : mapPropsToOptions(props); if (!shouldSkip && !opts.variables && operation.variables.length > 0) { opts.variables = calculateVariablesFromProps(operation, props); diff --git a/src/react/hoc/withApollo.tsx b/src/react/hoc/withApollo.tsx index bfa21b454a4..3ec1e39ec29 100644 --- a/src/react/hoc/withApollo.tsx +++ b/src/react/hoc/withApollo.tsx @@ -49,9 +49,8 @@ export function withApollo( {(client) => { const props = Object.assign({}, this.props, { client, - ref: operationOptions.withRef - ? this.setWrappedInstance - : undefined, + ref: + operationOptions.withRef ? this.setWrappedInstance : undefined, }); return ; }} diff --git a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx index 131364939cd..32bd0edcdc0 100644 --- a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx +++ b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx @@ -131,7 +131,9 @@ function renderIntegrationTest({ }> - {variables ? : } + {variables ? + + : } @@ -154,17 +156,15 @@ interface VariablesCaseVariables { } function useVariablesIntegrationTestCase() { - const query: TypedDocumentNode< - VariablesCaseData, - VariablesCaseVariables - > = gql` - query CharacterQuery($id: ID!) { - character(id: $id) { - id - name + const query: TypedDocumentNode = + gql` + query CharacterQuery($id: ID!) { + character(id: $id) { + id + name + } } - } - `; + `; const CHARACTERS = ["Spider-Man", "Black Widow", "Iron Man", "Hulk"]; let mocks = [...CHARACTERS].map((name, index) => ({ request: { query, variables: { id: String(index + 1) } }, @@ -208,11 +208,11 @@ function renderVariablesIntegrationTest({ character: { ...result.data.character, name: - index > 3 - ? index > 7 - ? `${result.data.character.name} (updated again)` - : `${result.data.character.name} (updated)` - : result.data.character.name, + index > 3 ? + index > 7 ? + `${result.data.character.name} (updated again)` + : `${result.data.character.name} (updated)` + : result.data.character.name, }, }, }, @@ -274,7 +274,9 @@ function renderVariablesIntegrationTest({ return (
- {error ?
{error.message}
: null} + {error ? +
{error.message}
+ : null}