diff --git a/.api-reports/api-report-cache.md b/.api-reports/api-report-cache.md index 2efb3c2ed67..50588f8f4c0 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 = { @@ -197,7 +195,7 @@ export const cacheSlot: { withValue(value: ApolloCache, callback: (this: TThis, ...args: TArgs) => TResult, args?: TArgs | undefined, thisArg?: TThis | undefined): TResult; }; -// @public (undocumented) +// @public export const canonicalStringify: ((value: any) => string) & { reset(): void; }; @@ -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; } @@ -354,13 +332,10 @@ export abstract class EntityStore implements NormalizedCache { has(dataId: string): boolean; // (undocumented) protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; - // (undocumented) makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; - // (undocumented) makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined, canonizeResults: boolean): object; - // (undocumented) makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; - // (undocumented) + // @deprecated (undocumented) makeCacheKey(...args: any[]): object; // (undocumented) merge(older: string | StoreObject, newer: StoreObject | string): void; @@ -478,7 +453,7 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -714,7 +689,7 @@ export type Modifiers = Record> = [FieldName in keyof T]: Modifier>>; }>; -// @public (undocumented) +// @public export interface NormalizedCache { // (undocumented) canRead: CanReadFunction; @@ -740,17 +715,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; @@ -964,7 +936,7 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:92:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161: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 3e691e065d6..ecbbbe9959d 100644 --- a/.api-reports/api-report-core.md +++ b/.api-reports/api-report-core.md @@ -43,7 +43,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[]; @@ -65,7 +64,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; @@ -85,18 +83,18 @@ 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) get defaultContext(): Partial; @@ -104,81 +102,67 @@ export class ApolloClient implements DataProxy { 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 { @@ -273,7 +257,7 @@ export type ApolloReducerConfig = { addTypename?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -451,7 +435,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; @@ -471,40 +455,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) @@ -518,11 +489,8 @@ export namespace DataProxy { } // (undocumented) export interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // (undocumented) @@ -530,15 +498,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; } @@ -600,7 +564,6 @@ export class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -669,13 +632,10 @@ abstract class EntityStore implements NormalizedCache { has(dataId: string): boolean; // (undocumented) protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; - // (undocumented) makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; - // (undocumented) makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined, canonizeResults: boolean): object; - // (undocumented) makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; - // (undocumented) + // @deprecated (undocumented) makeCacheKey(...args: any[]): object; // (undocumented) merge(older: string | StoreObject, newer: StoreObject | string): void; @@ -725,7 +685,7 @@ namespace EntityStore { } } -// @public (undocumented) +// @public export type ErrorPolicy = "none" | "ignore" | "all"; // @public (undocumented) @@ -797,7 +757,7 @@ export interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // @public (undocumented) @@ -872,7 +832,7 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -945,25 +905,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; } @@ -1110,7 +1060,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) @@ -1303,23 +1253,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; } @@ -1330,11 +1271,8 @@ export type MutationFetchPolicy = Extract = ApolloCache> extends MutationBaseOptions { - // (undocumented) fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1375,21 +1313,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 } @@ -1411,7 +1342,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; @@ -1437,17 +1368,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; @@ -1491,7 +1419,6 @@ export class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1511,7 +1438,6 @@ export class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1795,7 +1721,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1807,27 +1732,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 } @@ -2053,15 +1968,10 @@ export type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -2149,18 +2059,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) @@ -2200,13 +2114,13 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:92:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161: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:120:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:154:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:394: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/QueryManager.ts:395: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 // (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 0081bc227be..4ea94f13b7b 100644 --- a/.api-reports/api-report-link_batch-http.md +++ b/.api-reports/api-report-link_batch-http.md @@ -59,7 +59,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) @@ -70,17 +70,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; } } @@ -160,29 +154,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 36cd6e1d814..3849a3649df 100644 --- a/.api-reports/api-report-link_http.md +++ b/.api-reports/api-report-link_http.md @@ -71,7 +71,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; @@ -184,25 +184,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 4b531996957..8ed6f581504 100644 --- a/.api-reports/api-report-react.md +++ b/.api-reports/api-report-react.md @@ -38,7 +38,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[]; @@ -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,24 +86,25 @@ 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) get defaultContext(): Partial; @@ -114,16 +113,10 @@ class ApolloClient implements DataProxy { // (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,36 +158,43 @@ 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 // @@ -338,7 +320,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -356,7 +338,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); @@ -571,44 +553,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 @@ -628,11 +597,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 @@ -642,15 +608,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; } @@ -662,7 +624,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 // @@ -721,7 +683,6 @@ class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -751,7 +712,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 @@ -817,7 +778,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 @@ -840,7 +801,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1001,7 +962,7 @@ export interface LazyQueryHookExecOptions extends Omit, "skip"> { } -// @public (undocumented) +// @public @deprecated (undocumented) export type LazyQueryResult = QueryResult; // @public (undocumented) @@ -1015,25 +976,18 @@ export type LoadableQueryHookFetchPolicy = Extract; - // (undocumented) context?: Context; // 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; - // (undocumented) fetchPolicy?: LoadableQueryHookFetchPolicy; - // (undocumented) queryKey?: string | number | any[]; // 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; - // (undocumented) returnPartialData?: boolean; } @@ -1139,29 +1093,20 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; - // (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; } @@ -1192,12 +1137,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; } @@ -1255,21 +1197,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 } @@ -1291,7 +1226,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) @@ -1326,7 +1261,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1346,7 +1280,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1383,7 +1316,7 @@ export interface OnDataOptions { data: SubscriptionResult; } -// @public (undocumented) +// @public type OnlyRequiredProperties = { [K in keyof T as {} extends Pick ? never : K]: T[K]; }; @@ -1534,7 +1467,7 @@ interface QueryKey { __queryKey?: string; } -// @public (undocumented) +// @public @deprecated (undocumented) export interface QueryLazyOptions { // (undocumented) context?: Context; @@ -1658,7 +1591,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1670,31 +1602,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 // @@ -1725,7 +1651,7 @@ export interface QueryResult; -// @public (undocumented) +// @public @deprecated (undocumented) export type QueryTuple = LazyQueryResultTuple; // @public (undocumented) @@ -1838,7 +1764,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) @@ -1945,15 +1871,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; } @@ -1978,7 +1901,7 @@ export interface SuspenseQueryHookOptions(queryRef: QueryReference): UseReadQue // @public (undocumented) export interface UseReadQueryResult { - // (undocumented) data: TData; - // (undocumented) error: ApolloError | undefined; - // (undocumented) networkStatus: NetworkStatus; } @@ -2260,18 +2180,26 @@ 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); - // (undocumented) + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; + // 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: @@ -2282,22 +2210,21 @@ 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,24 +86,25 @@ 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) get defaultContext(): Partial; @@ -114,16 +113,10 @@ class ApolloClient implements DataProxy { // (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,36 +159,43 @@ 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 { @@ -303,7 +285,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -354,11 +336,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); @@ -515,44 +497,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 @@ -572,11 +541,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 @@ -586,15 +552,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 +597,6 @@ class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -654,7 +615,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 @@ -707,7 +668,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 @@ -730,7 +691,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -931,31 +892,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; } @@ -991,12 +942,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; } @@ -1048,21 +996,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 } @@ -1120,7 +1061,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1140,7 +1080,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1418,7 +1357,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1430,27 +1368,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; } @@ -1643,15 +1573,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; } @@ -1720,20 +1647,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: @@ -1744,19 +1678,18 @@ 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[]; @@ -65,7 +64,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; @@ -87,24 +85,25 @@ 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) get defaultContext(): Partial; @@ -113,16 +112,10 @@ class ApolloClient implements DataProxy { // (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,36 +158,43 @@ 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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: ReactTypes.FC; @@ -334,7 +316,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -498,44 +480,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 @@ -555,11 +524,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 @@ -569,15 +535,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; } @@ -618,7 +580,6 @@ class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -637,7 +598,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 @@ -690,7 +651,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 @@ -713,7 +674,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -902,31 +863,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; } @@ -940,12 +891,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; } @@ -981,21 +929,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 } @@ -1053,7 +994,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1073,7 +1013,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1326,7 +1265,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1338,27 +1276,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; } @@ -1476,7 +1406,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) @@ -1551,15 +1481,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; } @@ -1616,20 +1543,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: @@ -1640,19 +1574,18 @@ 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[]; @@ -65,7 +64,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; @@ -87,24 +85,25 @@ 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) get defaultContext(): Partial; @@ -113,16 +112,10 @@ class ApolloClient implements DataProxy { // (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,36 +158,43 @@ 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 +284,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -497,44 +479,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 +523,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 +534,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; } @@ -620,7 +582,6 @@ class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -639,7 +600,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 @@ -701,7 +662,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 @@ -724,7 +685,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -925,31 +886,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; } @@ -976,12 +927,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; } @@ -1033,21 +981,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 } @@ -1105,7 +1046,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1125,7 +1065,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1395,7 +1334,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1407,27 +1345,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; } @@ -1573,15 +1503,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; } @@ -1644,20 +1571,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) @@ -1685,19 +1619,18 @@ 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[]; @@ -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,24 +84,25 @@ 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) get defaultContext(): Partial; @@ -112,16 +111,10 @@ class ApolloClient implements DataProxy { // (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,36 +157,43 @@ 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 { @@ -301,7 +283,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -323,7 +305,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); @@ -538,44 +520,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 @@ -595,11 +564,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 @@ -609,15 +575,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; } @@ -629,7 +591,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 // @@ -692,7 +654,6 @@ class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -711,7 +672,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 @@ -777,7 +738,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 @@ -800,7 +761,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -966,27 +927,19 @@ type LoadableQueryHookFetchPolicy = Extract; - // (undocumented) context?: DefaultContext; // 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 "LoadableQueryHookFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) fetchPolicy?: LoadableQueryHookFetchPolicy; - // (undocumented) queryKey?: string | number | any[]; // 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; - // (undocumented) returnPartialData?: boolean; } @@ -1092,29 +1045,20 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; - // (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; } @@ -1138,12 +1082,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; } @@ -1204,21 +1145,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 } @@ -1240,7 +1174,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) @@ -1275,7 +1209,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1295,7 +1228,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1334,7 +1266,7 @@ interface OnDataOptions { data: SubscriptionResult; } -// @public (undocumented) +// @public type OnlyRequiredProperties = { [K in keyof T as {} extends Pick ? never : K]: T[K]; }; @@ -1577,7 +1509,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1589,31 +1520,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 // @@ -1823,15 +1748,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; } @@ -1858,7 +1780,7 @@ interface SuspenseQueryHookOptions(queryRef: QueryReference): UseReadQue // @public (undocumented) export interface UseReadQueryResult { - // (undocumented) data: TData; - // (undocumented) error: ApolloError | undefined; - // (undocumented) networkStatus: NetworkStatus; } @@ -2152,18 +2071,26 @@ 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); - // (undocumented) + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; + // 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: @@ -2174,22 +2101,21 @@ 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[]; @@ -65,7 +64,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; @@ -87,24 +85,25 @@ 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) get defaultContext(): Partial; @@ -113,16 +112,10 @@ class ApolloClient implements DataProxy { // (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,36 +158,43 @@ 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 +284,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -468,44 +450,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 +494,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 +505,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; } @@ -588,7 +550,6 @@ class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -607,7 +568,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 @@ -660,7 +621,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 @@ -683,7 +644,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -888,31 +849,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; } @@ -926,12 +877,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; } @@ -967,21 +915,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 } @@ -1039,7 +980,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1059,7 +999,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1312,7 +1251,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1324,27 +1262,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; } @@ -1537,15 +1467,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; } @@ -1602,20 +1529,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: @@ -1626,19 +1560,18 @@ 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[]; @@ -65,7 +64,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; @@ -87,24 +85,25 @@ 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) get defaultContext(): Partial; @@ -113,16 +112,10 @@ class ApolloClient implements DataProxy { // (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,36 +158,43 @@ 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 +284,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -462,44 +444,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 @@ -519,11 +488,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 @@ -533,15 +499,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; } @@ -582,7 +544,6 @@ class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -601,7 +562,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 @@ -654,7 +615,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 @@ -677,7 +638,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -872,7 +833,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 // @@ -1003,31 +963,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; } @@ -1041,12 +991,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; } @@ -1082,21 +1029,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 } @@ -1120,7 +1060,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; @@ -1164,7 +1104,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1184,7 +1123,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1398,7 +1336,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1410,27 +1347,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; } @@ -1582,15 +1511,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; } @@ -1656,29 +1582,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: @@ -1689,19 +1622,18 @@ 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 // src/core/QueryManager.ts:120:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:154:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:394: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/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts -// src/utilities/graphql/DocumentTransform.ts:130:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:395: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:129: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 0cadba43966..54169c324b6 100644 --- a/.api-reports/api-report-testing_core.md +++ b/.api-reports/api-report-testing_core.md @@ -36,7 +36,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[]; @@ -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,24 +84,25 @@ 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) get defaultContext(): Partial; @@ -112,16 +111,10 @@ class ApolloClient implements DataProxy { // (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,36 +157,43 @@ 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 { @@ -301,7 +283,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -461,44 +443,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 @@ -518,11 +487,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 @@ -532,15 +498,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; } @@ -581,7 +543,6 @@ class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -600,7 +561,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 @@ -653,7 +614,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 @@ -676,7 +637,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -957,31 +918,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; } @@ -995,12 +946,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; } @@ -1036,21 +984,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 } @@ -1074,7 +1015,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; @@ -1118,7 +1059,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1138,7 +1078,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1354,7 +1293,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1366,27 +1304,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; } @@ -1538,15 +1468,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; } @@ -1612,29 +1539,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: @@ -1645,19 +1579,18 @@ 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 // src/core/QueryManager.ts:120:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:154:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:394: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/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts -// src/utilities/graphql/DocumentTransform.ts:130:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:395: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:129: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 59c8e4d8380..0f3236d629d 100644 --- a/.api-reports/api-report-utilities.md +++ b/.api-reports/api-report-utilities.md @@ -52,7 +52,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[]; @@ -78,7 +77,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; @@ -98,24 +96,25 @@ 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) get defaultContext(): Partial; @@ -123,15 +122,10 @@ class ApolloClient implements DataProxy { 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 // @@ -140,48 +134,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 // @@ -192,36 +168,43 @@ 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 { @@ -331,7 +314,7 @@ type ApolloReducerConfig = { // @public (undocumented) export function argumentsObjectFromField(field: FieldNode | DirectiveNode, variables?: Record): Object | null; -// @public (undocumented) +// @public export type AsStoreObject = { @@ -471,7 +454,7 @@ const enum CacheWriteBehavior { OVERWRITE = 1 } -// @public (undocumented) +// @public export const canonicalStringify: ((value: any) => string) & { reset(): void; }; @@ -500,10 +483,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) @@ -562,44 +545,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 @@ -619,11 +589,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 @@ -633,15 +600,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; } @@ -682,7 +645,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>; @@ -727,7 +690,7 @@ interface DeleteModifier { // @public (undocumented) const _deleteModifier: unique symbol; -// @public (undocumented) +// @public @deprecated (undocumented) export const DEV: boolean; // @public (undocumented) @@ -758,7 +721,6 @@ export class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -826,13 +788,10 @@ abstract class EntityStore implements NormalizedCache { has(dataId: string): boolean; // (undocumented) protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; - // (undocumented) makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; - // (undocumented) makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined, canonizeResults: boolean): object; - // (undocumented) makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; - // (undocumented) + // @deprecated (undocumented) makeCacheKey(...args: any[]): object; // (undocumented) merge(older: string | StoreObject, newer: StoreObject | string): void; @@ -882,7 +841,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 @@ -935,7 +894,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // @public (undocumented) @@ -1015,7 +974,7 @@ export function fixObservableSubclass Observab // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public export interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1065,7 +1024,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) @@ -1077,7 +1036,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) @@ -1558,31 +1517,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; } @@ -1596,12 +1545,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; } @@ -1637,21 +1583,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 } @@ -1675,7 +1614,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; @@ -1701,17 +1640,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; @@ -1757,7 +1693,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1775,7 +1710,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1803,7 +1737,7 @@ export function offsetLimitPagination(keyArgs?: KeyArgs): FieldPo // @public (undocumented) export function omitDeep(value: T, key: K): DeepOmit; -// @public (undocumented) +// @public export type OnlyRequiredProperties = { [K in keyof T as {} extends Pick ? never : K]: T[K]; }; @@ -2077,7 +2011,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -2089,27 +2022,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; } @@ -2359,15 +2284,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; } @@ -2478,20 +2400,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) @@ -2535,20 +2464,19 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "FieldReadFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:163: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 // src/core/QueryManager.ts:120:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:154:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:394: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/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:395: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:226:12 - (ae-forgotten-export) The symbol "storeKeyNameStringify" 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 1b63551c899..7870c7a3c27 100644 --- a/.api-reports/api-report.md +++ b/.api-reports/api-report.md @@ -45,7 +45,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[]; @@ -67,7 +66,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; @@ -87,18 +85,18 @@ 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) get defaultContext(): Partial; @@ -106,81 +104,67 @@ export class ApolloClient implements DataProxy { 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; + // (undocumented) + defaultContext?: Partial; + 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; - defaultContext?: Partial; - 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 // @@ -309,7 +293,7 @@ export type ApolloReducerConfig = { addTypename?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -325,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); @@ -558,7 +542,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; @@ -578,40 +562,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) @@ -625,11 +596,8 @@ export namespace DataProxy { } // (undocumented) export interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // (undocumented) @@ -637,15 +605,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; } @@ -657,7 +621,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 // @@ -743,7 +707,6 @@ export class DocumentTransform { } | undefined; // (undocumented) static identity(): DocumentTransform; - // (undocumented) resetCache(): void; // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform; @@ -823,13 +786,10 @@ abstract class EntityStore implements NormalizedCache { has(dataId: string): boolean; // (undocumented) protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; - // (undocumented) makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; - // (undocumented) makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined, canonizeResults: boolean): object; - // (undocumented) makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; - // (undocumented) + // @deprecated (undocumented) makeCacheKey(...args: any[]): object; // (undocumented) merge(older: string | StoreObject, newer: StoreObject | string): void; @@ -879,7 +839,7 @@ namespace EntityStore { } } -// @public (undocumented) +// @public export type ErrorPolicy = "none" | "ignore" | "all"; // @public (undocumented) @@ -962,7 +922,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 +997,7 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1113,25 +1073,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 +1284,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 +1356,7 @@ export interface LazyQueryHookExecOptions extends Omit, "skip"> { } -// @public (undocumented) +// @public @deprecated (undocumented) export type LazyQueryResult = QueryResult; // @public (undocumented) @@ -1420,21 +1370,13 @@ export type LoadableQueryHookFetchPolicy = Extract; - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: LoadableQueryHookFetchPolicy; - // (undocumented) queryKey?: string | number | any[]; - // (undocumented) refetchWritePolicy?: RefetchWritePolicy; - // (undocumented) returnPartialData?: boolean; } @@ -1577,23 +1519,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; } @@ -1623,11 +1556,8 @@ export interface MutationHookOptions = ApolloCache> extends MutationBaseOptions { - // (undocumented) fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1690,21 +1620,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 } @@ -1726,10 +1649,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; @@ -1755,17 +1678,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; @@ -1809,7 +1729,6 @@ export class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1829,7 +1748,6 @@ export class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1868,7 +1786,7 @@ export interface OnDataOptions { data: SubscriptionResult; } -// @public (undocumented) +// @public type OnlyRequiredProperties = { [K in keyof T as {} extends Pick ? never : K]: T[K]; }; @@ -2090,7 +2008,7 @@ interface QueryKey { __queryKey?: string; } -// @public (undocumented) +// @public @deprecated (undocumented) export interface QueryLazyOptions { // (undocumented) context?: DefaultContext; @@ -2209,7 +2127,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -2221,33 +2138,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 // @@ -2278,7 +2187,7 @@ export interface QueryResult; -// @public (undocumented) +// @public @deprecated (undocumented) export type QueryTuple = LazyQueryResultTuple; // @public (undocumented) @@ -2405,7 +2314,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 } @@ -2559,15 +2468,10 @@ export interface SubscriptionHookOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -2592,7 +2496,7 @@ export interface SuspenseQueryHookOptions(queryRef: QueryReference): UseReadQue // @public (undocumented) export interface UseReadQueryResult { - // (undocumented) data: TData; - // (undocumented) error: ApolloError | undefined; - // (undocumented) networkStatus: NetworkStatus; } @@ -2903,18 +2804,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) @@ -2954,13 +2859,13 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:92:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161: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:120:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:154:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:394: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/QueryManager.ts:395: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 // 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/.changeset/chatty-plants-cheer.md b/.changeset/chatty-plants-cheer.md deleted file mode 100644 index 79cd7b9cd19..00000000000 --- a/.changeset/chatty-plants-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Enable `strict` in tsconfig for the entire project. diff --git a/.changeset/ninety-suits-flash.md b/.changeset/ninety-suits-flash.md deleted file mode 100644 index bba930c377e..00000000000 --- a/.changeset/ninety-suits-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Add missed reexports of MutationFetchPolicy and RefetchWritePolicy to @apollo/client/core diff --git a/.changeset/yellow-fans-move.md b/.changeset/yellow-fans-move.md deleted file mode 100644 index 936ec8a859c..00000000000 --- a/.changeset/yellow-fans-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -`useMutation`: also reset internal state on reset diff --git a/.circleci/config.yml b/.circleci/config.yml index 12aa71cf035..23aead0e9ae 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/.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 6faa1c00aca..a91cfa60a04 100644 --- a/.size-limit.cjs +++ b/.size-limit.cjs @@ -28,11 +28,15 @@ 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, ignore: [ ...(config.ignore || []), + "rehackt", "react", "react-dom", "@graphql-typed-document-node/core", @@ -52,21 +56,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 dbf215c6ea5..9d19488680a 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,4 +1,4 @@ { - "dist/apollo-client.min.cjs": 38675, - "import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32306 + "dist/apollo-client.min.cjs": 38646, + "import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32304 } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a4a642f012..43ee4c79a21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # @apollo/client + +## 3.8.8 + +### Patch Changes + +- [#11200](https://github.com/apollographql/apollo-client/pull/11200) [`ae5091a21`](https://github.com/apollographql/apollo-client/commit/ae5091a21f0feff1486503071ea8dc002cf1be41) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Enable `strict` in tsconfig for the entire project. + +- [#11332](https://github.com/apollographql/apollo-client/pull/11332) [`291aea56b`](https://github.com/apollographql/apollo-client/commit/291aea56bfaed3987a98be7fe4e6160114b62d2d) Thanks [@asvishnyakov](https://github.com/asvishnyakov)! - Add missed reexports of MutationFetchPolicy and RefetchWritePolicy to @apollo/client/core + +- [#10931](https://github.com/apollographql/apollo-client/pull/10931) [`e5acf910e`](https://github.com/apollographql/apollo-client/commit/e5acf910e39752b453540b6751046d1c19b66350) Thanks [@phryneas](https://github.com/phryneas)! - `useMutation`: also reset internal state on reset + ## 3.9.0-alpha.4 ### Minor Changes 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 ca389519e38..f50d25a875a 100644 --- a/config/apiExtractor.ts +++ b/config/apiExtractor.ts @@ -2,12 +2,37 @@ 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"; import { readFileSync } from "fs"; +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); @@ -16,6 +41,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("//", "/"); @@ -23,23 +50,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(/\//g, "_") : "" - }.md`, - }, - }, + const configObject: IConfigFile = { + ...(JSON.parse(JSON.stringify(baseConfig)) as IConfigFile), + mainEntryPointFilePath, + }; + + configObject.apiReport!.reportFileName = `api-report${ + path ? "-" + path.replace(/\//g, "_") : "" + }.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/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/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/docs/source/api/link/apollo-link-remove-typename.mdx b/docs/source/api/link/apollo-link-remove-typename.mdx index 2e190c5f302..201e18b48cd 100644 --- a/docs/source/api/link/apollo-link-remove-typename.mdx +++ b/docs/source/api/link/apollo-link-remove-typename.mdx @@ -6,13 +6,7 @@ minVersion: 3.8.0 ## Overview -When reusing data from a query as an argument to another GraphQL operation, `__typename` fields can cause errors. To avoid this, you can use the `removeTypenameFromVariables` link to automatically remove `__typename` fields from variables in operations. You can import and instantiate it like so: - -```ts -import { removeTypenameFromVariables } from '@apollo/client/link/remove-typename'; - -const removeTypenameLink = removeTypenameFromVariables(); -``` +When reusing data from a query as an argument to another GraphQL operation, `__typename` fields can cause errors. To avoid this, you can use the `removeTypenameFromVariables` link to automatically remove `__typename` fields from variables in operations. ## Remove `__typename` from all variables @@ -60,6 +54,60 @@ await client.mutate({ Without the use of the `removeTypenameFromVariables` link, the server will return an error because `data.dashboard` still contains the `__typename` field. +## Usage + +You can import and instantiate it like so: + +```ts +import { removeTypenameFromVariables } from '@apollo/client/link/remove-typename'; + +const removeTypenameLink = removeTypenameFromVariables(); +``` + +Include `removeTypeNameLink` anywhere in your [link chain](./introduction/#your-first-link-chain) before your [terminating link](./introduction#the-terminating-link) +to remove `__typename` fields from variables for all operations. + +```ts +import { from } from '@apollo/client'; + +const link = from([removeTypenameLink, httpLink]); + +const client = new ApolloClient({ + link, + // ... other options +}); +``` + +If you're using [directional composition](./link/introduction#directional-composition), +for example, to [send a subscription to a websocket connection](../data/subscriptions#3-split-communication-by-operation-recommended), +place `removeTypenameLink` before `splitLink` to remove `__typename` from variables for all operations. + +```ts +import { from, split } from '@apollo/client'; +import { removeTypenameFromVariables } from '@apollo/client/link/remove-typename'; + +const removeTypenameLink = removeTypenameFromVariables(); + +const splitLink = split( + ({ query }) => { + const definition = getMainDefinition(query); + return ( + definition.kind === 'OperationDefinition' && + definition.operation === 'subscription' + ); + }, + wsLink, + httpLink, +); + +const link = from([removeTypenameLink, splitLink]); + +const client = new ApolloClient({ + link, + // ... other options +}); +``` + ## Keep `__typename` in JSON scalars Sometimes, you may need to retain the `__typename` field from a query's response—for example, in the case of [JSON scalar](https://github.com/taion/graphql-type-json) input fields. @@ -194,4 +242,3 @@ Determines which input types should retain `__typename`. This maps the input typ - diff --git a/docs/source/data/operation-best-practices.mdx b/docs/source/data/operation-best-practices.mdx index 8a2c9e88254..d7b26dcd3f6 100644 --- a/docs/source/data/operation-best-practices.mdx +++ b/docs/source/data/operation-best-practices.mdx @@ -160,87 +160,6 @@ query GetGlobalStatus { * If you have collections of components that _are_ always rendered together, you can use fragments to distribute the structure of a single query between them. See [Colocating fragments](./fragments/#colocating-fragments). * If you're querying a list field that returns more items than your component needs to render, you should [paginate that field](../pagination/overview/). - - -## Use fragments to encapsulate related sets of fields - -[GraphQL fragments](./fragments/) are sets of fields you can share across multiple operations. Here's an example declaration: - -```graphql -# Recommended ✅ -fragment NameParts on Person { - title - firstName - middleName - lastName -} -``` - -It's likely that multiple queries in an app require a person's full name. This `NameParts` fragment helps keep those queries consistent, readable, and short: - -```graphql -# Recommended ✅ -query GetAttendees($eventId: ID!) { - attendees(id: $eventId) { - id - rsvp - ...NameParts # Include all fields from the NameParts fragment - } -} -``` - -### Avoid excessive or illogical fragments - -If you use _too many_ fragments, your queries might become _less_ readable: - - - -```graphql -# Use caution ⚠️ -query GetAttendees($eventId: ID!) { - attendees(id: $eventId) { - id - rsvp - ...NameParts - profile { - ...VisibilitySettings - events { - ...EventSummary - } - avatar { - ...ImageDetails - } - } - } -} - -``` - - - -Additionally, only define fragments for sets of fields that share a logical semantic relationship. _Don't_ create a fragment just because multiple queries happen to share certain fields: - -```graphql -# Recommended ✅ -fragment NameParts on Person { - title - firstName - middleName - lastName -} - -# Not recommended ❌ -fragment SharedFields on Country { - population - neighboringCountries { - capital - rivers { - name - } - } -} -``` - ## Query global data and user-specific data separately Some fields return the exact same data regardless of which user queries them: 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/browser-esm/html/jspm-prepared.html b/integration-tests/browser-esm/html/jspm-prepared.html index 7395ff614af..88dd8e6a545 100644 --- a/integration-tests/browser-esm/html/jspm-prepared.html +++ b/integration-tests/browser-esm/html/jspm-prepared.html @@ -8,12 +8,11 @@ }, "scopes": { "https://ga.jspm.io/": { - "@wry/context": "https://ga.jspm.io/npm:@wry/context@0.7.3/lib/index.js", "@wry/equality": "https://ga.jspm.io/npm:@wry/equality@0.5.6/lib/index.js", "@wry/trie": "https://ga.jspm.io/npm:@wry/trie@0.4.3/lib/index.js", "graphql": "https://ga.jspm.io/npm:graphql@16.6.0/index.mjs", "graphql-tag": "https://ga.jspm.io/npm:graphql-tag@2.12.6/lib/index.js", - "optimism": "https://ga.jspm.io/npm:optimism@0.17.5/lib/index.js", + "optimism": "https://ga.jspm.io/npm:optimism@0.18.0/lib/index.js", "react": "https://ga.jspm.io/npm:react@18.2.0/dev.index.js", "symbol-observable": "https://ga.jspm.io/npm:symbol-observable@4.0.0/lib/index.js", "ts-invariant": "https://ga.jspm.io/npm:ts-invariant@0.10.3/lib/invariant.js", diff --git a/integration-tests/browser-esm/html/unpkg-unmangled.html b/integration-tests/browser-esm/html/unpkg-unmangled.html index 0e7de49a86b..535ed1282fe 100644 --- a/integration-tests/browser-esm/html/unpkg-unmangled.html +++ b/integration-tests/browser-esm/html/unpkg-unmangled.html @@ -5,12 +5,11 @@ { "imports": { "@apollo/client": "https://unpkg.com/@apollo/client@0.0.0-pr-10915-20230616125401/index.js", - "@wry/context": "https://unpkg.com/@wry/context@0.7.3/lib/index.js", "@wry/equality": "https://unpkg.com/@wry/equality@0.5.6/lib/index.js", "@wry/trie": "https://unpkg.com/@wry/trie@0.4.3/lib/index.js", "graphql": "https://unpkg.com/graphql@16.6.0/index.mjs", "graphql-tag": "https://unpkg.com/graphql-tag@2.12.6/lib/index.js", - "optimism": "https://unpkg.com/optimism@0.17.5/lib/index.js", + "optimism": "https://unpkg.com/optimism@0.18.0/lib/index.js", "react": "https://ga.jspm.io/npm:react@18.2.0/dev.index.js", "symbol-observable": "https://ga.jspm.io/npm:symbol-observable@4.0.0/lib/index.js", "ts-invariant": "https://unpkg.com/ts-invariant@0.10.3/lib/invariant.js", 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/netlify.toml b/netlify.toml index 6e8d1ace9c9..67879a8b0ba 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] publish = "docs/public" - command = "npm run typedoc" + command = "npm run typedoc; npm run docmodel > docs/public/log.txt || true" [build.environment] NODE_VERSION = "18" @@ -9,6 +9,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 e879e9a11bd..89aece1b1a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,12 +12,11 @@ "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@wry/caches": "^1.0.0", - "@wry/context": "^0.7.3", "@wry/equality": "^0.5.6", "@wry/trie": "^0.5.0", "graphql-tag": "^2.12.6", "hoist-non-react-statics": "^3.3.2", - "optimism": "^0.17.5", + "optimism": "^0.18.0", "prop-types": "^15.7.2", "rehackt": "0.0.3", "response-iterator": "^0.2.6", @@ -27,46 +26,46 @@ "zen-observable-ts": "^1.2.5" }, "devDependencies": { - "@arethetypeswrong/cli": "0.12.2", - "@babel/parser": "7.23.0", + "@arethetypeswrong/cli": "0.13.2", + "@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", - "@testing-library/jest-dom": "5.17.0", - "@testing-library/react": "14.0.0", + "@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.1.2", "@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/node": "20.8.10", - "@types/node-fetch": "2.6.8", - "@types/react": "18.2.35", - "@types/react-dom": "18.2.14", + "@types/hoist-non-react-statics": "3.3.5", + "@types/jest": "29.5.10", + "@types/lodash": "4.14.202", + "@types/node": "20.10.0", + "@types/node-fetch": "2.6.9", + "@types/react": "18.2.38", + "@types/react-dom": "18.2.17", "@types/relay-runtime": "14.1.14", - "@types/use-sync-external-store": "0.0.5", - "@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", + "@types/use-sync-external-store": "0.0.6", + "@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": "3.1.8", - "eslint": "8.51.0", + "cross-fetch": "4.0.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.0", - "eslint-plugin-testing-library": "5.11.1", + "eslint-plugin-local-rules": "2.0.1", + "eslint-plugin-testing-library": "6.2.0", "expect-type": "0.17.3", "fetch-mock": "9.11.0", "glob": "8.1.0", @@ -76,28 +75,30 @@ "jest-environment-jsdom": "29.7.0", "jest-junit": "16.0.0", "lodash": "4.17.21", - "patch-package": "7.0.2", - "prettier": "3.0.3", + "patch-package": "8.0.0", + "prettier": "3.1.0", "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", "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", + "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" @@ -137,9 +138,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.2", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz", + "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==", "dev": true }, "node_modules/@andrewbranch/untar.js": { @@ -149,22 +150,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": { @@ -177,9 +180,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" @@ -204,17 +207,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": { @@ -538,9 +543,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" @@ -1294,10 +1299,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" ], @@ -1310,6 +1363,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", @@ -1335,9 +1676,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", @@ -1364,9 +1705,9 @@ "dev": true }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1403,21 +1744,21 @@ } }, "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" } }, "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": { @@ -1428,13 +1769,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" }, @@ -1446,12 +1787,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": { @@ -1470,12 +1813,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" }, @@ -1497,9 +1840,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": { @@ -2114,9 +2457,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", @@ -2360,6 +2703,30 @@ "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", + "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", @@ -2379,96 +2746,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": { @@ -2491,14 +2841,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", @@ -2507,9 +2856,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": { @@ -2559,9 +2928,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", @@ -2662,6 +3031,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", @@ -2746,15 +3166,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": { @@ -2777,9 +3197,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": "*", @@ -2820,9 +3240,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", @@ -2885,9 +3305,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": { @@ -2903,18 +3323,18 @@ "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" } }, "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": "*", @@ -2934,9 +3354,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": "*", @@ -2945,9 +3365,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": "*" @@ -2986,15 +3406,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", @@ -3002,9 +3413,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": { @@ -3023,16 +3434,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", @@ -3073,15 +3484,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": { @@ -3101,13 +3512,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" @@ -3140,13 +3551,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" @@ -3157,13 +3568,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" }, @@ -3184,9 +3595,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" @@ -3197,13 +3608,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", @@ -3239,17 +3650,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": { @@ -3279,12 +3690,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": { @@ -3295,6 +3706,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/caches": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@wry/caches/-/caches-1.0.0.tgz", @@ -3352,9 +3769,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" @@ -3799,6 +4216,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", @@ -3814,6 +4240,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", @@ -3923,9 +4361,9 @@ } }, "node_modules/builtins/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -3937,6 +4375,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", @@ -3956,13 +4409,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" @@ -4186,6 +4640,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", @@ -4288,14 +4748,26 @@ "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" } }, + "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", @@ -4525,6 +4997,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", @@ -4537,13 +5153,30 @@ "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": "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": { @@ -4664,7 +5297,16 @@ "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", "dev": true, "engines": { - "node": ">=10" + "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": { @@ -4697,6 +5339,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", @@ -4814,9 +5462,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": { @@ -4826,34 +5474,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", @@ -4866,6 +5514,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", @@ -4924,18 +5581,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", @@ -5102,15 +5760,15 @@ } }, "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": { - "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" @@ -5649,9 +6307,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", @@ -5727,15 +6385,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", @@ -5938,10 +6587,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", @@ -5989,14 +6641,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" @@ -6254,6 +6907,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", @@ -6281,6 +6946,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", @@ -6659,6 +7336,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", @@ -6881,6 +7591,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", @@ -7993,6 +8709,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", @@ -8136,6 +8866,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", @@ -8169,6 +8917,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", @@ -8349,6 +9106,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", @@ -8419,23 +9185,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": { @@ -8454,9 +9220,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" @@ -8466,9 +9232,9 @@ } }, "node_modules/marked-terminal/node_modules/type-fest": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.12.0.tgz", - "integrity": "sha512-qj9wWsnFvVEMUDbESiilKeXeHL7FwwiFcogfhfyjmvT968RXSvnl23f1JOClTHYItsi7o501C/7qVllscUP3oA==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", "dev": true, "engines": { "node": ">=14.16" @@ -8666,9 +9432,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": [ { @@ -8677,10 +9443,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": { @@ -8699,12 +9465,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": { @@ -8944,10 +9716,11 @@ } }, "node_modules/optimism": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.17.5.tgz", - "integrity": "sha512-TEcp8ZwK1RczmvMnvktxHSF2tKgMWjJ71xEFGX5ApLh67VsMSTy1ZUlipJw8W+KaqgOmQ+4pqwkeivY89j+4Vw==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.18.0.tgz", + "integrity": "sha512-tGn8+REwLRNFnb9WmcY5IfpOqeX2kpaYJ1s6Ae3mn12AeydLkR3j+jSCmVQFoXqU8D41PAJ1RG1rCRNWmNZVmQ==", "dependencies": { + "@wry/caches": "^1.0.0", "@wry/context": "^0.7.0", "@wry/trie": "^0.4.3", "tslib": "^2.3.0" @@ -9096,9 +9869,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", @@ -9107,6 +9880,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", @@ -9216,6 +9990,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", @@ -9289,6 +10069,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", @@ -9423,9 +10212,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" @@ -9648,17 +10437,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" } @@ -10006,6 +10791,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", @@ -10035,6 +10836,36 @@ "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-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", @@ -10138,6 +10969,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", @@ -10198,14 +11044,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" @@ -10214,7 +11060,72 @@ "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/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", + "integrity": "sha512-pEjMUbwJ5Pl/6Vn6FsamXHXItJXSRftcibixDmNCWbWhic0hzHrwkMZo0IZ7fMRH9KxcWDFSkzhccB4285PutA==", + "dev": true, + "engines": { + "node": ">=4.2" } }, "node_modules/slash": { @@ -10364,6 +11275,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", @@ -10686,16 +11604,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": { @@ -10746,9 +11664,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", @@ -10803,6 +11721,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", @@ -10974,6 +11904,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", @@ -11194,9 +12134,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", @@ -11227,6 +12167,27 @@ "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", + "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", @@ -11236,6 +12197,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 f857236fb70..3b7a04bb141 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": "npm run build && ts-node-script config/apiExtractor.ts", + "extract-api": "npm run build && 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": "node --expose-gc ./node_modules/jest/bin/jest.js --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", @@ -91,12 +93,11 @@ "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@wry/caches": "^1.0.0", - "@wry/context": "^0.7.3", "@wry/equality": "^0.5.6", "@wry/trie": "^0.5.0", "graphql-tag": "^2.12.6", "hoist-non-react-statics": "^3.3.2", - "optimism": "^0.17.5", + "optimism": "^0.18.0", "prop-types": "^15.7.2", "rehackt": "0.0.3", "response-iterator": "^0.2.6", @@ -106,46 +107,46 @@ "zen-observable-ts": "^1.2.5" }, "devDependencies": { - "@arethetypeswrong/cli": "0.12.2", - "@babel/parser": "7.23.0", + "@arethetypeswrong/cli": "0.13.2", + "@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", - "@testing-library/jest-dom": "5.17.0", - "@testing-library/react": "14.0.0", + "@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.1.2", "@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/node": "20.8.10", - "@types/node-fetch": "2.6.8", - "@types/react": "18.2.35", - "@types/react-dom": "18.2.14", + "@types/hoist-non-react-statics": "3.3.5", + "@types/jest": "29.5.10", + "@types/lodash": "4.14.202", + "@types/node": "20.10.0", + "@types/node-fetch": "2.6.9", + "@types/react": "18.2.38", + "@types/react-dom": "18.2.17", "@types/relay-runtime": "14.1.14", - "@types/use-sync-external-store": "0.0.5", - "@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", + "@types/use-sync-external-store": "0.0.6", + "@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": "3.1.8", - "eslint": "8.51.0", + "cross-fetch": "4.0.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.0", - "eslint-plugin-testing-library": "5.11.1", + "eslint-plugin-local-rules": "2.0.1", + "eslint-plugin-testing-library": "6.2.0", "expect-type": "0.17.3", "fetch-mock": "9.11.0", "glob": "8.1.0", @@ -155,33 +156,45 @@ "jest-environment-jsdom": "29.7.0", "jest-junit": "16.0.0", "lodash": "4.17.21", - "patch-package": "7.0.2", - "prettier": "3.0.3", + "patch-package": "8.0.0", + "prettier": "3.1.0", "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", "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", + "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" }, "publishConfig": { "access": "public" - } + }, + "files": [ + "LICENSE", + "**/*.md", + "**/*.cjs", + "**/*.cjs.map", + "**/*.js", + "**/*.js.map", + "**/*.d.ts", + "**/*.json" + ] } 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 2dffa982b1c..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)), @@ -126,11 +124,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/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 4520d9740da..c0582843fdc 100644 --- a/src/cache/inmemory/entityStore.ts +++ b/src/cache/inmemory/entityStore.ts @@ -222,12 +222,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; @@ -237,19 +237,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 { @@ -345,16 +345,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; @@ -556,17 +556,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"; }; @@ -811,8 +811,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 a14090acf1d..f00fed8767e 100644 --- a/src/cache/inmemory/inMemoryCache.ts +++ b/src/cache/inmemory/inMemoryCache.ts @@ -110,9 +110,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 @@ -226,8 +227,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 05067b74d46..e69a8b1bbeb 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 6918c7dd6aa..3c68f35eb9d 100644 --- a/src/cache/inmemory/policies.ts +++ b/src/cache/inmemory/policies.ts @@ -166,11 +166,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< @@ -445,17 +445,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 @@ -464,17 +461,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) => { @@ -489,17 +483,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; @@ -797,8 +788,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)); } @@ -811,8 +803,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; } @@ -850,9 +841,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/reactiveVars.ts b/src/cache/inmemory/reactiveVars.ts index bb7050f57ca..a0f662d9908 100644 --- a/src/cache/inmemory/reactiveVars.ts +++ b/src/cache/inmemory/reactiveVars.ts @@ -1,6 +1,5 @@ import type { OptimisticDependencyFunction } from "optimism"; -import { dep } from "optimism"; -import { Slot } from "@wry/context"; +import { dep, Slot } from "optimism"; import type { InMemoryCache } from "./inMemoryCache.js"; import type { ApolloCache } from "../../core/index.js"; diff --git a/src/cache/inmemory/readFromStore.ts b/src/cache/inmemory/readFromStore.ts index 35b9b1dce17..a280948b87e 100644 --- a/src/cache/inmemory/readFromStore.ts +++ b/src/cache/inmemory/readFromStore.ts @@ -232,9 +232,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, @@ -391,9 +388,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) }`, }); } @@ -451,11 +448,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/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/cache/inmemory/writeToStore.ts b/src/cache/inmemory/writeToStore.ts index 95057861b2f..246a18d5ade 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 e0486d941d8..050245e9d8b 100644 --- a/src/core/ApolloClient.ts +++ b/src/core/ApolloClient.ts @@ -43,26 +43,79 @@ 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; defaultContext?: Partial; + /** + * 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 @@ -73,7 +126,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. */ @@ -95,36 +148,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) { @@ -163,9 +208,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; @@ -211,8 +255,9 @@ export class ApolloClient implements DataProxy { }, localState: this.localState, assumeImmutableResults, - onBroadcast: connectToDevTools - ? () => { + onBroadcast: + connectToDevTools ? + () => { if (this.devToolsHookCb) { this.devToolsHookCb({ action: {}, @@ -342,10 +387,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. */ @@ -374,7 +419,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: @@ -412,7 +457,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( @@ -433,7 +478,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/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 bda85a543a7..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 ( @@ -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( @@ -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 @@ -614,9 +615,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( @@ -785,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); @@ -818,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), @@ -849,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 54a922704b7..02e1768af17 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(), } @@ -361,9 +362,8 @@ export class QueryInfo { ): typeof result { result = { ...result }; 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 3a94078f3da..84e01b89023 100644 --- a/src/core/QueryManager.ts +++ b/src/core/QueryManager.ts @@ -169,8 +169,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 @@ -366,11 +367,11 @@ export class QueryManager { self.broadcastQueries(); reject( - err instanceof ApolloError - ? err - : new ApolloError({ - networkError: err, - }) + err instanceof ApolloError ? err : ( + new ApolloError({ + networkError: err, + }) + ) ); }, }); @@ -608,9 +609,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 { @@ -930,9 +931,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 ); } @@ -1213,9 +1214,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) { @@ -1577,14 +1579,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 8a911fd72de..9a958b7ccd8 100644 --- a/src/core/__tests__/QueryManager/index.ts +++ b/src/core/__tests__/QueryManager/index.ts @@ -5738,9 +5738,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/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/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 49a7f3885b8..e0646a43431 100644 --- a/src/react/context/ApolloContext.ts +++ b/src/react/context/ApolloContext.ts @@ -14,9 +14,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(): ReactTypes.Context { invariant( 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__/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__/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({ 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 2b51ff97927..472cf783106 100644 --- a/src/react/hoc/mutation-hoc.tsx +++ b/src/react/hoc/mutation-hoc.tsx @@ -98,9 +98,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 5587ce83119..935645c5e44 100644 --- a/src/react/hoc/query-hoc.tsx +++ b/src/react/hoc/query-hoc.tsx @@ -61,9 +61,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 5bbea06bb3a..f3218a00a0e 100644 --- a/src/react/hoc/subscription-hoc.tsx +++ b/src/react/hoc/subscription-hoc.tsx @@ -80,9 +80,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 71b982a3cac..3b73c1f692d 100644 --- a/src/react/hoc/withApollo.tsx +++ b/src/react/hoc/withApollo.tsx @@ -52,9 +52,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}