@ruan-cat/utils 4.18.0 → 4.20.0
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.ts +6 -30
- package/dist/index.js +0 -2632
- package/dist/index.js.map +1 -1
- package/dist/node-cjs/index.cjs +2 -2
- package/dist/node-cjs/index.cjs.map +1 -1
- package/dist/node-cjs/index.d.cts +17 -29
- package/dist/node-esm/index.d.ts +14 -1
- package/dist/node-esm/index.js +35 -2
- package/dist/node-esm/index.js.map +1 -1
- package/package.json +4 -3
- package/src/index.ts +0 -1
- package/src/{monorepo.ts → monorepo/index.ts} +1 -1
- package/src/node-cjs/index.ts +3 -0
- package/src/node-esm/index.ts +3 -0
- package/src/types/pnpm-workspace.yaml.shim.ts +5 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruan-cat/utils",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.0",
|
|
4
4
|
"description": "阮喵喵工具集合。默认提供js文件,也直接提供ts文件。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -67,8 +67,9 @@
|
|
|
67
67
|
"@vueuse/integrations": "^13.9.0",
|
|
68
68
|
"axios": "^1.13.2",
|
|
69
69
|
"consola": "^3.4.2",
|
|
70
|
-
"
|
|
71
|
-
"
|
|
70
|
+
"lodash-es": "^4.17.21",
|
|
71
|
+
"pnpm-workspace-yaml": "^1.4.3",
|
|
72
|
+
"tinyglobby": "^0.2.15"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"@antfu/utils": "^9.3.0",
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as fs from "node:fs";
|
|
|
3
3
|
import { globSync } from "tinyglobby";
|
|
4
4
|
import { load } from "js-yaml";
|
|
5
5
|
import { isUndefined } from "lodash-es";
|
|
6
|
-
import type { PnpmWorkspace } from "
|
|
6
|
+
import type { PnpmWorkspace } from "../types/pnpm-workspace.yaml.shim";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* 路径转换工具
|
package/src/node-cjs/index.ts
CHANGED
package/src/node-esm/index.ts
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
|
+
import type { PnpmWorkspaceYamlSchema } from "pnpm-workspace-yaml";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* pnpm-workspace.yaml 文件的类型声明
|
|
3
5
|
* @description
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* 主要是为了让该文件被解析后,能够有一个基础的类型声明
|
|
6
|
+
* 现在是 pnpm-workspace-yaml 提供的 `PnpmWorkspaceYamlSchema` 类型
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* 未来应该找到这样的类型声明库,直接复用别人的就好了,不要自己写了。
|
|
8
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/blob/main/packages/pnpm-workspace-yaml/src/index.ts#L4
|
|
11
9
|
*/
|
|
12
|
-
export
|
|
13
|
-
/**
|
|
14
|
-
* 包的匹配语法字符串
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ["packages/**", "demos/**", "utils"]
|
|
18
|
-
*/
|
|
19
|
-
packages?: string[];
|
|
20
|
-
|
|
21
|
-
catalog?: string[];
|
|
22
|
-
}
|
|
10
|
+
export type PnpmWorkspace = PnpmWorkspaceYamlSchema;
|