@tb-dev/vue 0.1.0 → 0.1.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/dist/index.js +3 -3
- package/dist/utils/error.d.ts +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -32,9 +32,11 @@ function create() {
|
|
|
32
32
|
function set(fn) {
|
|
33
33
|
ERROR_HANDLER_FN = fn;
|
|
34
34
|
}
|
|
35
|
-
function handle(err) {
|
|
35
|
+
function handle(err, rethrow = true) {
|
|
36
36
|
if (ERROR_HANDLER_FN) {
|
|
37
37
|
void Promise.try(ERROR_HANDLER_FN, err);
|
|
38
|
+
} else if (rethrow) {
|
|
39
|
+
throw err;
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
return { get, set, handle };
|
|
@@ -113,8 +115,6 @@ function onKeyDown(key, handler, options = {}) {
|
|
|
113
115
|
stop = scope.run(() => on());
|
|
114
116
|
} else {
|
|
115
117
|
stop = on();
|
|
116
|
-
}
|
|
117
|
-
if (!detached) {
|
|
118
118
|
tryOnScopeDispose(() => stop());
|
|
119
119
|
}
|
|
120
120
|
return stop;
|
package/dist/utils/error.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MaybePromise, Option } from '@tb-dev/utils';
|
|
2
2
|
export type ErrorHandler = (err: unknown) => MaybePromise<void>;
|
|
3
|
-
export declare const getErrorHandler: () => Option<ErrorHandler>, setErrorHandler: (fn: ErrorHandler) => void, handleError: (err: unknown) => void;
|
|
3
|
+
export declare const getErrorHandler: () => Option<ErrorHandler>, setErrorHandler: (fn: ErrorHandler) => void, handleError: (err: unknown, rethrow?: boolean) => void;
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/vue",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Vue utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
8
|
-
"packageManager": "pnpm@10.7.0",
|
|
9
8
|
"funding": "https://github.com/sponsors/ferreira-tb",
|
|
10
9
|
"author": {
|
|
11
10
|
"name": "Andrew Ferreira",
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
},
|
|
15
14
|
"repository": {
|
|
16
15
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/ferreira-tb/vue-utils.git"
|
|
16
|
+
"url": "git+https://github.com/ferreira-tb/vue-utils.git"
|
|
18
17
|
},
|
|
19
18
|
"bugs": {
|
|
20
19
|
"url": "https://github.com/ferreira-tb/vue-utils/issues"
|
|
@@ -25,12 +24,6 @@
|
|
|
25
24
|
"components",
|
|
26
25
|
"composables"
|
|
27
26
|
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "vite build",
|
|
30
|
-
"format": "prettier . --write",
|
|
31
|
-
"lint": "eslint . --config eslint.config.js",
|
|
32
|
-
"type-check": "vue-tsc --noEmit"
|
|
33
|
-
},
|
|
34
27
|
"dependencies": {
|
|
35
28
|
"@tb-dev/utils": "^5.1.4",
|
|
36
29
|
"@vueuse/core": "^13.0.0",
|
|
@@ -64,5 +57,12 @@
|
|
|
64
57
|
"types": "./dist/index.d.ts",
|
|
65
58
|
"import": "./dist/index.js"
|
|
66
59
|
}
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"build": "vite build",
|
|
63
|
+
"format": "prettier . --write",
|
|
64
|
+
"lint": "eslint . --config eslint.config.js",
|
|
65
|
+
"release": "pnpm run build && pnpm publish",
|
|
66
|
+
"type-check": "vue-tsc --noEmit"
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
}
|