tanstack-query-callbacks 0.2.0 → 0.2.1

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.
@@ -14,4 +14,5 @@ interface SubscribeQueryCallbacksProps<TQueryFnData, TError> extends QueryCallba
14
14
  }
15
15
  declare function subscribeQueryCallbacks<TQueryFnData = unknown, TError = unknown>({ queryClient, queryKey, onSuccess, onError, onSettled, }: SubscribeQueryCallbacksProps<TQueryFnData, TError>): () => void;
16
16
 
17
- export { type QueryCallbacks, type QueryErrorHandler, type QuerySettledHandler, type QuerySuccessHandler, type SubscribeQueryCallbacksProps, subscribeQueryCallbacks };
17
+ export { subscribeQueryCallbacks };
18
+ export type { QueryCallbacks, QueryErrorHandler, QuerySettledHandler, QuerySuccessHandler, SubscribeQueryCallbacksProps };
@@ -14,4 +14,5 @@ interface SubscribeQueryCallbacksProps<TQueryFnData, TError> extends QueryCallba
14
14
  }
15
15
  declare function subscribeQueryCallbacks<TQueryFnData = unknown, TError = unknown>({ queryClient, queryKey, onSuccess, onError, onSettled, }: SubscribeQueryCallbacksProps<TQueryFnData, TError>): () => void;
16
16
 
17
- export { type QueryCallbacks, type QueryErrorHandler, type QuerySettledHandler, type QuerySuccessHandler, type SubscribeQueryCallbacksProps, subscribeQueryCallbacks };
17
+ export { subscribeQueryCallbacks };
18
+ export type { QueryCallbacks, QueryErrorHandler, QuerySettledHandler, QuerySuccessHandler, SubscribeQueryCallbacksProps };
@@ -14,4 +14,5 @@ interface SubscribeQueryCallbacksProps<TQueryFnData, TError> extends QueryCallba
14
14
  }
15
15
  declare function subscribeQueryCallbacks<TQueryFnData = unknown, TError = unknown>({ queryClient, queryKey, onSuccess, onError, onSettled, }: SubscribeQueryCallbacksProps<TQueryFnData, TError>): () => void;
16
16
 
17
- export { type QueryCallbacks, type QueryErrorHandler, type QuerySettledHandler, type QuerySuccessHandler, type SubscribeQueryCallbacksProps, subscribeQueryCallbacks };
17
+ export { subscribeQueryCallbacks };
18
+ export type { QueryCallbacks, QueryErrorHandler, QuerySettledHandler, QuerySuccessHandler, SubscribeQueryCallbacksProps };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const react = require('react');
4
3
  const reactQuery = require('@tanstack/react-query');
4
+ const react = require('react');
5
5
  const core_index = require('../core/index.cjs');
6
6
  require('@tanstack/query-core');
7
7
 
@@ -1,5 +1,5 @@
1
- import { Context } from 'react';
2
1
  import { QueryKey, QueryClient } from '@tanstack/react-query';
2
+ import { Context } from 'react';
3
3
  import { QueryCallbacks } from '../core/index.cjs';
4
4
  import '@tanstack/query-core';
5
5
 
@@ -16,4 +16,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
16
16
  }
17
17
  declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
18
18
 
19
- export { type UseQueryCallbacksProps, useQueryCallbacks };
19
+ export { useQueryCallbacks };
20
+ export type { UseQueryCallbacksProps };
@@ -1,5 +1,5 @@
1
- import { Context } from 'react';
2
1
  import { QueryKey, QueryClient } from '@tanstack/react-query';
2
+ import { Context } from 'react';
3
3
  import { QueryCallbacks } from '../core/index.mjs';
4
4
  import '@tanstack/query-core';
5
5
 
@@ -16,4 +16,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
16
16
  }
17
17
  declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
18
18
 
19
- export { type UseQueryCallbacksProps, useQueryCallbacks };
19
+ export { useQueryCallbacks };
20
+ export type { UseQueryCallbacksProps };
@@ -1,5 +1,5 @@
1
- import { Context } from 'react';
2
1
  import { QueryKey, QueryClient } from '@tanstack/react-query';
2
+ import { Context } from 'react';
3
3
  import { QueryCallbacks } from '../core/index.js';
4
4
  import '@tanstack/query-core';
5
5
 
@@ -16,4 +16,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
16
16
  }
17
17
  declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
18
18
 
19
- export { type UseQueryCallbacksProps, useQueryCallbacks };
19
+ export { useQueryCallbacks };
20
+ export type { UseQueryCallbacksProps };
@@ -1,5 +1,5 @@
1
- import { useEffect } from 'react';
2
1
  import { useQueryClient } from '@tanstack/react-query';
2
+ import { useEffect } from 'react';
3
3
  import { subscribeQueryCallbacks } from '../core/index.mjs';
4
4
  import '@tanstack/query-core';
5
5
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const vueDemi = require('vue-demi');
4
3
  const vueQuery = require('@tanstack/vue-query');
4
+ const vueDemi = require('vue-demi');
5
5
  const core_index = require('../core/index.cjs');
6
6
  require('@tanstack/query-core');
7
7
 
@@ -1,10 +1,10 @@
1
- import { MaybeRef } from 'vue-demi';
2
1
  import { QueryKey, QueryClient } from '@tanstack/vue-query';
2
+ import { Ref } from 'vue-demi';
3
3
  import { QueryCallbacks } from '../core/index.cjs';
4
4
  import '@tanstack/query-core';
5
5
 
6
6
  interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQueryFnData, TError> {
7
- queryKey: MaybeRef<QueryKey>;
7
+ queryKey: QueryKey | Ref<QueryKey>;
8
8
  /**
9
9
  * QueryClient instance
10
10
  */
@@ -20,4 +20,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
20
20
  }
21
21
  declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
22
22
 
23
- export { type UseQueryCallbacksProps, useQueryCallbacks };
23
+ export { useQueryCallbacks };
24
+ export type { UseQueryCallbacksProps };
@@ -1,10 +1,10 @@
1
- import { MaybeRef } from 'vue-demi';
2
1
  import { QueryKey, QueryClient } from '@tanstack/vue-query';
2
+ import { Ref } from 'vue-demi';
3
3
  import { QueryCallbacks } from '../core/index.mjs';
4
4
  import '@tanstack/query-core';
5
5
 
6
6
  interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQueryFnData, TError> {
7
- queryKey: MaybeRef<QueryKey>;
7
+ queryKey: QueryKey | Ref<QueryKey>;
8
8
  /**
9
9
  * QueryClient instance
10
10
  */
@@ -20,4 +20,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
20
20
  }
21
21
  declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
22
22
 
23
- export { type UseQueryCallbacksProps, useQueryCallbacks };
23
+ export { useQueryCallbacks };
24
+ export type { UseQueryCallbacksProps };
@@ -1,10 +1,10 @@
1
- import { MaybeRef } from 'vue-demi';
2
1
  import { QueryKey, QueryClient } from '@tanstack/vue-query';
2
+ import { Ref } from 'vue-demi';
3
3
  import { QueryCallbacks } from '../core/index.js';
4
4
  import '@tanstack/query-core';
5
5
 
6
6
  interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQueryFnData, TError> {
7
- queryKey: MaybeRef<QueryKey>;
7
+ queryKey: QueryKey | Ref<QueryKey>;
8
8
  /**
9
9
  * QueryClient instance
10
10
  */
@@ -20,4 +20,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
20
20
  }
21
21
  declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
22
22
 
23
- export { type UseQueryCallbacksProps, useQueryCallbacks };
23
+ export { useQueryCallbacks };
24
+ export type { UseQueryCallbacksProps };
@@ -1,5 +1,5 @@
1
- import { inject, watch, unref } from 'vue-demi';
2
1
  import { useQueryClient } from '@tanstack/vue-query';
2
+ import { inject, watch, unref } from 'vue-demi';
3
3
  import { subscribeQueryCallbacks } from '../core/index.mjs';
4
4
  import '@tanstack/query-core';
5
5
 
package/package.json CHANGED
@@ -1,10 +1,17 @@
1
1
  {
2
2
  "name": "tanstack-query-callbacks",
3
3
  "type": "module",
4
- "version": "0.2.0",
5
- "packageManager": "pnpm@8.15.1",
4
+ "version": "0.2.1",
6
5
  "author": "zhong666 <hi@zhong666.me>",
7
6
  "license": "MIT",
7
+ "homepage": "https://github.com/aa900031/tanstack-query-callbacks#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/aa900031/tanstack-query-callbacks.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/aa900031/tanstack-query-callbacks/issues"
14
+ },
8
15
  "keywords": [
9
16
  "tanstack",
10
17
  "tanstack-query",
@@ -69,36 +76,39 @@
69
76
  }
70
77
  },
71
78
  "devDependencies": {
72
- "@aa900031/eslint-config": "^1.3.0",
73
- "@release-it/conventional-changelog": "^7.0.2",
74
- "@tanstack/query-core": "^5.18.1",
79
+ "@aa900031/eslint-config": "^3.1.0",
80
+ "@release-it/conventional-changelog": "^9.0.4",
81
+ "@tanstack/query-core": "^5.72.1",
75
82
  "@tanstack/query-core-v4": "npm:@tanstack/query-core@^4.36.1",
76
- "@tanstack/react-query": "^5.18.1",
83
+ "@tanstack/react-query": "^5.72.1",
77
84
  "@tanstack/react-query-v4": "npm:@tanstack/react-query@^4.36.1",
78
- "@tanstack/vue-query": "^5.18.1",
85
+ "@tanstack/vue-query": "^5.72.1",
79
86
  "@tanstack/vue-query-v4": "npm:@tanstack/vue-query@^4.37.1",
80
- "@testing-library/react": "14.2.1",
81
- "@testing-library/vue": "^8.0.1",
82
- "@tsconfig/node18": "^18.2.2",
83
- "@types/node": "^18.19.14",
84
- "@types/react": "^18.2.51",
85
- "@types/react-dom": "^18.2.18",
86
- "@vitest/coverage-istanbul": "^1.2.2",
87
- "@vitest/ui": "^1.2.2",
87
+ "@testing-library/react": "14.3.1",
88
+ "@testing-library/vue": "^8.1.0",
89
+ "@tsconfig/node18": "^18.2.4",
90
+ "@types/node": "^18.19.86",
91
+ "@types/react": "^18.3.20",
92
+ "@types/react-dom": "^18.3.6",
93
+ "@vitest/coverage-istanbul": "^3.1.1",
94
+ "@vitest/ui": "^3.1.1",
88
95
  "@vue/composition-api": "^1.7.2",
89
- "conventional-changelog-unjs": "^0.1.1",
90
- "eslint": "^8.56.0",
91
- "happy-dom": "^12.10.3",
92
- "npm-run-all2": "^6.1.2",
93
- "react": "^18.2.0",
94
- "react-dom": "^18.2.0",
95
- "release-it": "^16.3.0",
96
- "typescript": "^5.3.3",
97
- "unbuild": "^2.0.0",
98
- "vitest": "^1.2.2",
99
- "vue": "^3.4.15",
100
- "vue-2": "npm:vue@2.7",
101
- "vue-2.7": "npm:vue@2.7"
96
+ "conventional-changelog-unjs": "^1.0.0",
97
+ "eslint": "^9.24.0",
98
+ "happy-dom": "^17.4.4",
99
+ "npm-run-all2": "^7.0.2",
100
+ "react": "^18.3.1",
101
+ "react-dom": "^18.3.1",
102
+ "release-it": "^17.11.0",
103
+ "typescript": "^5.8.3",
104
+ "unbuild": "^3.5.0",
105
+ "vitest": "^3.1.1",
106
+ "vue": "^3.5.13",
107
+ "vue-2": "npm:vue@~2.6.12",
108
+ "vue-2.7": "npm:vue@~2.7.16"
109
+ },
110
+ "resolutions": {
111
+ "vue-demi": "latest"
102
112
  },
103
113
  "scripts": {
104
114
  "build": "unbuild",
@@ -107,9 +117,14 @@
107
117
  "test:vue-2": "vue-demi-switch 2 vue-2 && vitest run --dir ./src/vue",
108
118
  "test:vue-2.7": "vue-demi-switch 2.7 vue-2.7 && vitest run --dir ./src/vue",
109
119
  "dev:test": "vitest",
120
+ "dev:test-vue": "vue-demi-switch 3 vue && vitest --dir ./src/vue",
121
+ "dev:test-vue-2": "vue-demi-switch 2 vue-2 && vitest --dir ./src/vue",
122
+ "dev:test-vue-2.7": "vue-demi-switch 2.7 vue-2.7 && vitest --dir ./src/vue",
110
123
  "release": "release-it --ci",
111
124
  "lint": "eslint . --cache --cache-location ./node_modules/.cache/eslint",
112
125
  "posttest:vue-2": "vue-demi-switch 3",
113
- "posttest:vue-2.7": "vue-demi-switch 3"
126
+ "posttest:vue-2.7": "vue-demi-switch 3",
127
+ "postdev:test-vue-2": "vue-demi-switch 3",
128
+ "postdev:test-vue-2.7": "vue-demi-switch 3"
114
129
  }
115
130
  }
package/react.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- // eslint-disable-next-line ts/ban-ts-comment, ts/prefer-ts-expect-error
1
+ // eslint-disable-next-line ts/ban-ts-comment
2
2
  // @ts-ignore
3
3
  export * from './dist/react'
package/vue.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- // eslint-disable-next-line ts/ban-ts-comment, ts/prefer-ts-expect-error
1
+ // eslint-disable-next-line ts/ban-ts-comment
2
2
  // @ts-ignore
3
3
  export * from './dist/vue'