tanstack-query-callbacks 0.1.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.
- package/README.md +9 -1
- package/dist/{index.d.cts → core/index.d.cts} +2 -1
- package/dist/{index.d.mts → core/index.d.mts} +2 -1
- package/dist/{index.d.ts → core/index.d.ts} +2 -1
- package/dist/react/index.cjs +7 -4
- package/dist/react/index.d.cts +8 -2
- package/dist/react/index.d.mts +8 -2
- package/dist/react/index.d.ts +8 -2
- package/dist/react/index.mjs +6 -3
- package/dist/vue/index.cjs +3 -3
- package/dist/vue/index.d.cts +5 -4
- package/dist/vue/index.d.mts +5 -4
- package/dist/vue/index.d.ts +5 -4
- package/dist/vue/index.mjs +2 -2
- package/package.json +69 -42
- package/react.d.ts +1 -1
- package/vue.d.ts +1 -1
- /package/dist/{index.cjs → core/index.cjs} +0 -0
- /package/dist/{index.mjs → core/index.mjs} +0 -0
package/README.md
CHANGED
|
@@ -3,11 +3,17 @@
|
|
|
3
3
|
[![npm version][npm-version-src]][npm-version-href]
|
|
4
4
|
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
5
5
|
[![bundle][bundle-src]][bundle-href]
|
|
6
|
+
[![coverage][coverage-src]][coverage-href]
|
|
6
7
|
|
|
7
8
|
Use callbacks of query in the usual way, as before.
|
|
8
9
|
|
|
9
10
|
The tanstack/query has removed `onSuccess`, `onError` and `onSettled` from useQuery in v5. You can find more information in the [RFC](https://github.com/TanStack/query/discussions/5279).
|
|
10
11
|
|
|
12
|
+
# Features
|
|
13
|
+
|
|
14
|
+
- Support Tanstack/Query v4, v5
|
|
15
|
+
- Support Vue, React
|
|
16
|
+
|
|
11
17
|
## Instanll
|
|
12
18
|
|
|
13
19
|
```shell
|
|
@@ -21,7 +27,7 @@ pnpm add tanstack-query-callbacks
|
|
|
21
27
|
## Usage (Vue)
|
|
22
28
|
|
|
23
29
|
```vue
|
|
24
|
-
<script setup lang=ts>
|
|
30
|
+
<script setup lang="ts">
|
|
25
31
|
import { useQuery } from '@tanstack/vue-query'
|
|
26
32
|
import { useQueryCallbacks } from 'tanstack-query-callbacks/vue'
|
|
27
33
|
const queryKey = ['foo']
|
|
@@ -72,3 +78,5 @@ useQueryCallbacks({
|
|
|
72
78
|
[npm-downloads-href]: https://npmjs.com/package/tanstack-query-callbacks
|
|
73
79
|
[bundle-src]: https://img.shields.io/bundlephobia/minzip/tanstack-query-callbacks?style=flat&colorA=18181B&colorB=F0DB4F
|
|
74
80
|
[bundle-href]: https://bundlephobia.com/result?p=tanstack-query-callbacks
|
|
81
|
+
[coverage-src]: https://img.shields.io/codecov/c/gh/aa900031/tanstack-query-callbacks?token=AG56Z6EP8U&logo=codecov&color=F0DB4F
|
|
82
|
+
[coverage-href]: https://codecov.io/gh/aa900031/tanstack-query-callbacks
|
|
@@ -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 {
|
|
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 {
|
|
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 {
|
|
17
|
+
export { subscribeQueryCallbacks };
|
|
18
|
+
export type { QueryCallbacks, QueryErrorHandler, QuerySettledHandler, QuerySuccessHandler, SubscribeQueryCallbacksProps };
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const react = require('react');
|
|
4
3
|
const reactQuery = require('@tanstack/react-query');
|
|
5
|
-
const
|
|
4
|
+
const react = require('react');
|
|
5
|
+
const core_index = require('../core/index.cjs');
|
|
6
6
|
require('@tanstack/query-core');
|
|
7
7
|
|
|
8
8
|
function useQueryCallbacks(props) {
|
|
9
|
-
const queryClient = reactQuery.useQueryClient(
|
|
9
|
+
const queryClient = reactQuery.useQueryClient(
|
|
10
|
+
props.context ? { context: props.context } : props.queryClient
|
|
11
|
+
// for v5
|
|
12
|
+
);
|
|
10
13
|
react.useEffect(() => {
|
|
11
|
-
return
|
|
14
|
+
return core_index.subscribeQueryCallbacks({
|
|
12
15
|
queryClient,
|
|
13
16
|
queryKey: props.queryKey,
|
|
14
17
|
onSuccess: props.onSuccess,
|
package/dist/react/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { QueryKey, QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { Context } from 'react';
|
|
3
|
+
import { QueryCallbacks } from '../core/index.cjs';
|
|
3
4
|
import '@tanstack/query-core';
|
|
4
5
|
|
|
5
6
|
interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQueryFnData, TError> {
|
|
@@ -8,7 +9,12 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
|
|
|
8
9
|
* QueryClient instance
|
|
9
10
|
*/
|
|
10
11
|
queryClient?: QueryClient;
|
|
12
|
+
/**
|
|
13
|
+
* QueryClient context for v4
|
|
14
|
+
*/
|
|
15
|
+
context?: Context<QueryClient | undefined>;
|
|
11
16
|
}
|
|
12
17
|
declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
|
|
13
18
|
|
|
14
|
-
export {
|
|
19
|
+
export { useQueryCallbacks };
|
|
20
|
+
export type { UseQueryCallbacksProps };
|
package/dist/react/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { QueryKey, QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { Context } from 'react';
|
|
3
|
+
import { QueryCallbacks } from '../core/index.mjs';
|
|
3
4
|
import '@tanstack/query-core';
|
|
4
5
|
|
|
5
6
|
interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQueryFnData, TError> {
|
|
@@ -8,7 +9,12 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
|
|
|
8
9
|
* QueryClient instance
|
|
9
10
|
*/
|
|
10
11
|
queryClient?: QueryClient;
|
|
12
|
+
/**
|
|
13
|
+
* QueryClient context for v4
|
|
14
|
+
*/
|
|
15
|
+
context?: Context<QueryClient | undefined>;
|
|
11
16
|
}
|
|
12
17
|
declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
|
|
13
18
|
|
|
14
|
-
export {
|
|
19
|
+
export { useQueryCallbacks };
|
|
20
|
+
export type { UseQueryCallbacksProps };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { QueryKey, QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { Context } from 'react';
|
|
3
|
+
import { QueryCallbacks } from '../core/index.js';
|
|
3
4
|
import '@tanstack/query-core';
|
|
4
5
|
|
|
5
6
|
interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQueryFnData, TError> {
|
|
@@ -8,7 +9,12 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
|
|
|
8
9
|
* QueryClient instance
|
|
9
10
|
*/
|
|
10
11
|
queryClient?: QueryClient;
|
|
12
|
+
/**
|
|
13
|
+
* QueryClient context for v4
|
|
14
|
+
*/
|
|
15
|
+
context?: Context<QueryClient | undefined>;
|
|
11
16
|
}
|
|
12
17
|
declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
|
|
13
18
|
|
|
14
|
-
export {
|
|
19
|
+
export { useQueryCallbacks };
|
|
20
|
+
export type { UseQueryCallbacksProps };
|
package/dist/react/index.mjs
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { useEffect } from 'react';
|
|
2
1
|
import { useQueryClient } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { subscribeQueryCallbacks } from '../core/index.mjs';
|
|
4
4
|
import '@tanstack/query-core';
|
|
5
5
|
|
|
6
6
|
function useQueryCallbacks(props) {
|
|
7
|
-
const queryClient = useQueryClient(
|
|
7
|
+
const queryClient = useQueryClient(
|
|
8
|
+
props.context ? { context: props.context } : props.queryClient
|
|
9
|
+
// for v5
|
|
10
|
+
);
|
|
8
11
|
useEffect(() => {
|
|
9
12
|
return subscribeQueryCallbacks({
|
|
10
13
|
queryClient,
|
package/dist/vue/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const vueDemi = require('vue-demi');
|
|
4
3
|
const vueQuery = require('@tanstack/vue-query');
|
|
5
|
-
const
|
|
4
|
+
const vueDemi = require('vue-demi');
|
|
5
|
+
const core_index = require('../core/index.cjs');
|
|
6
6
|
require('@tanstack/query-core');
|
|
7
7
|
|
|
8
8
|
function useQueryCallbacks(props) {
|
|
@@ -10,7 +10,7 @@ function useQueryCallbacks(props) {
|
|
|
10
10
|
vueDemi.watch(
|
|
11
11
|
() => vueDemi.unref(props.queryKey),
|
|
12
12
|
(queryKey, _oldVal, onCleanup) => {
|
|
13
|
-
const unsubscribe =
|
|
13
|
+
const unsubscribe = core_index.subscribeQueryCallbacks({
|
|
14
14
|
queryClient,
|
|
15
15
|
queryKey,
|
|
16
16
|
onSuccess: props.onSuccess,
|
package/dist/vue/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MaybeRef } from 'vue-demi';
|
|
2
1
|
import { QueryKey, QueryClient } from '@tanstack/vue-query';
|
|
3
|
-
import {
|
|
2
|
+
import { Ref } from 'vue-demi';
|
|
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:
|
|
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 {
|
|
23
|
+
export { useQueryCallbacks };
|
|
24
|
+
export type { UseQueryCallbacksProps };
|
package/dist/vue/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MaybeRef } from 'vue-demi';
|
|
2
1
|
import { QueryKey, QueryClient } from '@tanstack/vue-query';
|
|
3
|
-
import {
|
|
2
|
+
import { Ref } from 'vue-demi';
|
|
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:
|
|
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 {
|
|
23
|
+
export { useQueryCallbacks };
|
|
24
|
+
export type { UseQueryCallbacksProps };
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MaybeRef } from 'vue-demi';
|
|
2
1
|
import { QueryKey, QueryClient } from '@tanstack/vue-query';
|
|
3
|
-
import {
|
|
2
|
+
import { Ref } from 'vue-demi';
|
|
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:
|
|
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 {
|
|
23
|
+
export { useQueryCallbacks };
|
|
24
|
+
export type { UseQueryCallbacksProps };
|
package/dist/vue/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { inject, watch, unref } from 'vue-demi';
|
|
2
1
|
import { useQueryClient } from '@tanstack/vue-query';
|
|
3
|
-
import {
|
|
2
|
+
import { inject, watch, unref } from 'vue-demi';
|
|
3
|
+
import { subscribeQueryCallbacks } from '../core/index.mjs';
|
|
4
4
|
import '@tanstack/query-core';
|
|
5
5
|
|
|
6
6
|
function useQueryCallbacks(props) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tanstack-query-callbacks",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1
|
|
5
|
-
"packageManager": "pnpm@8.10.0",
|
|
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",
|
|
@@ -15,12 +22,12 @@
|
|
|
15
22
|
"exports": {
|
|
16
23
|
".": {
|
|
17
24
|
"import": {
|
|
18
|
-
"types": "./dist/index.d.mts",
|
|
19
|
-
"default": "./dist/index.mjs"
|
|
25
|
+
"types": "./dist/core/index.d.mts",
|
|
26
|
+
"default": "./dist/core/index.mjs"
|
|
20
27
|
},
|
|
21
28
|
"require": {
|
|
22
|
-
"types": "./dist/index.d.cts",
|
|
23
|
-
"default": "./dist/index.cjs"
|
|
29
|
+
"types": "./dist/core/index.d.cts",
|
|
30
|
+
"default": "./dist/core/index.cjs"
|
|
24
31
|
}
|
|
25
32
|
},
|
|
26
33
|
"./vue": {
|
|
@@ -32,72 +39,92 @@
|
|
|
32
39
|
"require": "./dist/react/index.cjs"
|
|
33
40
|
}
|
|
34
41
|
},
|
|
35
|
-
"main": "dist/index.cjs",
|
|
36
|
-
"module": "dist/index.mjs",
|
|
37
|
-
"types": "dist/index.d.ts",
|
|
42
|
+
"main": "dist/core/index.cjs",
|
|
43
|
+
"module": "dist/core/index.mjs",
|
|
44
|
+
"types": "dist/core/index.d.ts",
|
|
38
45
|
"files": [
|
|
39
46
|
"dist",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
47
|
+
"react.d.ts",
|
|
48
|
+
"vue.d.ts"
|
|
42
49
|
],
|
|
43
50
|
"publishConfig": {
|
|
44
51
|
"access": "public"
|
|
45
52
|
},
|
|
46
53
|
"peerDependencies": {
|
|
47
|
-
"@tanstack/query-core": "^5.*",
|
|
48
|
-
"@tanstack/react-query": "^5.*",
|
|
49
|
-
"@tanstack/vue-query": "^5.*",
|
|
54
|
+
"@tanstack/query-core": "^4.* || ^5.*",
|
|
55
|
+
"@tanstack/react-query": "^4.* || ^5.*",
|
|
56
|
+
"@tanstack/vue-query": "^4.* || ^5.*",
|
|
50
57
|
"@vue/composition-api": "^1.1.0",
|
|
51
58
|
"react": "^18.0.0",
|
|
52
59
|
"vue": "^2.6.12 || ^3.2.0"
|
|
53
60
|
},
|
|
54
61
|
"peerDependenciesMeta": {
|
|
55
|
-
"@tanstack/
|
|
62
|
+
"@tanstack/react-query": {
|
|
56
63
|
"optional": true
|
|
57
64
|
},
|
|
58
|
-
"@tanstack/
|
|
65
|
+
"@tanstack/vue-query": {
|
|
59
66
|
"optional": true
|
|
60
67
|
},
|
|
61
68
|
"@vue/composition-api": {
|
|
62
69
|
"optional": true
|
|
63
70
|
},
|
|
64
|
-
"
|
|
71
|
+
"react": {
|
|
65
72
|
"optional": true
|
|
66
73
|
},
|
|
67
|
-
"
|
|
74
|
+
"vue": {
|
|
68
75
|
"optional": true
|
|
69
76
|
}
|
|
70
77
|
},
|
|
71
78
|
"devDependencies": {
|
|
72
|
-
"@aa900031/eslint-config": "^1.0
|
|
73
|
-
"@release-it/conventional-changelog": "^
|
|
74
|
-
"@tanstack/query-core": "^5.
|
|
75
|
-
"@tanstack/
|
|
76
|
-
"@tanstack/
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
81
|
-
"@
|
|
82
|
-
"@
|
|
83
|
-
"@
|
|
84
|
-
"@
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
79
|
+
"@aa900031/eslint-config": "^3.1.0",
|
|
80
|
+
"@release-it/conventional-changelog": "^9.0.4",
|
|
81
|
+
"@tanstack/query-core": "^5.72.1",
|
|
82
|
+
"@tanstack/query-core-v4": "npm:@tanstack/query-core@^4.36.1",
|
|
83
|
+
"@tanstack/react-query": "^5.72.1",
|
|
84
|
+
"@tanstack/react-query-v4": "npm:@tanstack/react-query@^4.36.1",
|
|
85
|
+
"@tanstack/vue-query": "^5.72.1",
|
|
86
|
+
"@tanstack/vue-query-v4": "npm:@tanstack/vue-query@^4.37.1",
|
|
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",
|
|
95
|
+
"@vue/composition-api": "^1.7.2",
|
|
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"
|
|
95
112
|
},
|
|
96
113
|
"scripts": {
|
|
97
114
|
"build": "unbuild",
|
|
98
115
|
"test": "vitest run --coverage",
|
|
116
|
+
"test:vue": "vue-demi-switch 3 && vitest run --dir ./src/vue",
|
|
117
|
+
"test:vue-2": "vue-demi-switch 2 vue-2 && vitest run --dir ./src/vue",
|
|
118
|
+
"test:vue-2.7": "vue-demi-switch 2.7 vue-2.7 && vitest run --dir ./src/vue",
|
|
99
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",
|
|
100
123
|
"release": "release-it --ci",
|
|
101
|
-
"lint": "eslint . --cache --cache-location ./node_modules/.cache/eslint"
|
|
124
|
+
"lint": "eslint . --cache --cache-location ./node_modules/.cache/eslint",
|
|
125
|
+
"posttest:vue-2": "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"
|
|
102
129
|
}
|
|
103
130
|
}
|
package/react.d.ts
CHANGED
package/vue.d.ts
CHANGED
|
File without changes
|
|
File without changes
|