@tanstack/solid-query 5.0.0-alpha.43 → 5.0.0-alpha.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';
2
- import * as QueriesObserverModule from '../../../query-core/src/queriesObserver';
2
+ import * as QueryCore from '@tanstack/query-core';
3
3
  import { createRenderEffect, createSignal } from 'solid-js';
4
4
  import { createQueries, QueriesObserver, QueryCache, QueryClientProvider, } from '..';
5
5
  import { createQueryClient, expectType, expectTypeNotAny, queryKey, sleep, } from './utils';
@@ -551,7 +551,7 @@ describe('useQueries', () => {
551
551
  }
552
552
  }
553
553
  const QueriesObserverSpy = vi
554
- .spyOn(QueriesObserverModule, 'QueriesObserver')
554
+ .spyOn(QueryCore, 'QueriesObserver')
555
555
  .mockImplementation((fn) => {
556
556
  return new QueriesObserverMock(fn, []);
557
557
  });
@@ -2,7 +2,7 @@ import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';
2
2
  import { createMutation, QueryClientProvider, useIsMutating } from '..';
3
3
  import { createQueryClient, sleep, setActTimeout } from './utils';
4
4
  import { createEffect, createRenderEffect, createSignal, Show } from 'solid-js';
5
- import * as MutationCacheModule from '../../../query-core/src/mutationCache';
5
+ import * as QueryCore from '@tanstack/query-core';
6
6
  import { vi } from 'vitest';
7
7
  describe('useIsMutating', () => {
8
8
  it('should return the number of fetching mutations', async () => {
@@ -149,14 +149,14 @@ describe('useIsMutating', () => {
149
149
  it('should not change state if unmounted', async () => {
150
150
  // We have to mock the MutationCache to not unsubscribe
151
151
  // the listener when the component is unmounted
152
- class MutationCacheMock extends MutationCacheModule.MutationCache {
152
+ class MutationCacheMock extends QueryCore.MutationCache {
153
153
  subscribe(listener) {
154
154
  super.subscribe(listener);
155
155
  return () => void 0;
156
156
  }
157
157
  }
158
158
  const MutationCacheSpy = vi
159
- .spyOn(MutationCacheModule, 'MutationCache')
159
+ .spyOn(QueryCore, 'MutationCache')
160
160
  .mockImplementation((fn) => {
161
161
  return new MutationCacheMock(fn);
162
162
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-query",
3
- "version": "5.0.0-alpha.43",
3
+ "version": "5.0.0-alpha.44",
4
4
  "description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  "src"
41
41
  ],
42
42
  "dependencies": {
43
- "@tanstack/query-core": "5.0.0-alpha.43"
43
+ "@tanstack/query-core": "^5.0.0-alpha.43"
44
44
  },
45
45
  "devDependencies": {
46
46
  "vite-plugin-solid": "^2.5.0"
@@ -50,13 +50,13 @@
50
50
  },
51
51
  "peerDependenciesMeta": {},
52
52
  "scripts": {
53
- "clean": "rimraf ./build",
53
+ "clean": "rimraf ./build && rimraf ./coverage",
54
54
  "test:eslint": "eslint --ext .ts,.tsx ./src",
55
- "test:types": "tsc",
55
+ "test:types": "pnpm build:types",
56
56
  "test:lib": "vitest run --coverage",
57
57
  "test:lib:dev": "pnpm run test:lib --watch",
58
58
  "build": "pnpm build:rollup && pnpm build:types",
59
59
  "build:rollup": "rollup --config rollup.config.mjs",
60
- "build:types": "tsc --build"
60
+ "build:types": "tsc"
61
61
  }
62
62
  }
@@ -1,6 +1,5 @@
1
1
  import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library'
2
-
3
- import * as QueriesObserverModule from '../../../query-core/src/queriesObserver'
2
+ import * as QueryCore from '@tanstack/query-core'
4
3
 
5
4
  import type { QueryFunctionContext, QueryKey } from '@tanstack/query-core'
6
5
  import { createRenderEffect, createSignal } from 'solid-js'
@@ -670,7 +669,7 @@ describe('useQueries', () => {
670
669
  }
671
670
 
672
671
  const QueriesObserverSpy = vi
673
- .spyOn(QueriesObserverModule, 'QueriesObserver')
672
+ .spyOn(QueryCore, 'QueriesObserver')
674
673
  .mockImplementation((fn) => {
675
674
  return new QueriesObserverMock(fn, [])
676
675
  })
@@ -3,7 +3,7 @@ import { createMutation, QueryClientProvider, useIsMutating } from '..'
3
3
  import { createQueryClient, sleep, setActTimeout } from './utils'
4
4
 
5
5
  import { createEffect, createRenderEffect, createSignal, Show } from 'solid-js'
6
- import * as MutationCacheModule from '../../../query-core/src/mutationCache'
6
+ import * as QueryCore from '@tanstack/query-core'
7
7
  import { vi } from 'vitest'
8
8
 
9
9
  describe('useIsMutating', () => {
@@ -186,7 +186,7 @@ describe('useIsMutating', () => {
186
186
  it('should not change state if unmounted', async () => {
187
187
  // We have to mock the MutationCache to not unsubscribe
188
188
  // the listener when the component is unmounted
189
- class MutationCacheMock extends MutationCacheModule.MutationCache {
189
+ class MutationCacheMock extends QueryCore.MutationCache {
190
190
  subscribe(listener: any) {
191
191
  super.subscribe(listener)
192
192
  return () => void 0
@@ -194,7 +194,7 @@ describe('useIsMutating', () => {
194
194
  }
195
195
 
196
196
  const MutationCacheSpy = vi
197
- .spyOn(MutationCacheModule, 'MutationCache')
197
+ .spyOn(QueryCore, 'MutationCache')
198
198
  .mockImplementation((fn) => {
199
199
  return new MutationCacheMock(fn)
200
200
  })