@tanstack/solid-query-devtools 5.91.2 → 6.0.0-alpha.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-query-devtools",
3
- "version": "5.91.2",
3
+ "version": "6.0.0-alpha.0",
4
4
  "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -44,33 +44,36 @@
44
44
  "!src/__tests__"
45
45
  ],
46
46
  "dependencies": {
47
- "@tanstack/query-devtools": "5.92.0"
47
+ "@tanstack/query-devtools": "5.93.0"
48
48
  },
49
49
  "devDependencies": {
50
+ "@babel/core": "^7.28.0",
51
+ "@babel/preset-typescript": "^7.18.6",
50
52
  "@solidjs/testing-library": "^0.8.10",
53
+ "@solidjs/web": "2.0.0-beta.2",
54
+ "babel-preset-solid": "2.0.0-beta.2",
51
55
  "npm-run-all2": "^5.0.0",
52
- "solid-js": "^1.9.7",
56
+ "solid-js": "2.0.0-beta.2",
53
57
  "tsup-preset-solid": "^2.2.0",
54
- "vite-plugin-solid": "^2.11.6",
55
- "@tanstack/solid-query": "5.90.17"
58
+ "vite-plugin-solid": "3.0.0-next.2",
59
+ "@tanstack/solid-query": "6.0.0-alpha.0"
56
60
  },
57
61
  "peerDependencies": {
58
- "solid-js": "^1.6.0",
59
- "@tanstack/solid-query": "^5.90.17"
62
+ "solid-js": ">=2.0.0-beta.0 <3.0.0",
63
+ "@tanstack/solid-query": "^6.0.0-alpha.0"
60
64
  },
61
65
  "scripts": {
62
66
  "clean": "premove ./build ./coverage ./dist-ts",
63
67
  "compile": "tsc --build",
64
68
  "test:eslint": "eslint --concurrency=auto ./src",
65
69
  "test:types": "npm run compile && npm-run-all --serial test:types:*",
66
- "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js --build",
67
- "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js --build",
68
- "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js --build",
69
- "test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js --build",
70
70
  "test:types:ts54": "node ../../node_modules/typescript54/lib/tsc.js --build",
71
71
  "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js --build",
72
72
  "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js --build",
73
73
  "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --build",
74
+ "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js --build",
75
+ "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js --build",
76
+ "test:types:ts60": "node ../../node_modules/typescript60/lib/tsc.js --build",
74
77
  "test:build": "publint --strict && attw --pack",
75
78
  "test:lib": "vitest --retry=3",
76
79
  "test:lib:dev": "pnpm run test:lib --watch",
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createMemo,
3
3
  createSignal,
4
- onMount,
4
+ omit,
5
+ onSettled,
5
6
  sharedConfig,
6
- splitProps,
7
7
  untrack,
8
8
  } from 'solid-js'
9
- import { isServer } from 'solid-js/web'
9
+ import { isServer } from '@solidjs/web'
10
10
  import type { Component, ComponentProps, JSX } from 'solid-js'
11
11
 
