@tanstack/react-query 5.0.0-alpha.3 → 5.0.0-alpha.31

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.
Files changed (204) hide show
  1. package/build/codemods/utils/index.js +205 -0
  2. package/build/codemods/utils/transformers/query-cache-transformer.js +116 -0
  3. package/build/codemods/utils/transformers/query-client-transformer.js +48 -0
  4. package/build/codemods/utils/transformers/use-query-like-transformer.js +32 -0
  5. package/build/codemods/v4/__testfixtures__/default-import.input.tsx +94 -0
  6. package/build/codemods/v4/__testfixtures__/default-import.output.tsx +96 -0
  7. package/build/codemods/v4/__testfixtures__/named-import.input.tsx +96 -0
  8. package/build/codemods/v4/__testfixtures__/named-import.output.tsx +98 -0
  9. package/build/codemods/v4/__testfixtures__/namespaced-import.input.tsx +86 -0
  10. package/build/codemods/v4/__testfixtures__/namespaced-import.output.tsx +88 -0
  11. package/build/codemods/v4/__testfixtures__/parameter-is-identifier.input.tsx +49 -0
  12. package/build/codemods/v4/__testfixtures__/parameter-is-identifier.output.tsx +49 -0
  13. package/build/codemods/v4/__testfixtures__/parameter-is-object-expression.input.tsx +128 -0
  14. package/build/codemods/v4/__testfixtures__/parameter-is-object-expression.output.tsx +175 -0
  15. package/build/codemods/v4/__testfixtures__/replace-import-specifier.input.tsx +10 -0
  16. package/build/codemods/v4/__testfixtures__/replace-import-specifier.output.tsx +10 -0
  17. package/build/codemods/v4/__testfixtures__/type-arguments.input.tsx +25 -0
  18. package/build/codemods/v4/__testfixtures__/type-arguments.output.tsx +31 -0
  19. package/build/codemods/v4/__tests__/key-transformation.test.js +32 -0
  20. package/build/codemods/v4/__tests__/replace-import-specifier.test.js +12 -0
  21. package/build/codemods/v4/key-transformation.js +138 -0
  22. package/build/codemods/v4/replace-import-specifier.js +25 -0
  23. package/build/codemods/v4/utils/replacers/key-replacer.js +164 -0
  24. package/build/codemods/v5/remove-overloads/__testfixtures__/default-import.input.tsx +199 -0
  25. package/build/codemods/v5/remove-overloads/__testfixtures__/default-import.output.tsx +484 -0
  26. package/build/codemods/v5/remove-overloads/__tests__/remove-overloads.test.js +6 -0
  27. package/build/codemods/v5/remove-overloads/remove-overloads.js +59 -0
  28. package/build/codemods/v5/remove-overloads/transformers/filter-aware-usage-transformer.js +153 -0
  29. package/build/codemods/v5/remove-overloads/transformers/query-fn-aware-usage-transformer.js +188 -0
  30. package/build/codemods/v5/remove-overloads/utils/index.js +124 -0
  31. package/build/codemods/v5/remove-overloads/utils/unknown-usage-error.js +26 -0
  32. package/build/lib/HydrationBoundary.d.ts +1 -0
  33. package/build/lib/HydrationBoundary.d.ts.map +1 -0
  34. package/build/lib/HydrationBoundary.esm.js +1 -0
  35. package/build/lib/HydrationBoundary.esm.js.map +1 -1
  36. package/build/lib/HydrationBoundary.js +1 -0
  37. package/build/lib/HydrationBoundary.js.map +1 -1
  38. package/build/lib/HydrationBoundary.mjs +1 -0
  39. package/build/lib/HydrationBoundary.mjs.map +1 -1
  40. package/build/lib/QueryClientProvider.d.ts +1 -0
  41. package/build/lib/QueryClientProvider.d.ts.map +1 -0
  42. package/build/lib/QueryClientProvider.esm.js +1 -0
  43. package/build/lib/QueryClientProvider.esm.js.map +1 -1
  44. package/build/lib/QueryClientProvider.js +1 -0
  45. package/build/lib/QueryClientProvider.js.map +1 -1
  46. package/build/lib/QueryClientProvider.mjs +1 -0
  47. package/build/lib/QueryClientProvider.mjs.map +1 -1
  48. package/build/lib/QueryErrorResetBoundary.d.ts +1 -0
  49. package/build/lib/QueryErrorResetBoundary.d.ts.map +1 -0
  50. package/build/lib/QueryErrorResetBoundary.esm.js +1 -0
  51. package/build/lib/QueryErrorResetBoundary.esm.js.map +1 -1
  52. package/build/lib/QueryErrorResetBoundary.js +1 -0
  53. package/build/lib/QueryErrorResetBoundary.js.map +1 -1
  54. package/build/lib/QueryErrorResetBoundary.mjs +1 -0
  55. package/build/lib/QueryErrorResetBoundary.mjs.map +1 -1
  56. package/build/lib/__tests__/HydrationBoundary.test.d.ts +1 -0
  57. package/build/lib/__tests__/HydrationBoundary.test.d.ts.map +1 -0
  58. package/build/lib/__tests__/QueryClientProvider.test.d.ts +1 -0
  59. package/build/lib/__tests__/QueryClientProvider.test.d.ts.map +1 -0
  60. package/build/lib/__tests__/QueryResetErrorBoundary.test.d.ts +1 -0
  61. package/build/lib/__tests__/QueryResetErrorBoundary.test.d.ts.map +1 -0
  62. package/build/lib/__tests__/ssr-hydration.test.d.ts +1 -0
  63. package/build/lib/__tests__/ssr-hydration.test.d.ts.map +1 -0
  64. package/build/lib/__tests__/ssr.test.d.ts +1 -3
  65. package/build/lib/__tests__/ssr.test.d.ts.map +1 -0
  66. package/build/lib/__tests__/suspense.test.d.ts +1 -0
  67. package/build/lib/__tests__/suspense.test.d.ts.map +1 -0
  68. package/build/lib/__tests__/useInfiniteQuery.test.d.ts +1 -0
  69. package/build/lib/__tests__/useInfiniteQuery.test.d.ts.map +1 -0
  70. package/build/lib/__tests__/useInfiniteQuery.type.test.d.ts +1 -0
  71. package/build/lib/__tests__/useInfiniteQuery.type.test.d.ts.map +1 -0
  72. package/build/lib/__tests__/useIsFetching.test.d.ts +1 -0
  73. package/build/lib/__tests__/useIsFetching.test.d.ts.map +1 -0
  74. package/build/lib/__tests__/useMutation.test.d.ts +1 -0
  75. package/build/lib/__tests__/useMutation.test.d.ts.map +1 -0
  76. package/build/lib/__tests__/useMutationState.test.d.ts +1 -0
  77. package/build/lib/__tests__/useMutationState.test.d.ts.map +1 -0
  78. package/build/lib/__tests__/useQueries.test.d.ts +1 -0
  79. package/build/lib/__tests__/useQueries.test.d.ts.map +1 -0
  80. package/build/lib/__tests__/useQuery.test.d.ts +1 -0
  81. package/build/lib/__tests__/useQuery.test.d.ts.map +1 -0
  82. package/build/lib/__tests__/useQuery.types.test.d.ts +1 -0
  83. package/build/lib/__tests__/useQuery.types.test.d.ts.map +1 -0
  84. package/build/lib/__tests__/utils.d.ts +3 -3
  85. package/build/lib/__tests__/utils.d.ts.map +1 -0
  86. package/build/lib/errorBoundaryUtils.d.ts +4 -3
  87. package/build/lib/errorBoundaryUtils.d.ts.map +1 -0
  88. package/build/lib/errorBoundaryUtils.esm.js +4 -3
  89. package/build/lib/errorBoundaryUtils.esm.js.map +1 -1
  90. package/build/lib/errorBoundaryUtils.js +4 -3
  91. package/build/lib/errorBoundaryUtils.js.map +1 -1
  92. package/build/lib/errorBoundaryUtils.mjs +4 -3
  93. package/build/lib/errorBoundaryUtils.mjs.map +1 -1
  94. package/build/lib/index.d.ts +2 -1
  95. package/build/lib/index.d.ts.map +1 -0
  96. package/build/lib/index.esm.js +1 -1
  97. package/build/lib/index.js +1 -0
  98. package/build/lib/index.js.map +1 -1
  99. package/build/lib/index.mjs +1 -1
  100. package/build/lib/isRestoring.d.ts +1 -0
  101. package/build/lib/isRestoring.d.ts.map +1 -0
  102. package/build/lib/isRestoring.esm.js +1 -0
  103. package/build/lib/isRestoring.esm.js.map +1 -1
  104. package/build/lib/isRestoring.js +1 -0
  105. package/build/lib/isRestoring.js.map +1 -1
  106. package/build/lib/isRestoring.mjs +1 -0
  107. package/build/lib/isRestoring.mjs.map +1 -1
  108. package/build/lib/suspense.d.ts +2 -1
  109. package/build/lib/suspense.d.ts.map +1 -0
  110. package/build/lib/suspense.esm.js +2 -9
  111. package/build/lib/suspense.esm.js.map +1 -1
  112. package/build/lib/suspense.js +2 -9
  113. package/build/lib/suspense.js.map +1 -1
  114. package/build/lib/suspense.mjs +1 -8
  115. package/build/lib/suspense.mjs.map +1 -1
  116. package/build/lib/types.d.ts +1 -0
  117. package/build/lib/types.d.ts.map +1 -0
  118. package/build/lib/useBaseQuery.d.ts +1 -0
  119. package/build/lib/useBaseQuery.d.ts.map +1 -0
  120. package/build/lib/useBaseQuery.esm.js +2 -12
  121. package/build/lib/useBaseQuery.esm.js.map +1 -1
  122. package/build/lib/useBaseQuery.js +2 -12
  123. package/build/lib/useBaseQuery.js.map +1 -1
  124. package/build/lib/useBaseQuery.mjs +2 -12
  125. package/build/lib/useBaseQuery.mjs.map +1 -1
  126. package/build/lib/useInfiniteQuery.d.ts +1 -0
  127. package/build/lib/useInfiniteQuery.d.ts.map +1 -0
  128. package/build/lib/useInfiniteQuery.esm.js +1 -0
  129. package/build/lib/useInfiniteQuery.esm.js.map +1 -1
  130. package/build/lib/useInfiniteQuery.js +1 -0
  131. package/build/lib/useInfiniteQuery.js.map +1 -1
  132. package/build/lib/useInfiniteQuery.mjs +1 -0
  133. package/build/lib/useInfiniteQuery.mjs.map +1 -1
  134. package/build/lib/useIsFetching.d.ts +1 -0
  135. package/build/lib/useIsFetching.d.ts.map +1 -0
  136. package/build/lib/useIsFetching.esm.js +1 -0
  137. package/build/lib/useIsFetching.esm.js.map +1 -1
  138. package/build/lib/useIsFetching.js +1 -0
  139. package/build/lib/useIsFetching.js.map +1 -1
  140. package/build/lib/useIsFetching.mjs +1 -0
  141. package/build/lib/useIsFetching.mjs.map +1 -1
  142. package/build/lib/useMutation.d.ts +1 -0
  143. package/build/lib/useMutation.d.ts.map +1 -0
  144. package/build/lib/useMutation.esm.js +2 -1
  145. package/build/lib/useMutation.esm.js.map +1 -1
  146. package/build/lib/useMutation.js +2 -1
  147. package/build/lib/useMutation.js.map +1 -1
  148. package/build/lib/useMutation.mjs +2 -1
  149. package/build/lib/useMutation.mjs.map +1 -1
  150. package/build/lib/useMutationState.d.ts +4 -3
  151. package/build/lib/useMutationState.d.ts.map +1 -0
  152. package/build/lib/useMutationState.esm.js +1 -0
  153. package/build/lib/useMutationState.esm.js.map +1 -1
  154. package/build/lib/useMutationState.js +1 -0
  155. package/build/lib/useMutationState.js.map +1 -1
  156. package/build/lib/useMutationState.mjs +1 -0
  157. package/build/lib/useMutationState.mjs.map +1 -1
  158. package/build/lib/useQueries.d.ts +3 -3
  159. package/build/lib/useQueries.d.ts.map +1 -0
  160. package/build/lib/useQueries.esm.js +20 -16
  161. package/build/lib/useQueries.esm.js.map +1 -1
  162. package/build/lib/useQueries.js +20 -16
  163. package/build/lib/useQueries.js.map +1 -1
  164. package/build/lib/useQueries.mjs +12 -11
  165. package/build/lib/useQueries.mjs.map +1 -1
  166. package/build/lib/useQuery.d.ts +3 -0
  167. package/build/lib/useQuery.d.ts.map +1 -0
  168. package/build/lib/useQuery.esm.js +6 -1
  169. package/build/lib/useQuery.esm.js.map +1 -1
  170. package/build/lib/useQuery.js +6 -0
  171. package/build/lib/useQuery.js.map +1 -1
  172. package/build/lib/useQuery.mjs +6 -1
  173. package/build/lib/useQuery.mjs.map +1 -1
  174. package/build/lib/utils.d.ts +1 -0
  175. package/build/lib/utils.d.ts.map +1 -0
  176. package/build/umd/index.development.js +124 -155
  177. package/build/umd/index.development.js.map +1 -1
  178. package/build/umd/index.production.js +1 -1
  179. package/build/umd/index.production.js.map +1 -1
  180. package/package.json +9 -4
  181. package/src/__tests__/HydrationBoundary.test.tsx +4 -3
  182. package/src/__tests__/QueryClientProvider.test.tsx +2 -1
  183. package/src/__tests__/QueryResetErrorBoundary.test.tsx +753 -620
  184. package/src/__tests__/ssr-hydration.test.tsx +11 -10
  185. package/src/__tests__/ssr.test.tsx +4 -7
  186. package/src/__tests__/suspense.test.tsx +17 -98
  187. package/src/__tests__/useInfiniteQuery.test.tsx +18 -16
  188. package/src/__tests__/useInfiniteQuery.type.test.tsx +94 -13
  189. package/src/__tests__/useMutation.test.tsx +25 -24
  190. package/src/__tests__/useMutationState.test.tsx +24 -58
  191. package/src/__tests__/useQueries.test.tsx +34 -163
  192. package/src/__tests__/useQuery.test.tsx +234 -365
  193. package/src/__tests__/useQuery.types.test.tsx +21 -1
  194. package/src/__tests__/utils.tsx +3 -2
  195. package/src/errorBoundaryUtils.ts +6 -5
  196. package/src/index.ts +1 -1
  197. package/src/suspense.ts +3 -11
  198. package/src/useBaseQuery.ts +2 -20
  199. package/src/useInfiniteQuery.ts +1 -0
  200. package/src/useIsFetching.ts +1 -0
  201. package/src/useMutation.ts +2 -1
  202. package/src/useMutationState.ts +4 -3
  203. package/src/useQueries.ts +20 -19
  204. package/src/useQuery.ts +23 -0
@@ -0,0 +1,188 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
2
+ const createV5UtilsObject = require('../utils')
3
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
4
+ const UnknownUsageError = require('../utils/unknown-usage-error')
5
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
6
+ const createQueryClientTransformer = require('../../../utils/transformers/query-client-transformer')
7
+
8
+ /**
9
+ * @param {import('jscodeshift').api} jscodeshift
10
+ * @param {Object} utils
11
+ * @param {import('jscodeshift').Collection} root
12
+ * @param {string} filePath
13
+ * @param {{keyName: "mutationKey"|"queryKey", queryClientMethods: ReadonlyArray<string>, hooks: ReadonlyArray<string>}} config
14
+ */
15
+ const transformQueryFnAwareUsages = ({
16
+ jscodeshift,
17
+ utils,
18
+ root,
19
+ filePath,
20
+ config,
21
+ }) => {
22
+ const v5Utils = createV5UtilsObject({ jscodeshift, utils })
23
+
24
+ /**
25
+ * @param {import('jscodeshift').CallExpression} node
26
+ * @returns {boolean}
27
+ */
28
+ const canSkipReplacement = (node) => {
29
+ const callArguments = node.arguments
30
+
31
+ const hasKeyProperty = () =>
32
+ callArguments[0].properties.some(
33
+ (property) =>
34
+ utils.isObjectProperty(property) &&
35
+ [config.keyName, 'queryFn'].includes(property.key.name),
36
+ )
37
+
38
+ return (
39
+ callArguments.length > 0 &&
40
+ utils.isObjectExpression(callArguments[0]) &&
41
+ hasKeyProperty()
42
+ )
43
+ }
44
+
45
+ const predicate = (property) => {
46
+ const isSpreadElement = utils.isSpreadElement(property)
47
+ const isObjectProperty = utils.isObjectProperty(property)
48
+
49
+ return (
50
+ isSpreadElement ||
51
+ (isObjectProperty && property.key.name !== config.keyName)
52
+ )
53
+ }
54
+
55
+ const transformArgumentToQueryFunction = (path, node) => {
56
+ const isIdentifier = utils.isIdentifier(node)
57
+ const isFunctionDefinition = utils.isFunctionDefinition(node)
58
+
59
+ if (!isIdentifier && !isFunctionDefinition) {
60
+ return undefined
61
+ }
62
+
63
+ if (isFunctionDefinition) {
64
+ return jscodeshift.property(
65
+ 'init',
66
+ jscodeshift.identifier('queryFn'),
67
+ node,
68
+ )
69
+ }
70
+
71
+ const binding = v5Utils.getBindingFromScope(path, node.name, filePath)
72
+ const initializer = v5Utils.getInitializerByDeclarator(binding)
73
+
74
+ if (!utils.isFunctionDefinition(initializer)) {
75
+ return undefined
76
+ }
77
+
78
+ return jscodeshift.property(
79
+ 'init',
80
+ jscodeshift.identifier('queryFn'),
81
+ binding.id,
82
+ )
83
+ }
84
+
85
+ const transformArgumentToOptionsObject = (path, node) => {
86
+ if (!utils.isIdentifier(node)) {
87
+ return undefined
88
+ }
89
+
90
+ const binding = v5Utils.getBindingFromScope(path, node.name, filePath)
91
+ const initializer = v5Utils.getInitializerByDeclarator(binding)
92
+
93
+ if (utils.isObjectExpression(initializer)) {
94
+ return jscodeshift.spreadElement(binding.id)
95
+ }
96
+ }
97
+
98
+ const replacer = (path) => {
99
+ const node = path.node
100
+
101
+ try {
102
+ // If the given method/function call matches certain criteria, the node doesn't need to be replaced, this step can be skipped.
103
+ if (canSkipReplacement(node)) {
104
+ return node
105
+ }
106
+
107
+ const keyProperty = v5Utils.transformArgumentToKey(
108
+ path,
109
+ node.arguments[0],
110
+ config.keyName,
111
+ filePath,
112
+ )
113
+
114
+ if (!keyProperty) {
115
+ throw new UnknownUsageError(node, filePath)
116
+ }
117
+
118
+ const parameters = [jscodeshift.objectExpression([keyProperty])]
119
+ const createdObjectExpression = parameters[0]
120
+ const secondParameter = node.arguments[1]
121
+
122
+ if (secondParameter) {
123
+ const queryFnProperty = transformArgumentToQueryFunction(
124
+ path,
125
+ secondParameter,
126
+ )
127
+
128
+ if (queryFnProperty) {
129
+ createdObjectExpression.properties.push(queryFnProperty)
130
+
131
+ const thirdParameter = node.arguments[2]
132
+
133
+ if (utils.isObjectExpression(thirdParameter)) {
134
+ v5Utils.copyPropertiesFromSource(
135
+ thirdParameter,
136
+ createdObjectExpression,
137
+ predicate,
138
+ )
139
+ } else {
140
+ createdObjectExpression.properties.push(
141
+ jscodeshift.spreadElement(thirdParameter),
142
+ )
143
+ }
144
+
145
+ return jscodeshift.callExpression(node.original.callee, parameters)
146
+ }
147
+
148
+ const optionsProperty = transformArgumentToOptionsObject(
149
+ path,
150
+ secondParameter,
151
+ )
152
+
153
+ if (optionsProperty) {
154
+ createdObjectExpression.properties.push(optionsProperty)
155
+
156
+ return jscodeshift.callExpression(node.original.callee, parameters)
157
+ }
158
+
159
+ if (utils.isObjectExpression(secondParameter)) {
160
+ v5Utils.copyPropertiesFromSource(
161
+ secondParameter,
162
+ createdObjectExpression,
163
+ predicate,
164
+ )
165
+ }
166
+
167
+ return jscodeshift.callExpression(node.original.callee, parameters)
168
+ }
169
+
170
+ return jscodeshift.callExpression(node.original.callee, parameters)
171
+ } catch (error) {
172
+ utils.warn(
173
+ error.name === UnknownUsageError.name
174
+ ? error.message
175
+ : `An unknown error occurred while processing the "${filePath}" file. Please review this file, because the codemod couldn't be applied.`,
176
+ )
177
+
178
+ return node
179
+ }
180
+ }
181
+
182
+ createQueryClientTransformer({ jscodeshift, utils, root }).execute(
183
+ config.queryClientMethods,
184
+ replacer,
185
+ )
186
+ }
187
+
188
+ module.exports = transformQueryFnAwareUsages
@@ -0,0 +1,124 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
2
+ const UnknownUsageError = require('./unknown-usage-error')
3
+
4
+ module.exports = ({ jscodeshift, utils }) => {
5
+ /**
6
+ *
7
+ * @param {import('jscodeshift').ObjectExpression} source
8
+ * @param {import('jscodeshift').ObjectExpression} target
9
+ * @param {(node: import('jscodeshift').Node) => boolean} predicate
10
+ */
11
+ const copyPropertiesFromSource = (source, target, predicate) => {
12
+ source.properties.forEach((property) => {
13
+ if (predicate(property)) {
14
+ target.properties.push(property)
15
+ }
16
+ })
17
+ }
18
+
19
+ /**
20
+ * @param {import('jscodeshift').NodePath} path
21
+ * @param {string} argumentName
22
+ * @param {string} filePath
23
+ * @returns {*}
24
+ */
25
+ const getBindingFromScope = (path, argumentName, filePath) => {
26
+ /**
27
+ * If the current scope contains the declaration then we can use the actual one else we attempt to find the
28
+ * binding from above.
29
+ */
30
+ const scope = path.scope.declares(argumentName)
31
+ ? path.scope
32
+ : path.scope.lookup(argumentName)
33
+
34
+ /**
35
+ * The declaration couldn't be found for some reason, time to move on. We warn the user it needs to be rewritten
36
+ * by themselves.
37
+ */
38
+ if (!scope) {
39
+ return undefined
40
+ }
41
+
42
+ const binding = scope.bindings[argumentName]
43
+ .filter((item) => utils.isIdentifier(item.value))
44
+ .map((item) => item.parentPath.value)
45
+ .at(0)
46
+
47
+ if (!binding) {
48
+ throw new UnknownUsageError(path.node, filePath)
49
+ }
50
+
51
+ return binding
52
+ }
53
+
54
+ /**
55
+ * @param {import('jscodeshift').VariableDeclarator} binding
56
+ * @returns {import('jscodeshift').Node|undefined}
57
+ */
58
+ const getInitializerByDeclarator = (binding) => {
59
+ const isVariableDeclaration = jscodeshift.match(binding, {
60
+ type: jscodeshift.VariableDeclarator.name,
61
+ })
62
+
63
+ if (!isVariableDeclaration) {
64
+ return undefined
65
+ }
66
+
67
+ const isTSAsExpression = jscodeshift.match(binding.init, {
68
+ type: jscodeshift.TSAsExpression.name,
69
+ })
70
+
71
+ return isTSAsExpression ? binding.init.expression : binding.init
72
+ }
73
+
74
+ /**
75
+ * @param {import('jscodeshift').Node} node
76
+ * @returns {boolean}
77
+ */
78
+ const isArrayExpressionVariable = (node) =>
79
+ jscodeshift.match(node, {
80
+ type: jscodeshift.VariableDeclarator.name,
81
+ init: {
82
+ type: jscodeshift.ArrayExpression.name,
83
+ },
84
+ })
85
+
86
+ /**
87
+ * @param {import('jscodeshift').NodePath} path
88
+ * @param {import('jscodeshift').Node} node
89
+ * @param {"queryKey"|"mutationKey"} keyName
90
+ * @param {string} filePath
91
+ * @returns {import('jscodeshift').Property|undefined}
92
+ */
93
+ const transformArgumentToKey = (path, node, keyName, filePath) => {
94
+ // If the first argument is an identifier we have to infer its type if possible.
95
+ if (utils.isIdentifier(node)) {
96
+ const binding = getBindingFromScope(path, node.name, filePath)
97
+
98
+ if (isArrayExpressionVariable(binding)) {
99
+ return jscodeshift.property(
100
+ 'init',
101
+ jscodeshift.identifier(keyName),
102
+ jscodeshift.identifier(binding.id.name),
103
+ )
104
+ }
105
+ }
106
+
107
+ // If the first argument is an array, then it matches the following overload:
108
+ // methodName(queryKey?: QueryKey, firstObject?: TFirstObject, secondObject?: TSecondObject)
109
+ if (utils.isArrayExpression(node)) {
110
+ // Then we create the 'queryKey' property based on it, because it will be passed to the first argument
111
+ // that should be an object according to the new signature.
112
+ return jscodeshift.property('init', jscodeshift.identifier(keyName), node)
113
+ }
114
+
115
+ return undefined
116
+ }
117
+
118
+ return {
119
+ copyPropertiesFromSource,
120
+ getInitializerByDeclarator,
121
+ getBindingFromScope,
122
+ transformArgumentToKey,
123
+ }
124
+ }
@@ -0,0 +1,26 @@
1
+ class UnknownUsageError extends Error {
2
+ /**
3
+ * @param {import('jscodeshift').CallExpression} callExpression
4
+ */
5
+ constructor(callExpression, filePath) {
6
+ super('')
7
+ this.message = this.#buildMessage(callExpression, filePath)
8
+ this.name = 'UnknownUsageError'
9
+ }
10
+
11
+ /**
12
+ *
13
+ * @param {import('jscodeshift').CallExpression} callExpression
14
+ * @param {string} filePath
15
+ * @returns {string}
16
+ */
17
+ #buildMessage(callExpression, filePath) {
18
+ const location = callExpression.callee.loc
19
+ const start = location.start.line
20
+ const end = location.end.line
21
+
22
+ return `The usage in file "${filePath}" at line ${start}:${end} could not be transformed into the new syntax. Please do this manually.`
23
+ }
24
+ }
25
+
26
+ module.exports = UnknownUsageError
@@ -7,3 +7,4 @@ export interface HydrationBoundaryProps {
7
7
  queryClient?: QueryClient;
8
8
  }
