@navios/react-query 0.6.0 → 0.7.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.
@@ -56,7 +56,7 @@ export function makeMutation<
56
56
  const result = (
57
57
  keyParams: UseKey extends true
58
58
  ? UrlHasParams<Config['url']> extends true
59
- ? UrlParams<Config['url']>
59
+ ? { urlParams: UrlParams<Config['url']> }
60
60
  : never
61
61
  : never,
62
62
  ): UseMutationResult<
@@ -83,18 +83,10 @@ export function makeMutation<
83
83
  // @ts-expect-error The types match
84
84
  return useMutation({
85
85
  ...rest,
86
- mutationKey: useKey
87
- ? mutationKey({
88
- urlParams: keyParams,
89
- })
90
- : undefined,
86
+ mutationKey: useKey ? mutationKey(keyParams) : undefined,
91
87
  scope: useKey
92
88
  ? {
93
- id: JSON.stringify(
94
- mutationKey({
95
- urlParams: keyParams,
96
- }),
97
- ),
89
+ id: JSON.stringify(mutationKey(keyParams)),
98
90
  }
99
91
  : undefined,
100
92
  async mutationFn(params: TVariables) {
@@ -1,12 +1,13 @@
1
- import { defineConfig } from 'tsup'
1
+ import { defineConfig } from 'tsdown'
2
2
 
3
3
  export default defineConfig({
4
4
  entry: ['src/index.mts'],
5
5
  outDir: 'lib',
6
6
  format: ['esm', 'cjs'],
7
7
  clean: true,
8
- treeshake: 'smallest',
8
+ treeshake: true,
9
9
  sourcemap: true,
10
10
  platform: 'node',
11
- experimentalDts: true,
11
+ dts: true,
12
+ target: 'es2022',
12
13
  })