Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tanstack/solid-query

Package Overview
Dependencies
Maintainers
2
Versions
303
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/solid-query - npm Package Compare versions

Comparing version 5.40.2 to 5.42.0

src/__tests__/createInfiniteQuery.test-d.tsx

5

build/dev.js

@@ -324,2 +324,5 @@ import { QueryClient as QueryClient$1, MutationObserver, replaceEqualDeep, QueriesObserver, hydrate, QueryObserver, InfiniteQueryObserver, notifyManager } from '@tanstack/query-core';

}
function infiniteQueryOptions(options) {
return options;
}
function createInfiniteQuery(options, queryClient) {

@@ -528,2 +531,2 @@ return createBaseQuery(

export { IsRestoringProvider, QueryClient, QueryClientContext, QueryClientProvider, createInfiniteQuery, createMutation, createQueries, createQuery, queryOptions, useIsFetching, useIsMutating, useIsRestoring, useMutationState, useQueryClient };
export { IsRestoringProvider, QueryClient, QueryClientContext, QueryClientProvider, createInfiniteQuery, createMutation, createQueries, createQuery, infiniteQueryOptions, queryOptions, useIsFetching, useIsMutating, useIsRestoring, useMutationState, useQueryClient };

22

build/index.d.ts

@@ -1,2 +0,2 @@

import { DefaultError, QueryKey, OmitKeyof, QueryObserverOptions as QueryObserverOptions$1, InfiniteQueryObserverOptions as InfiniteQueryObserverOptions$1, DefaultOptions as DefaultOptions$1, QueryClientConfig as QueryClientConfig$1, QueryClient as QueryClient$1, QueryObserverResult, DefinedQueryObserverResult, InfiniteQueryObserverResult, MutationObserverOptions, MutateFunction, MutationObserverResult, DataTag, QueryFilters, InfiniteData, MutationFilters, MutationState, Mutation, QueriesPlaceholderDataFunction, QueryFunction, ThrowOnError } from '@tanstack/query-core';
import { DefaultError, QueryKey, OmitKeyof, QueryObserverOptions as QueryObserverOptions$1, InfiniteQueryObserverOptions as InfiniteQueryObserverOptions$1, DefaultOptions as DefaultOptions$1, QueryClientConfig as QueryClientConfig$1, QueryClient as QueryClient$1, QueryObserverResult, DefinedQueryObserverResult, InfiniteQueryObserverResult, DefinedInfiniteQueryObserverResult, MutationObserverOptions, MutateFunction, MutationObserverResult, DataTag, QueryFilters, InfiniteData, MutationFilters, MutationState, Mutation, QueriesPlaceholderDataFunction, QueryFunction, ThrowOnError } from '@tanstack/query-core';
export * from '@tanstack/query-core';

@@ -75,2 +75,3 @@ import * as solid_js from 'solid-js';

type CreateInfiniteQueryResult<TData = unknown, TError = DefaultError> = InfiniteQueryObserverResult<TData, TError>;
type DefinedCreateInfiniteQueryResult<TData = unknown, TError = DefaultError> = DefinedInfiniteQueryObserverResult<TData, TError>;
interface SolidMutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown> extends OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TContext>, '_defaulted'> {

@@ -116,4 +117,19 @@ }

declare function createInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: Accessor<QueryClient>): CreateInfiniteQueryResult<TData, TError>;
type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = FunctionedParams<SolidInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
initialData?: undefined;
}>;
type NonUndefinedGuard<T> = T extends undefined ? never : T;
type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = FunctionedParams<SolidInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>);
}>;
declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: ReturnType<DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>>): ReturnType<DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>> & {
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
};
declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: ReturnType<UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>>): ReturnType<UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>> & {
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
};
declare function createInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: Accessor<QueryClient>): DefinedCreateInfiniteQueryResult<TData, TError>;
declare function createInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: Accessor<QueryClient>): CreateInfiniteQueryResult<TData, TError>;
declare function createMutation<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown>(options: CreateMutationOptions<TData, TError, TVariables, TContext>, queryClient?: Accessor<QueryClient>): CreateMutationResult<TData, TError, TVariables, TContext>;

