@vue.ts/shared 1.0.0-beta.10 → 1.0.0-beta.12
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.d.mts +16 -0
- package/dist/index.mjs +14 -0
- package/package.json +9 -10
- package/dist/index.d.ts +0 -12
- package/dist/index.js +0 -6
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Defu } from "defu";
|
|
2
|
+
import { FilterPattern } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
interface BaseOptions {
|
|
6
|
+
root?: string;
|
|
7
|
+
tsconfigPath?: string;
|
|
8
|
+
include?: FilterPattern;
|
|
9
|
+
exclude?: FilterPattern;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/utils.d.ts
|
|
13
|
+
declare const normalizePath: (id: string) => string;
|
|
14
|
+
declare const createOptionsResolver: <T extends Required<BaseOptions>>(defaultOptions: T) => (rawOptions: Partial<T>) => Defu<Partial<T>, [T]>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { BaseOptions, createOptionsResolver, normalizePath };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isAbsolute, join } from "node:path";
|
|
2
|
+
import { defu } from "defu";
|
|
3
|
+
|
|
4
|
+
//#region src/utils.ts
|
|
5
|
+
const windowsPathReg = /\\/g;
|
|
6
|
+
const normalizePath = (id) => id.replace(windowsPathReg, "/");
|
|
7
|
+
const createOptionsResolver = (defaultOptions) => (rawOptions) => {
|
|
8
|
+
const mergedOptions = defu(rawOptions, defaultOptions);
|
|
9
|
+
if (!isAbsolute(mergedOptions.tsconfigPath)) mergedOptions.tsconfigPath = join(mergedOptions.root, mergedOptions.tsconfigPath);
|
|
10
|
+
return mergedOptions;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { createOptionsResolver, normalizePath };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue.ts/shared",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.12",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Shared utils used by vue.ts",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"exports": {
|
|
23
|
-
".": "./dist/index.
|
|
23
|
+
".": "./dist/index.mjs"
|
|
24
24
|
},
|
|
25
|
-
"main": "dist/index.
|
|
26
|
-
"module": "dist/index.
|
|
25
|
+
"main": "dist/index.mjs",
|
|
26
|
+
"module": "dist/index.mjs",
|
|
27
27
|
"types": "dist/index.d.ts",
|
|
28
28
|
"files": [
|
|
29
29
|
"dist"
|
|
@@ -31,12 +31,11 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"vite": "7.1.12"
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"defu": "^6.1.4"
|
|
37
36
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"unplugin": "2.3.11",
|
|
39
|
+
"vite": "7.2.4"
|
|
41
40
|
}
|
|
42
41
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FilterPattern } from "unplugin";
|
|
2
|
-
|
|
3
|
-
//#region src/types.d.ts
|
|
4
|
-
interface BaseOptions {
|
|
5
|
-
include?: FilterPattern;
|
|
6
|
-
exclude?: FilterPattern;
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region src/utils.d.ts
|
|
10
|
-
declare const normalizePath: (id: string) => string;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { BaseOptions, normalizePath };
|