refactor: solid v2 pre-release for solid-query v6 #10272
Mergedbrenelz(GitHub profile, opens in a new tab)merged 36 commits into
solid-query-v6-pre fromrefs/pull/10272/headmerged by birkskyum(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-query
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-query-persist-client
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-query-devtools
- packages/solid-query/src/useQueries.ts line 276OutdatedResolvedby brenelz(GitHub profile, opens in a new tab)@@ -325,18 +273,4 @@325- const handler = (index: number) => ({326- get(target: QueryObserverResult, prop: keyof QueryObserverResult): any {327- if (prop === 'data') {328- return dataResources()[index]![0]()329- }330- return Reflect.get(target, prop)331- },332- })333-334- const getProxies = () =>335- state.map((s, index) => {336- return new Proxy(s, handler(index))337- })338-339- const [proxyState, setProxyState] = createStore(getProxies())340- createRenderEffect(() => setProxyState(getProxies()))273+ // Force read of trackedDefaultedQueries to ensure it runs274+ void trackedDefaultedQueries341275342- return proxyState as TCombinedResult276+ return state as unknown as TCombinedResult
- packages/solid-query/src/__tests__/useMutation.test.tsx line 718OutdatedResolvedby brenelz(GitHub profile, opens in a new tab)@@ -701,18 +712,5 @@712+ fireEvent.click(rendered.getByRole('button', { name: /mutate/i }))701713 await vi.advanceTimersByTimeAsync(16)714+ await vi.advanceTimersByTimeAsync(0)715+ expect(rendered.getByText('isPaused: true')).toBeInTheDocument()702716703- expect(states.length).toBe(4)704- expect(states[0]).toMatchObject({705- isPending: false,706- isPaused: false,707- failureCount: 0,708- failureReason: null,709- })710- expect(states[1]).toMatchObject({711- isPending: true,712- isPaused: false,713- failureCount: 0,714- failureReason: null,715- })716- expect(states[2]).toMatchObject({717- isPending: true,718- isPaused: false,
- packages/solid-query/src/__tests__/useMutation.test.tsx line 593OutdatedResolvedby brenelz(GitHub profile, opens in a new tab)@@ -589,5 +598,3 @@589598 mutationKey: undefined,590599 })591600592- onlineMock.mockRestore()593- window.dispatchEvent(new Event('online'))
- packages/solid-query-persist-client/package.json line 83OutdatedResolvedby brenelz(GitHub profile, opens in a new tab)@@ -66,14 +66,18 @@6666 "@tanstack/query-persist-client-core": "workspace:*"6767 },6868 "devDependencies": {69+ "@babel/core": "^7.28.0",70+ "@babel/preset-typescript": "^7.18.6",6971 "@solidjs/testing-library": "^0.8.10",72+ "@solidjs/web": "2.0.0-beta.2",7073 "@tanstack/query-test-utils": "workspace:*",7174 "@tanstack/solid-query": "workspace:*",75+ "babel-preset-solid": "2.0.0-beta.2",7276 "npm-run-all2": "^5.0.0",73- "solid-js": "^1.9.7",77+ "solid-js": "2.0.0-beta.2",7478 "tsup-preset-solid": "^2.2.0",75- "vite-plugin-solid": "^2.11.6"79+ "vite-plugin-solid": "3.0.0-next.2"7680 },7781 "peerDependencies": {7882 "@tanstack/solid-query": "workspace:^",79- "solid-js": "^1.6.0"83+ "solid-js": "^1.6.0 || >=2.0.0-beta.0 <2.0.0"
birkskyum(GitHub profile, opens in a new tab) changed the title
- @@ -420,3 +423,4 @@420423 </QueryClientProvider>421424 ))422425426+ await Promise.resolve()
birkskyum(GitHub profile, opens in a new tab) changed the title
birkskyum(GitHub profile, opens in a new tab) changed the title
birkskyum(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
⚠️ No Changeset found#
Latest commit: e7415f0983bc0069d1d464cf2568082760098a82
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR