Socket
Socket
Sign inDemoInstall

@tanstack/vue-query

Package Overview
Dependencies
Maintainers
2
Versions
304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/vue-query - npm Package Compare versions

Comparing version 5.40.1 to 5.41.0

build/legacy/infiniteQueryOptions.cjs

1

build/legacy/index.d.ts

@@ -7,2 +7,3 @@ export * from '@tanstack/query-core';

export { queryOptions } from './queryOptions.js';
export { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions, infiniteQueryOptions } from './infiniteQueryOptions.js';
export { MutationCache } from './mutationCache.js';

@@ -9,0 +10,0 @@ export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-JLP2sK49.js';

@@ -8,2 +8,3 @@ // src/index.ts

import { queryOptions } from "./queryOptions.js";
import { infiniteQueryOptions } from "./infiniteQueryOptions.js";
import { MutationCache } from "./mutationCache.js";

@@ -23,2 +24,3 @@ import { useQuery } from "./useQuery.js";

VueQueryPlugin,
infiniteQueryOptions,
queryOptions,

@@ -25,0 +27,0 @@ useInfiniteQuery,

@@ -7,2 +7,3 @@ export * from '@tanstack/query-core';

export { queryOptions } from './queryOptions.js';
export { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions, infiniteQueryOptions } from './infiniteQueryOptions.js';
export { MutationCache } from './mutationCache.js';

@@ -9,0 +10,0 @@ export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-JLP2sK49.js';

@@ -8,2 +8,3 @@ // src/index.ts

import { queryOptions } from "./queryOptions.js";
import { infiniteQueryOptions } from "./infiniteQueryOptions.js";
import { MutationCache } from "./mutationCache.js";

@@ -23,2 +24,3 @@ import { useQuery } from "./useQuery.js";

VueQueryPlugin,
infiniteQueryOptions,
queryOptions,

@@ -25,0 +27,0 @@ useInfiniteQuery,

2

package.json
{
"name": "@tanstack/vue-query",
"version": "5.40.1",
"version": "5.41.0",
"description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue",

@@ -5,0 +5,0 @@ "author": "Damian Osipiuk",

@@ -5,2 +5,3 @@ import { describe, expect, test, vi } from 'vitest'

import { QueryClient } from '../queryClient'
import { infiniteQueryOptions } from '../infiniteQueryOptions'
import { flushPromises } from './test-utils'

@@ -273,2 +274,18 @@

})
test('should properly unwrap parameter using infiniteQueryOptions with unref', async () => {
const queryClient = new QueryClient()
const options = infiniteQueryOptions({
queryKey: queryKeyUnref,
initialPageParam: 0,
getNextPageParam: () => 12,
})
queryClient.fetchInfiniteQuery(options)
expect(QueryClientOrigin.prototype.fetchInfiniteQuery).toBeCalledWith({
initialPageParam: 0,
queryKey: queryKeyUnref,
})
})
})

@@ -275,0 +292,0 @@

import { describe, expect, test, vi } from 'vitest'
import { useInfiniteQuery } from '../useInfiniteQuery'
import { infiniteQueryOptions } from '../infiniteQueryOptions'
import { flushPromises, infiniteFetcher } from './test-utils'

@@ -37,2 +38,33 @@

})
test('should properly execute infinite query using infiniteQueryOptions', async () => {
const options = infiniteQueryOptions({
queryKey: ['infiniteQueryOptions'],
queryFn: infiniteFetcher,
initialPageParam: 0,
getNextPageParam: () => 12,
})
const { data, fetchNextPage, status } = useInfiniteQuery(options)
expect(data.value).toStrictEqual(undefined)
expect(status.value).toStrictEqual('pending')
await flushPromises()
expect(data.value).toStrictEqual({
pageParams: [0],
pages: ['data on page 0'],
})
expect(status.value).toStrictEqual('success')
fetchNextPage()
await flushPromises()
expect(data.value).toStrictEqual({
pageParams: [0, 12],
pages: ['data on page 0', 'data on page 12'],
})
expect(status.value).toStrictEqual('success')
})
})

@@ -9,2 +9,7 @@ export * from '@tanstack/query-core'

export { queryOptions } from './queryOptions'
export { infiniteQueryOptions } from './infiniteQueryOptions'
export type {
DefinedInitialDataInfiniteOptions,
UndefinedInitialDataInfiniteOptions,
} from './infiniteQueryOptions'
export { MutationCache } from './mutationCache'

@@ -11,0 +16,0 @@ export { useQuery } from './useQuery'

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

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