12
12
  /*
@@ -28,10 +28,12 @@ export default function clientOnly<T extends Component<any>>(
28
28
  return (props: ComponentProps<T>) => {
29
29
  let Comp: T | undefined
30
30
  let m: boolean
31
- const [, rest] = splitProps(props, ['fallback'])
32
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest)
33
- const [mounted, setMounted] = createSignal(!sharedConfig.context)
34
- onMount(() => setMounted(true))
31
+ const rest = omit(props, 'fallback')
32
+ if ((Comp = comp()) && !sharedConfig.hydrating) return Comp(rest)
33
+ const [mounted, setMounted] = createSignal(!sharedConfig.hydrating)
34
+ onSettled(() => {
35
+ setMounted(true)
36
+ })
35
37
  return createMemo(
36
38
  () => (
37
39
  (Comp = comp()),
package/src/devtools.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'
1
+ import { createEffect, createMemo, onCleanup, onSettled } from 'solid-js'
2
2
  import { onlineManager, useQueryClient } from '@tanstack/solid-query'
3
3
  import { TanstackQueryDevtools } from '@tanstack/query-devtools'
4
4
  import type {
@@ -72,37 +72,53 @@ export default function SolidQueryDevtools(props: DevtoolsOptions) {
72
72
  theme: props.theme,
73
73
  })
74
74
 
75
- createEffect(() => {
76
- devtools.setClient(client())
77
- })
75
+ createEffect(
76
+ () => client(),
77
+ (c) => {
78
+ devtools.setClient(c)
79
+ },
80
+ )
78
81
 
79
- createEffect(() => {
80
- const buttonPos = props.buttonPosition
81
- if (buttonPos) {
82
- devtools.setButtonPosition(buttonPos)
83
- }
84
- })
82
+ createEffect(
83
+ () => props.buttonPosition,
84
+ (buttonPos) => {
85
+ if (buttonPos) {
86
+ devtools.setButtonPosition(buttonPos)
87
+ }
88
+ },
89
+ )
85
90
 
86
- createEffect(() => {
87
- const pos = props.position
88
- if (pos) {
89
- devtools.setPosition(pos)
90
- }
91
- })
91
+ createEffect(
92
+ () => props.position,
93
+ (pos) => {
94
+ if (pos) {
95
+ devtools.setPosition(pos)
96
+ }
97
+ },
98
+ )
92
99
 
93
- createEffect(() => {
94
- devtools.setInitialIsOpen(props.initialIsOpen || false)
95
- })
100
+ createEffect(
101
+ () => props.initialIsOpen,
102
+ (initialIsOpen) => {
103
+ devtools.setInitialIsOpen(initialIsOpen || false)
104
+ },
105
+ )
96
106
 
97
- createEffect(() => {
98
- devtools.setErrorTypes(props.errorTypes || [])
99
- })
107
+ createEffect(
108
+ () => props.errorTypes,
109
+ (errorTypes) => {
110
+ devtools.setErrorTypes(errorTypes || [])
111
+ },
112
+ )
100
113
 
101
- createEffect(() => {
102
- devtools.setTheme(props.theme || 'system')
103
- })
114
+ createEffect(
115
+ () => props.theme,
116
+ (theme) => {
117
+ devtools.setTheme(theme || 'system')
118
+ },
119
+ )
104
120
 
105
- onMount(() => {
121
+ onSettled(() => {
106
122
  devtools.mount(ref)
107
123
  onCleanup(() => devtools.unmount())
108
124
  })
@@ -1,4 +1,4 @@
1
- import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'
1
+ import { createEffect, createMemo, onCleanup, onSettled } from 'solid-js'
2
2
  import { onlineManager, useQueryClient } from '@tanstack/solid-query'
3
3
  import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'
4
4
  import type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'
@@ -66,22 +66,34 @@ export default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {
66
66
  hideDisabledQueries,
67
67
  theme: props.theme,
68
68
  })
69
- createEffect(() => {
70
- devtools.setClient(client())
71
- })
72
- createEffect(() => {
73
- devtools.setOnClose(props.onClose ?? (() => {}))
74
- })
69
+ createEffect(
70
+ () => client(),
71
+ (c) => {
72
+ devtools.setClient(c)
73
+ },
74
+ )
75
+ createEffect(
76
+ () => props.onClose,
77
+ (onClose) => {
78
+ devtools.setOnClose(onClose ?? (() => {}))
79
+ },
80
+ )
75
81
 
76
- createEffect(() => {
77
- devtools.setErrorTypes(props.errorTypes || [])
78
- })
82
+ createEffect(
83
+ () => props.errorTypes,
84
+ (errorTypes2) => {
85
+ devtools.setErrorTypes(errorTypes2 || [])
86
+ },
87
+ )
79
88
 
80
- createEffect(() => {
81
- devtools.setTheme(props.theme || 'system')
82
- })
89
+ createEffect(
90
+ () => props.theme,
91
+ (theme) => {
92
+ devtools.setTheme(theme || 'system')
93
+ },
94
+ )
83
95
 
84
- onMount(() => {
96
+ onSettled(() => {
85
97
  devtools.mount(ref)
86
98
  onCleanup(() => devtools.unmount())
87
99
  })
package/src/index.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { isDev } from 'solid-js/web'
1
+ import { isDev } from '@solidjs/web'
2
2
  import clientOnly from './clientOnly'
3
3
  import type SolidQueryDevtoolsComp from './devtools'
4
4
  import type SolidQueryDevtoolsCompPanel from './devtoolsPanel'