@@ -203,2 +219,2 @@

export { type CreateBaseMutationResult, type CreateBaseQueryOptions, type CreateBaseQueryResult, type CreateInfiniteQueryOptions, type CreateInfiniteQueryResult, type CreateMutateAsyncFunction, type CreateMutateFunction, type CreateMutationOptions, type CreateMutationResult, type CreateQueryOptions, type CreateQueryResult, type DefaultOptions, type DefinedCreateBaseQueryResult, type DefinedCreateQueryResult, type FunctionedParams, type InfiniteQueryObserverOptions, IsRestoringProvider, QueryClient, type QueryClientConfig, QueryClientContext, QueryClientProvider, type QueryClientProviderProps, type QueryObserverOptions, type SolidInfiniteQueryOptions, type SolidMutationOptions, type SolidQueryOptions, createInfiniteQuery, createMutation, createQueries, createQuery, queryOptions, useIsFetching, useIsMutating, useIsRestoring, useMutationState, useQueryClient };
export { type CreateBaseMutationResult, type CreateBaseQueryOptions, type CreateBaseQueryResult, type CreateInfiniteQueryOptions, type CreateInfiniteQueryResult, type CreateMutateAsyncFunction, type CreateMutateFunction, type CreateMutationOptions, type CreateMutationResult, type CreateQueryOptions, type CreateQueryResult, type DefaultOptions, type DefinedCreateBaseQueryResult, type DefinedCreateInfiniteQueryResult, type DefinedCreateQueryResult, type DefinedInitialDataInfiniteOptions, type FunctionedParams, type InfiniteQueryObserverOptions, IsRestoringProvider, QueryClient, type QueryClientConfig, QueryClientContext, QueryClientProvider, type QueryClientProviderProps, type QueryObserverOptions, type SolidInfiniteQueryOptions, type SolidMutationOptions, type SolidQueryOptions, type UndefinedInitialDataInfiniteOptions, createInfiniteQuery, createMutation, createQueries, createQuery, infiniteQueryOptions, queryOptions, useIsFetching, useIsMutating, useIsRestoring, useMutationState, useQueryClient };