9
9
  export declare const HydrationBoundary: ({ children, options, state, queryClient, }: HydrationBoundaryProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
10
+ //# sourceMappingURL=HydrationBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HydrationBoundary.d.ts","sourceRoot":"","sources":["../../src/HydrationBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAIvE,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,eAAO,MAAM,iBAAiB,+CAK3B,sBAAsB,uEAiBxB,CAAA"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
  import { hydrate } from '@tanstack/query-core';
3
4
  import { useQueryClient } from './QueryClientProvider.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"HydrationBoundary.esm.js","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["HydrationBoundary","children","options","state","queryClient","client","useQueryClient","optionsRef","React","useRef","current","useMemo","hydrate"],"mappings":";;;;AAcO,MAAMA,iBAAiB,GAAG,CAAC;EAChCC,QAAQ;EACRC,OAAO,GAAG,EAAE;EACZC,KAAK;AACLC,EAAAA,WAAAA;AACsB,CAAC,KAAK;AAC5B,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;AAE1C,EAAA,MAAMG,UAAU,GAAGC,KAAK,CAACC,MAAM,CAACP,OAAO,CAAC,CAAA;EACxCK,UAAU,CAACG,OAAO,GAAGR,OAAO,CAAA;;AAE5B;AACA;AACA;AACA;EACAM,KAAK,CAACG,OAAO,CAAC,MAAM;AAClB,IAAA,IAAIR,KAAK,EAAE;MACTS,OAAO,CAACP,MAAM,EAAEF,KAAK,EAAEI,UAAU,CAACG,OAAO,CAAC,CAAA;AAC5C,KAAA;AACF,GAAC,EAAE,CAACL,MAAM,EAAEF,KAAK,CAAC,CAAC,CAAA;AAEnB,EAAA,OAAOF,QAAQ,CAAA;AACjB;;;;"}
1
+ {"version":3,"file":"HydrationBoundary.esm.js","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["queryClient"],"mappings":";;;;;AAcO;;;;AAILA;AACsB;AACtB;AAEA;;;AAGA;AACA;AACA;AACA;;AAEE;;AAEA;AACF;AAEA;AACF;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var React = require('react');
@@ -1 +1 @@
1
- {"version":3,"file":"HydrationBoundary.js","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["HydrationBoundary","children","options","state","queryClient","client","useQueryClient","optionsRef","React","useRef","current","useMemo","hydrate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAMA,iBAAiB,GAAG,CAAC;EAChCC,QAAQ;EACRC,OAAO,GAAG,EAAE;EACZC,KAAK;AACLC,EAAAA,WAAAA;AACsB,CAAC,KAAK;AAC5B,EAAA,MAAMC,MAAM,GAAGC,kCAAc,CAACF,WAAW,CAAC,CAAA;AAE1C,EAAA,MAAMG,UAAU,GAAGC,gBAAK,CAACC,MAAM,CAACP,OAAO,CAAC,CAAA;EACxCK,UAAU,CAACG,OAAO,GAAGR,OAAO,CAAA;;AAE5B;AACA;AACA;AACA;EACAM,gBAAK,CAACG,OAAO,CAAC,MAAM;AAClB,IAAA,IAAIR,KAAK,EAAE;MACTS,iBAAO,CAACP,MAAM,EAAEF,KAAK,EAAEI,UAAU,CAACG,OAAO,CAAC,CAAA;AAC5C,KAAA;AACF,GAAC,EAAE,CAACL,MAAM,EAAEF,KAAK,CAAC,CAAC,CAAA;AAEnB,EAAA,OAAOF,QAAQ,CAAA;AACjB;;;;"}
1
+ {"version":3,"file":"HydrationBoundary.js","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["queryClient"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAcO;;;;AAILA;AACsB;AACtB;AAEA;;;AAGA;AACA;AACA;AACA;;AAEE;;AAEA;AACF;AAEA;AACF;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
  import { hydrate } from '@tanstack/query-core';
3
4
  import { useQueryClient } from './QueryClientProvider.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"HydrationBoundary.mjs","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["HydrationBoundary","children","options","state","queryClient","client","useQueryClient","optionsRef","React","useRef","current","useMemo","hydrate"],"mappings":";;;;AAcO,MAAMA,iBAAiB,GAAG,CAAC;EAChCC,QAAQ;EACRC,OAAO,GAAG,EAAE;EACZC,KAAK;AACLC,EAAAA,WAAAA;AACsB,CAAC,KAAK;AAC5B,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;AAE1C,EAAA,MAAMG,UAAU,GAAGC,KAAK,CAACC,MAAM,CAACP,OAAO,CAAC,CAAA;EACxCK,UAAU,CAACG,OAAO,GAAGR,OAAO,CAAA;;AAE5B;AACA;AACA;AACA;EACAM,KAAK,CAACG,OAAO,CAAC,MAAM;AAClB,IAAA,IAAIR,KAAK,EAAE;MACTS,OAAO,CAACP,MAAM,EAAEF,KAAK,EAAEI,UAAU,CAACG,OAAO,CAAC,CAAA;AAC5C,KAAA;AACF,GAAC,EAAE,CAACL,MAAM,EAAEF,KAAK,CAAC,CAAC,CAAA;AAEnB,EAAA,OAAOF,QAAQ,CAAA;AACjB;;;;"}
1
+ {"version":3,"file":"HydrationBoundary.mjs","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["queryClient"],"mappings":";;;;;AAcO;;;;AAILA;AACsB;AACtB;AAEA;;;AAGA;AACA;AACA;AACA;;AAEE;;AAEA;AACF;AAEA;AACF;;"}
@@ -7,3 +7,4 @@ export declare type QueryClientProviderProps = {
7
7
  children?: React.ReactNode;
8
8
  };
9
9
  export declare const QueryClientProvider: ({ client, children, }: QueryClientProviderProps) => JSX.Element;
10
+ //# sourceMappingURL=QueryClientProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryClientProvider.d.ts","sourceRoot":"","sources":["../../src/QueryClientProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD,eAAO,MAAM,kBAAkB,wCAE9B,CAAA;AAED,eAAO,MAAM,cAAc,iBAAkB,WAAW,gBAYvD,CAAA;AAED,oBAAY,wBAAwB,GAAG;IACrC,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,mBAAmB,0BAG7B,wBAAwB,KAAG,WAa7B,CAAA"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  const QueryClientContext = /*#__PURE__*/React.createContext(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"QueryClientProvider.esm.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["QueryClientContext","React","createContext","undefined","useQueryClient","queryClient","client","useContext","Error","QueryClientProvider","children","useEffect","mount","unmount"],"mappings":";;AAKO,MAAMA,kBAAkB,gBAAGC,KAAK,CAACC,aAAa,CACnDC,SAAS,EACV;AAEYC,MAAAA,cAAc,GAAIC,WAAyB,IAAK;AAC3D,EAAA,MAAMC,MAAM,GAAGL,KAAK,CAACM,UAAU,CAACP,kBAAkB,CAAC,CAAA;AAEnD,EAAA,IAAIK,WAAW,EAAE;AACf,IAAA,OAAOA,WAAW,CAAA;AACpB,GAAA;EAEA,IAAI,CAACC,MAAM,EAAE;AACX,IAAA,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC,CAAA;AAC3E,GAAA;AAEA,EAAA,OAAOF,MAAM,CAAA;AACf,EAAC;AAOM,MAAMG,mBAAmB,GAAG,CAAC;EAClCH,MAAM;AACNI,EAAAA,QAAAA;AACwB,CAAC,KAAkB;EAC3CT,KAAK,CAACU,SAAS,CAAC,MAAM;IACpBL,MAAM,CAACM,KAAK,EAAE,CAAA;AACd,IAAA,OAAO,MAAM;MACXN,MAAM,CAACO,OAAO,EAAE,CAAA;KACjB,CAAA;AACH,GAAC,EAAE,CAACP,MAAM,CAAC,CAAC,CAAA;EAEZ,oBACE,KAAA,CAAA,aAAA,CAAC,kBAAkB,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEA,MAAAA;AAAO,GAAA,EACxCI,QAAQ,CACmB,CAAA;AAElC;;;;"}
1
+ {"version":3,"file":"QueryClientProvider.esm.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children"],"mappings":";;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;;AAG+B;AAAc;AAI/C;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var React = require('react');
@@ -1 +1 @@
1
- {"version":3,"file":"QueryClientProvider.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["QueryClientContext","React","createContext","undefined","useQueryClient","queryClient","client","useContext","Error","QueryClientProvider","children","useEffect","mount","unmount"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAMA,kBAAkB,gBAAGC,gBAAK,CAACC,aAAa,CACnDC,SAAS,EACV;AAEYC,MAAAA,cAAc,GAAIC,WAAyB,IAAK;AAC3D,EAAA,MAAMC,MAAM,GAAGL,gBAAK,CAACM,UAAU,CAACP,kBAAkB,CAAC,CAAA;AAEnD,EAAA,IAAIK,WAAW,EAAE;AACf,IAAA,OAAOA,WAAW,CAAA;AACpB,GAAA;EAEA,IAAI,CAACC,MAAM,EAAE;AACX,IAAA,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC,CAAA;AAC3E,GAAA;AAEA,EAAA,OAAOF,MAAM,CAAA;AACf,EAAC;AAOM,MAAMG,mBAAmB,GAAG,CAAC;EAClCH,MAAM;AACNI,EAAAA,QAAAA;AACwB,CAAC,KAAkB;EAC3CT,gBAAK,CAACU,SAAS,CAAC,MAAM;IACpBL,MAAM,CAACM,KAAK,EAAE,CAAA;AACd,IAAA,OAAO,MAAM;MACXN,MAAM,CAACO,OAAO,EAAE,CAAA;KACjB,CAAA;AACH,GAAC,EAAE,CAACP,MAAM,CAAC,CAAC,CAAA;EAEZ,oBACEL,gBAAA,CAAA,aAAA,CAAC,kBAAkB,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEK,MAAAA;AAAO,GAAA,EACxCI,QAAQ,CACmB,CAAA;AAElC;;;;;;"}
1
+ {"version":3,"file":"QueryClientProvider.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;;AAG+B;AAAc;AAI/C;;;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  const QueryClientContext = /*#__PURE__*/React.createContext(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"QueryClientProvider.mjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["QueryClientContext","React","createContext","undefined","useQueryClient","queryClient","client","useContext","Error","QueryClientProvider","children","useEffect","mount","unmount"],"mappings":";;AAKO,MAAMA,kBAAkB,gBAAGC,KAAK,CAACC,aAAa,CACnDC,SAAS,EACV;AAEYC,MAAAA,cAAc,GAAIC,WAAyB,IAAK;AAC3D,EAAA,MAAMC,MAAM,GAAGL,KAAK,CAACM,UAAU,CAACP,kBAAkB,CAAC,CAAA;AAEnD,EAAA,IAAIK,WAAW,EAAE;AACf,IAAA,OAAOA,WAAW,CAAA;AACpB,GAAA;EAEA,IAAI,CAACC,MAAM,EAAE;AACX,IAAA,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC,CAAA;AAC3E,GAAA;AAEA,EAAA,OAAOF,MAAM,CAAA;AACf,EAAC;AAOM,MAAMG,mBAAmB,GAAG,CAAC;EAClCH,MAAM;AACNI,EAAAA,QAAAA;AACwB,CAAC,KAAkB;EAC3CT,KAAK,CAACU,SAAS,CAAC,MAAM;IACpBL,MAAM,CAACM,KAAK,EAAE,CAAA;AACd,IAAA,OAAO,MAAM;MACXN,MAAM,CAACO,OAAO,EAAE,CAAA;KACjB,CAAA;AACH,GAAC,EAAE,CAACP,MAAM,CAAC,CAAC,CAAA;EAEZ,oBACE,KAAA,CAAA,aAAA,CAAC,kBAAkB,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEA,MAAAA;AAAO,GAAA,EACxCI,QAAQ,CACmB,CAAA;AAElC;;;;"}
1
+ {"version":3,"file":"QueryClientProvider.mjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children"],"mappings":";;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;;AAG+B;AAAc;AAI/C;;"}
@@ -9,3 +9,4 @@ export interface QueryErrorResetBoundaryProps {
9
9
  children: ((value: QueryErrorResetBoundaryValue) => React.ReactNode) | React.ReactNode;
10
10
  }
11
11
  export declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) => JSX.Element;
12
+ //# sourceMappingURL=QueryErrorResetBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryErrorResetBoundary.d.ts","sourceRoot":"","sources":["../../src/QueryErrorResetBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAqBD,eAAO,MAAM,0BAA0B,oCACW,CAAA;AAIlD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EACJ,CAAC,CAAC,KAAK,EAAE,4BAA4B,KAAK,KAAK,CAAC,SAAS,CAAC,GAC1D,KAAK,CAAC,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,uBAAuB,kBAEjC,4BAA4B,gBAS9B,CAAA"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  // CONTEXT
@@ -1 +1 @@
1
- {"version":3,"file":"QueryErrorResetBoundary.esm.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["createValue","isReset","clearReset","reset","QueryErrorResetBoundaryContext","React","createContext","useQueryErrorResetBoundary","useContext","QueryErrorResetBoundary","children","value","useState"],"mappings":";;AAGA;;AAQA,SAASA,WAAW,GAAiC;EACnD,IAAIC,OAAO,GAAG,KAAK,CAAA;EACnB,OAAO;AACLC,IAAAA,UAAU,EAAE,MAAM;AAChBD,MAAAA,OAAO,GAAG,KAAK,CAAA;KAChB;AACDE,IAAAA,KAAK,EAAE,MAAM;AACXF,MAAAA,OAAO,GAAG,IAAI,CAAA;KACf;AACDA,IAAAA,OAAO,EAAE,MAAM;AACb,MAAA,OAAOA,OAAO,CAAA;AAChB,KAAA;GACD,CAAA;AACH,CAAA;AAEA,MAAMG,8BAA8B,gBAAGC,KAAK,CAACC,aAAa,CAACN,WAAW,EAAE,CAAC,CAAA;;AAEzE;;AAEO,MAAMO,0BAA0B,GAAG,MACxCF,KAAK,CAACG,UAAU,CAACJ,8BAA8B,EAAC;;AAElD;;AAQO,MAAMK,uBAAuB,GAAG,CAAC;AACtCC,EAAAA,QAAAA;AAC4B,CAAC,KAAK;EAClC,MAAM,CAACC,KAAK,CAAC,GAAGN,KAAK,CAACO,QAAQ,CAAC,MAAMZ,WAAW,EAAE,CAAC,CAAA;EACnD,oBACE,KAAA,CAAA,aAAA,CAAC,8BAA8B,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEW,KAAAA;GAC7C,EAAA,OAAOD,QAAQ,KAAK,UAAU,GAC1BA,QAAQ,CAAcC,KAAK,CAAC,GAC7BD,QAAQ,CAC4B,CAAA;AAE9C;;;;"}
1
+ {"version":3,"file":"QueryErrorResetBoundary.esm.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["clearReset","isReset","reset","children"],"mappings":";;;AAGA;;AAQA;;;AAGIA;AACEC;;AAEFC;AACED;;AAEFA;AACE;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLE;AAC4B;;;AAGe;;AAM7C;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var React = require('react');
@@ -1 +1 @@
1
- {"version":3,"file":"QueryErrorResetBoundary.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["createValue","isReset","clearReset","reset","QueryErrorResetBoundaryContext","React","createContext","useQueryErrorResetBoundary","useContext","QueryErrorResetBoundary","children","value","useState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAQA,SAASA,WAAW,GAAiC;EACnD,IAAIC,OAAO,GAAG,KAAK,CAAA;EACnB,OAAO;AACLC,IAAAA,UAAU,EAAE,MAAM;AAChBD,MAAAA,OAAO,GAAG,KAAK,CAAA;KAChB;AACDE,IAAAA,KAAK,EAAE,MAAM;AACXF,MAAAA,OAAO,GAAG,IAAI,CAAA;KACf;AACDA,IAAAA,OAAO,EAAE,MAAM;AACb,MAAA,OAAOA,OAAO,CAAA;AAChB,KAAA;GACD,CAAA;AACH,CAAA;AAEA,MAAMG,8BAA8B,gBAAGC,gBAAK,CAACC,aAAa,CAACN,WAAW,EAAE,CAAC,CAAA;;AAEzE;;AAEO,MAAMO,0BAA0B,GAAG,MACxCF,gBAAK,CAACG,UAAU,CAACJ,8BAA8B,EAAC;;AAElD;;AAQO,MAAMK,uBAAuB,GAAG,CAAC;AACtCC,EAAAA,QAAAA;AAC4B,CAAC,KAAK;EAClC,MAAM,CAACC,KAAK,CAAC,GAAGN,gBAAK,CAACO,QAAQ,CAAC,MAAMZ,WAAW,EAAE,CAAC,CAAA;EACnD,oBACEK,gBAAA,CAAA,aAAA,CAAC,8BAA8B,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEM,KAAAA;GAC7C,EAAA,OAAOD,QAAQ,KAAK,UAAU,GAC1BA,QAAQ,CAAcC,KAAK,CAAC,GAC7BD,QAAQ,CAC4B,CAAA;AAE9C;;;;;"}
1
+ {"version":3,"file":"QueryErrorResetBoundary.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["clearReset","isReset","reset","children"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAQA;;;AAGIA;AACEC;;AAEFC;AACED;;AAEFA;AACE;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLE;AAC4B;;;AAGe;;AAM7C;;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  // CONTEXT
@@ -1 +1 @@
1
- {"version":3,"file":"QueryErrorResetBoundary.mjs","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["createValue","isReset","clearReset","reset","QueryErrorResetBoundaryContext","React","createContext","useQueryErrorResetBoundary","useContext","QueryErrorResetBoundary","children","value","useState"],"mappings":";;AAGA;;AAQA,SAASA,WAAW,GAAiC;EACnD,IAAIC,OAAO,GAAG,KAAK,CAAA;EACnB,OAAO;AACLC,IAAAA,UAAU,EAAE,MAAM;AAChBD,MAAAA,OAAO,GAAG,KAAK,CAAA;KAChB;AACDE,IAAAA,KAAK,EAAE,MAAM;AACXF,MAAAA,OAAO,GAAG,IAAI,CAAA;KACf;AACDA,IAAAA,OAAO,EAAE,MAAM;AACb,MAAA,OAAOA,OAAO,CAAA;AAChB,KAAA;GACD,CAAA;AACH,CAAA;AAEA,MAAMG,8BAA8B,gBAAGC,KAAK,CAACC,aAAa,CAACN,WAAW,EAAE,CAAC,CAAA;;AAEzE;;AAEO,MAAMO,0BAA0B,GAAG,MACxCF,KAAK,CAACG,UAAU,CAACJ,8BAA8B,EAAC;;AAElD;;AAQO,MAAMK,uBAAuB,GAAG,CAAC;AACtCC,EAAAA,QAAAA;AAC4B,CAAC,KAAK;EAClC,MAAM,CAACC,KAAK,CAAC,GAAGN,KAAK,CAACO,QAAQ,CAAC,MAAMZ,WAAW,EAAE,CAAC,CAAA;EACnD,oBACE,KAAA,CAAA,aAAA,CAAC,8BAA8B,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEW,KAAAA;GAC7C,EAAA,OAAOD,QAAQ,KAAK,UAAU,GAC1BA,QAAQ,CAAcC,KAAK,CAAC,GAC7BD,QAAQ,CAC4B,CAAA;AAE9C;;;;"}
1
+ {"version":3,"file":"QueryErrorResetBoundary.mjs","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["clearReset","isReset","reset","children"],"mappings":";;;AAGA;;AAQA;;;AAGIA;AACEC;;AAEFC;AACED;;AAEFA;AACE;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLE;AAC4B;;;AAGe;;AAM7C;;"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=HydrationBoundary.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HydrationBoundary.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/HydrationBoundary.test.tsx"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=QueryClientProvider.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryClientProvider.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/QueryClientProvider.test.tsx"],"names":[],"mappings":""}
@@ -4,3 +4,4 @@ declare module 'react-error-boundary' {
4
4
  }
5
5
  }
6
6
  export {};
7
+ //# sourceMappingURL=QueryResetErrorBoundary.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryResetErrorBoundary.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/QueryResetErrorBoundary.test.tsx"],"names":[],"mappings":"AASA,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,8BAA8B;QACtC,QAAQ,EAAE,GAAG,CAAA;KACd;CACF"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=ssr-hydration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssr-hydration.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/ssr-hydration.test.tsx"],"names":[],"mappings":""}
@@ -1,4 +1,2 @@
1
- /**
2
- * @jest-environment node
3
- */
4
1
  export {};
2
+ //# sourceMappingURL=ssr.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssr.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/ssr.test.tsx"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=suspense.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suspense.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/suspense.test.tsx"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=useInfiniteQuery.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInfiniteQuery.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useInfiniteQuery.test.tsx"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=useInfiniteQuery.type.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInfiniteQuery.type.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useInfiniteQuery.type.test.tsx"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=useIsFetching.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsFetching.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useIsFetching.test.tsx"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
1
  import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=useMutation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMutation.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useMutation.test.tsx"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAA"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=useMutationState.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMutationState.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useMutationState.test.tsx"],"names":[],"mappings":""}