vue-asyncx 1.11.0 → 1.11.2

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.
@@ -639,11 +639,11 @@ declare interface UseAsyncDataOptions<Fn extends BaseFunction, Shallow extends b
639
639
  * @template Shallow - 是否使用 shallowRef
640
640
  * @template AddonResults - 插件扩展的返回值
641
641
  */
642
- declare type UseAsyncDataResult<Fn extends BaseFunction, Name extends string, Shallow extends boolean = false, AddonResults extends any[] = any[]> = Simplify<UseAsyncResult<Fn, `query${Capitalize<(NonEmptyString<Name, UseAsyncDataNameDefault>)>}`, AddonResults> & {
642
+ declare type UseAsyncDataResult<Fn extends BaseFunction, Name extends string, Shallow extends boolean = false, AddonResults extends any[] = any[]> = Simplify<UseAsyncResult<Fn, `query${Capitalize<(NonEmptyString<Name, UseAsyncDataNameDefault>)>}`, []> & {
643
643
  [K in (NonEmptyString<Name, UseAsyncDataNameDefault>)]: Shallow extends true ? ShallowRef<Awaited<ReturnType<Fn>>> : Ref<Awaited<ReturnType<Fn>>>;
644
644
  } & {
645
645
  [K in `${NonEmptyString<Name, UseAsyncDataNameDefault>}Expired`]: Ref<boolean>;
646
- }>;
646
+ } & CamelReplaceKeys<MergeAddonResults<AddonResults>, Name>>;
647
647
 
648
648
  declare type UseAsyncNameDefault = 'method';
649
649
 
@@ -639,11 +639,11 @@ declare interface UseAsyncDataOptions<Fn extends BaseFunction, Shallow extends b
639
639
  * @template Shallow - 是否使用 shallowRef
640
640
  * @template AddonResults - 插件扩展的返回值
641
641
  */
642
- declare type UseAsyncDataResult<Fn extends BaseFunction, Name extends string, Shallow extends boolean = false, AddonResults extends any[] = any[]> = Simplify<UseAsyncResult<Fn, `query${Capitalize<(NonEmptyString<Name, UseAsyncDataNameDefault>)>}`, AddonResults> & {
642
+ declare type UseAsyncDataResult<Fn extends BaseFunction, Name extends string, Shallow extends boolean = false, AddonResults extends any[] = any[]> = Simplify<UseAsyncResult<Fn, `query${Capitalize<(NonEmptyString<Name, UseAsyncDataNameDefault>)>}`, []> & {
643
643
  [K in (NonEmptyString<Name, UseAsyncDataNameDefault>)]: Shallow extends true ? ShallowRef<Awaited<ReturnType<Fn>>> : Ref<Awaited<ReturnType<Fn>>>;
644
644
  } & {
645
645
  [K in `${NonEmptyString<Name, UseAsyncDataNameDefault>}Expired`]: Ref<boolean>;
646
- }>;
646
+ } & CamelReplaceKeys<MergeAddonResults<AddonResults>, Name>>;
647
647
 
648
648
  declare type UseAsyncNameDefault = 'method';
649
649
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-asyncx",
3
- "version": "1.11.0",
3
+ "version": "1.11.2",
4
4
  "description": "让异步像写诗的 Vue 3 组合式工具库",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -26,26 +26,36 @@
26
26
  },
27
27
  "scripts": {
28
28
  "test:unit:watch": "vue-demi-switch 3 && vitest",
29
- "test:unit": "pnpm run test:unit:vue3 && pnpm run test:unit:vue2",
29
+ "test:unit": "run-s test:unit:vue3 test:unit:vue2",
30
30
  "test:unit:vue3": "vue-demi-switch 3 && vitest run",
31
31
  "test:unit:vue2": "vue-demi-switch 2.7 vue2 && vitest run --mode vue2",
32
- "test:unit:coverage": "pnpm run test:unit:coverage:vue3 && pnpm run test:unit:coverage:vue2 && pnpm run test:unit:coverage:merge",
32
+ "test:unit:coverage": "run-s test:unit:coverage:vue3 test:unit:coverage:vue2 test:unit:coverage:merge",
33
33
  "test:unit:coverage:vue3": "vue-demi-switch 3 && vitest run --coverage",
34
34
  "test:unit:coverage:vue2": "vue-demi-switch 2.7 vue2 && vitest run --mode vue2 --coverage",
35
35
  "test:unit:coverage:merge": "vitest-coverage-merge coverage/vue3 coverage/vue2 -o coverage/merged",
36
- "test:browser": "run-p test:browser:vue3 test:browser:vue2",
37
- "test:browser:vue3": "vitest run -c vitest.browser.config.ts",
38
- "test:browser:vue2": "vitest run -c vitest.browser.config.ts --mode vue2",
39
- "test:e2e": "vitest run -c vitest.e2e.config.ts",
40
- "test:e2e:watch": "vitest -c vitest.e2e.config.ts",
41
- "test:all": "run-s build && run-p test:unit test:browser test:e2e",
36
+ "test:e2e:browser": "run-p test:e2e:browser:vue3 test:e2e:browser:vue2",
37
+ "test:e2e:browser:vue3": "vitest run -c vitest.e2e.browser.config.ts",
38
+ "test:e2e:browser:vue2": "vitest run -c vitest.e2e.browser.config.ts --mode vue2",
39
+ "test:e2e:node": "vitest run -c vitest.e2e.node.config.ts",
40
+ "test:e2e:node:watch": "vitest -c vitest.e2e.node.config.ts",
41
+ "test:e2e:ts": "run-s test:e2e:ts:setup test:e2e:ts:check",
42
+ "test:e2e:ts:setup": "run-p test:e2e:ts:41:setup test:e2e:ts:54:setup",
43
+ "test:e2e:ts:check": "run-p test:e2e:ts:41:check test:e2e:ts:54:check",
44
+ "test:e2e:ts:41:setup": "cd e2e/types/ts41 && pnpm i --force",
45
+ "test:e2e:ts:41:check": "cd e2e/types/ts41 && pnpm typecheck",
46
+ "test:e2e:ts:54:setup": "cd e2e/types/ts54 && pnpm i --force",
47
+ "test:e2e:ts:54:check": "cd e2e/types/ts54 && pnpm typecheck",
48
+ "run:test:e2e": "run-p test:e2e:browser test:e2e:node test:e2e:ts",
49
+ "run:build-test:e2e": "run-s run:build-pack run:test:e2e",
50
+ "test:all": "run-p test:unit run:build-test:e2e",
42
51
  "lint": "oxlint",
43
52
  "lint:fix": "oxlint --fix",
44
53
  "docs:dev": "vitepress dev docs",
45
54
  "docs:build": "vitepress build docs",
46
55
  "docs:preview": "vitepress preview docs",
56
+ "pack": "rm -rf ./dist-pack && pnpm pack --pack-destination ./dist-pack && mv ./dist-pack/*.tgz ./dist-pack/vue-asyncx.tgz",
47
57
  "build": "vite build && node scripts/post-build-dts.js",
48
- "prepublish": "pnpm run build"
58
+ "run:build-pack": "run-s build pack"
49
59
  },
50
60
  "keywords": [
51
61
  "vue",
@@ -63,7 +73,8 @@
63
73
  },
64
74
  "homepage": "https://vue-asyncx.js.org/",
65
75
  "publishConfig": {
66
- "registry": "https://registry.npmjs.org/"
76
+ "registry": "https://registry.npmjs.org/",
77
+ "provenance": true
67
78
  },
68
79
  "devDependencies": {
69
80
  "@types/node": "^22.19.1",
@@ -75,6 +86,7 @@
75
86
  "jsdom": "^24.1.1",
76
87
  "npm-run-all2": "^8.0.4",
77
88
  "oxlint": "^1.0.0",
89
+ "playwright": "^1.58.2",
78
90
  "rolldown-plugin-dts": "^0.21.8",
79
91
  "typescript": "5.9.3",
80
92
  "vite": "8.0.0-beta.18",