@@ -315,2 +315,5 @@ import { QueryClient as QueryClient$1, MutationObserver, replaceEqualDeep, QueriesObserver, hydrate, QueryObserver, InfiniteQueryObserver, notifyManager } from '@tanstack/query-core';

}
function infiniteQueryOptions(options) {
return options;
}
function createInfiniteQuery(options, queryClient) {

@@ -519,2 +522,2 @@ return createBaseQuery(

export { IsRestoringProvider, QueryClient, QueryClientContext, QueryClientProvider, createInfiniteQuery, createMutation, createQueries, createQuery, queryOptions, useIsFetching, useIsMutating, useIsRestoring, useMutationState, useQueryClient };
export { IsRestoringProvider, QueryClient, QueryClientContext, QueryClientProvider, createInfiniteQuery, createMutation, createQueries, createQuery, infiniteQueryOptions, queryOptions, useIsFetching, useIsMutating, useIsRestoring, useMutationState, useQueryClient };
{
"name": "@tanstack/solid-query",
"version": "5.40.2",
"version": "5.42.0",
"description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid",

@@ -5,0 +5,0 @@ "author": "tannerlinsley",

@@ -5,2 +5,3 @@ import { InfiniteQueryObserver } from '@tanstack/query-core'

import type {
DataTag,
DefaultError,

@@ -15,5 +16,109 @@ InfiniteData,

CreateInfiniteQueryResult,
DefinedCreateInfiniteQueryResult,
FunctionedParams,
SolidInfiniteQueryOptions,
} from './types'
import type { Accessor } from 'solid-js'
export type UndefinedInitialDataInfiniteOptions<
TQueryFnData,
TError = DefaultError,
TData = InfiniteData<TQueryFnData>,
TQueryKey extends QueryKey = QueryKey,
TPageParam = unknown,
> = FunctionedParams<
SolidInfiniteQueryOptions<
TQueryFnData,
TError,
TData,
TQueryFnData,
TQueryKey,
TPageParam
> & {
initialData?: undefined
}
>
type NonUndefinedGuard<T> = T extends undefined ? never : T
export type DefinedInitialDataInfiniteOptions<
TQueryFnData,
TError = DefaultError,
// should we handle page param correctly
TData = InfiniteData<TQueryFnData>,
TQueryKey extends QueryKey = QueryKey,
TPageParam = unknown,
> = FunctionedParams<
SolidInfiniteQueryOptions<
TQueryFnData,
TError,
TData,
TQueryFnData,
TQueryKey,
TPageParam
> & {
initialData:
| NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>
| (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)
}
>
function infiniteQueryOptions<
TQueryFnData,
TError = DefaultError,
TData = InfiniteData<TQueryFnData>,
TQueryKey extends QueryKey = QueryKey,
TPageParam = unknown,
>(
options: ReturnType<
DefinedInitialDataInfiniteOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>
>,
): ReturnType<
DefinedInitialDataInfiniteOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>
> & {
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>
}
function infiniteQueryOptions<
TQueryFnData,
TError = DefaultError,
TData = InfiniteData<TQueryFnData>,
TQueryKey extends QueryKey = QueryKey,
TPageParam = unknown,
>(
options: ReturnType<
UndefinedInitialDataInfiniteOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>
>,
): ReturnType<
UndefinedInitialDataInfiniteOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>
> & {
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>
}
function infiniteQueryOptions(options: unknown) {
return options
}
export { infiniteQueryOptions }
export function createInfiniteQuery<

@@ -26,2 +131,35 @@ TQueryFnData,

>(
options: DefinedInitialDataInfiniteOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>,
queryClient?: Accessor<QueryClient>,
): DefinedCreateInfiniteQueryResult<TData, TError>
export function createInfiniteQuery<
TQueryFnData,
TError = DefaultError,
TData = InfiniteData<TQueryFnData>,
TQueryKey extends QueryKey = QueryKey,
TPageParam = unknown,
>(
options: UndefinedInitialDataInfiniteOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>,
queryClient?: Accessor<QueryClient>,
): CreateInfiniteQueryResult<TData, TError>
export function createInfiniteQuery<
TQueryFnData,
TError = DefaultError,
TData = InfiniteData<TQueryFnData>,
TQueryKey extends QueryKey = QueryKey,
TPageParam = unknown,
>(
options: CreateInfiniteQueryOptions<

@@ -28,0 +166,0 @@ TQueryFnData,

@@ -23,3 +23,10 @@ /* istanbul ignore file */

export { useIsFetching } from './useIsFetching'
export { createInfiniteQuery } from './createInfiniteQuery'
export {
createInfiniteQuery,
infiniteQueryOptions,
} from './createInfiniteQuery'
export type {
DefinedInitialDataInfiniteOptions,
UndefinedInitialDataInfiniteOptions,
} from './createInfiniteQuery'
export { createMutation } from './createMutation'

@@ -26,0 +33,0 @@ export { useIsMutating } from './useIsMutating'

@@ -5,2 +5,3 @@ /* istanbul ignore file */

DefaultError,
DefinedInfiniteQueryObserverResult,
DefinedQueryObserverResult,

@@ -146,2 +147,7 @@ InfiniteQueryObserverResult,

export type DefinedCreateInfiniteQueryResult<
TData = unknown,
TError = DefaultError,
> = DefinedInfiniteQueryObserverResult<TData, TError>
/* --- Create Mutation Types --- */

@@ -148,0 +154,0 @@ export interface SolidMutationOptions<

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc