Skip to content

Commit ca81565

Browse files
committed
release: v1.0.0-beta.4
1 parent 7e79920 commit ca81565

File tree

5 files changed

+43
-13
lines changed

5 files changed

+43
-13
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# [1.0.0-beta.4](https://github.com/pikax/vue-composable/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2020-08-15)
2+
3+
### Features
4+
5+
- **cancellablePromise:** automatically cancel promise on unmount ([#517](https://github.com/pikax/vue-composable/issues/517)) ([b18b21d](https://github.com/pikax/vue-composable/commit/b18b21da4741fc53a8755cf3a81bd3484bc93fca))
6+
- **fetch:** automatically cancel on going request on unmount ([#516](https://github.com/pikax/vue-composable/issues/516)) ([a030179](https://github.com/pikax/vue-composable/commit/a030179c472459f3d33e8f8adba3641009c8f223))
7+
- **validation:** add to $errors if the validator has $message ([#521](https://github.com/pikax/vue-composable/issues/521)) ([7e79920](https://github.com/pikax/vue-composable/commit/7e79920a9f09c5bba00a482340d0f47d665d05d8))
8+
9+
### Reverts
10+
11+
- build(deps-dev): bump @vue/\* ([6dc3650](https://github.com/pikax/vue-composable/commit/6dc3650003f5873bf316c39e4d4f6a892f09c09d))
12+
113
# [1.0.0-beta.3](https://github.com/pikax/vue-composable/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2020-07-27)
214

315
### Features

docs/api/vue-composable.api.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ export function buildI18n<
7777
I18nExtractLocale<T["messages"][T["locale"]]>
7878
>;
7979

80+
// @public (undocumented)
81+
export interface CancellablePromiseOptions extends PromiseOptions {
82+
unmountCancel?: boolean;
83+
}
84+
8085
// @public (undocumented)
8186
export interface CancellablePromiseResult<TCancel = any> {
8287
// (undocumented)
@@ -437,17 +442,29 @@ export interface i18nResult<TLocales, TMessages extends any = i18n> {
437442
}
438443

439444
// @public (undocumented)
440-
export function injectFactory<T>(
441-
key: InjectionKey<T> | string,
442-
defaultValueFactory: () => Promise<T>
443-
): Promise<T>;
445+
export function injectFactory<T, K extends Symbol | string>(
446+
key: K extends InjectionKey<any> ? never : K,
447+
defaultValueFactory: () => Promise<K extends InjectionKey<infer IK> ? IK : T>
448+
): Promise<K extends InjectionKey<infer IK> ? IK : T>;
449+
450+
// @public (undocumented)
451+
export function injectFactory<T, K extends Symbol | string>(
452+
key: K,
453+
defaultValueFactory: () => K extends InjectionKey<infer IK> ? IK : T
454+
): K extends InjectionKey<infer IK> ? IK : T;
444455

445456
// @public (undocumented)
446457
export function injectFactory<T>(
447-
key: InjectionKey<T> | string,
458+
key: InjectionKey<T> | Symbol | string,
448459
defaultValueFactory: () => T
449460
): T;
450461

462+
// @public (undocumented)
463+
export function injectFactory<T>(
464+
key: InjectionKey<T> | Symbol | string,
465+
defaultValueFactory: () => Promise<T>
466+
): Promise<T>;
467+
451468
// @public (undocumented)
452469
export interface IntersectionObserverOptions {
453470
// (undocumented)
@@ -1113,7 +1130,7 @@ export function useCancellablePromise<T extends any, TArgs extends Array<any>>(
11131130
// @public (undocumented)
11141131
export function useCancellablePromise<T extends any, TArgs extends Array<any>>(
11151132
fn: (...args: TArgs) => Promise<T>,
1116-
options: PromiseOptions
1133+
options: CancellablePromiseOptions
11171134
): PromiseResultFactory<Promise<T>, TArgs> & CancellablePromiseResult;
11181135

11191136
// @public (undocumented)
@@ -1130,7 +1147,7 @@ export function useCancellablePromise<T extends any>(
11301147
// @public (undocumented)
11311148
export function useCancellablePromise<T extends any>(
11321149
fn: () => T,
1133-
options: PromiseOptions
1150+
options: CancellablePromiseOptions
11341151
): PromiseResultFactory<Promise<T>> & CancellablePromiseResult;
11351152

11361153
// @public (undocumented)
@@ -1159,7 +1176,7 @@ export function useCancellablePromise<
11591176
TArgs extends Array<any>
11601177
>(
11611178
fn: (...args: TArgs) => T,
1162-
options: PromiseOptions
1179+
options: CancellablePromiseOptions
11631180
): PromiseResultFactory<T, TArgs> & CancellablePromiseResult;
11641181

11651182
// @public (undocumented)
@@ -1176,7 +1193,7 @@ export function useCancellablePromise<T = any>(
11761193
// @public (undocumented)
11771194
export function useCancellablePromise<T = any>(
11781195
fn: () => T,
1179-
options: PromiseOptions
1196+
options: CancellablePromiseOptions
11801197
): PromiseResultFactory<Promise<T>> & CancellablePromiseResult;
11811198

11821199
// @public (undocumented)
@@ -1337,6 +1354,7 @@ export function useFetch<T = any>(
13371354
export interface UseFetchOptions {
13381355
isJson?: boolean;
13391356
parseImmediate?: boolean;
1357+
unmountCancel?: boolean;
13401358
}
13411359

13421360
// @public

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0.0-beta.3",
2+
"version": "1.0.0-beta.4",
33
"name": "vue-composable-monorepo",
44
"workspaces": [
55
"packages/*"

packages/axios/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue-composable/axios",
3-
"version": "1.0.0-beta.3",
3+
"version": "1.0.0-beta.4",
44
"description": "@vue-composable/axios",
55
"main": "index.js",
66
"module": "dist/axios.esm-bundler.js",
@@ -44,7 +44,7 @@
4444
"vue-composable-axios-fix": "./scripts/postinstall.js"
4545
},
4646
"dependencies": {
47-
"vue-composable": "^1.0.0-beta.3"
47+
"vue-composable": "^1.0.0-beta.4"
4848
},
4949
"peerDependencies2": {
5050
"@vue/composition-api": "^1.0.0-beta.2",

packages/vue-composable/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-composable",
3-
"version": "1.0.0-beta.3",
3+
"version": "1.0.0-beta.4",
44
"description": "vue-composable",
55
"main": "index.js",
66
"module": "dist/vue-composable.esm-bundler.js",

0 commit comments

Comments
 (0)