@aomex/common-validator 3.30.8-alpha.7326d75.0 → 4.0.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/CHANGELOG.md +30 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.0.0](https://github.com/aomex/aomex/compare/v3.30.7...v4.0.0) (2026-11-17)
|
|
7
|
+
|
|
8
|
+
* chore!: 升级依赖至最新 ([9a679fa](https://github.com/aomex/aomex/commit/9a679faf0a4e2b313e8ce9081c1ecc65356b844c))
|
|
9
|
+
* feat(prisma)!: 生成 schema 并通过 definePrismaSchema 作为唯一业务入口 ([7dad8a4](https://github.com/aomex/aomex/commit/7dad8a478eaf3a9b4953aca19c5a2294986a7e36))
|
|
10
|
+
* chore!: 升级至 TypeScript 7 并将构建工具迁移到 tsdown ([a111409](https://github.com/aomex/aomex/commit/a111409021e2ee81ee5fb20ccc75480c9b5fa4c0))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **validator:** rule.enum 支持传入 TS enum / 枚举对象 ([c9ba327](https://github.com/aomex/aomex/commit/c9ba327c52d53a0339ed9d8f6795a4d843f8635b))
|
|
15
|
+
* **validator:** schema 增加 required 方法 ([003745d](https://github.com/aomex/aomex/commit/003745d655b955d951190a5bac45d189a51ef863))
|
|
16
|
+
* **validator:** validate 支持 throwOnError: false 返回 data/errors ([64975c7](https://github.com/aomex/aomex/commit/64975c7d61287009aade8b32183b6738d841715b))
|
|
17
|
+
* **validator:** 增加 rule.record 别名 ([2a70fdf](https://github.com/aomex/aomex/commit/2a70fdf07fd9ba9f2ecb1c129d6e2833d2edcb8a))
|
|
18
|
+
* **validator:** 抽出 toDocument 并为 object schema 写入 x-ref ([3dceddc](https://github.com/aomex/aomex/commit/3dceddc675eb9c15ab96794fbea744ab95d1576a))
|
|
19
|
+
* **validator:** 数组验证器增加唯一性验证 ([b0b0e4e](https://github.com/aomex/aomex/commit/b0b0e4e6e31e429881fa8c5a94eb2519b5a7c9c6))
|
|
20
|
+
* **validator:** 新增 decimal 验证器 ([defac31](https://github.com/aomex/aomex/commit/defac314df697cf5b5cc061ea4ef6ceef1a5186d))
|
|
21
|
+
* **validator:** 新增 schema() 以支持字段集派生与复用 ([83ff898](https://github.com/aomex/aomex/commit/83ff8982c81521242bd1a2835c68dd09b3175ed2))
|
|
22
|
+
* **validator:** 新增 Validator.has 探测是否包含指定验证器 ([6dc867c](https://github.com/aomex/aomex/commit/6dc867c78cda9fca7f760398f0290870ab13800c))
|
|
23
|
+
* **validator:** 添加 enum 验证器的 pick 和 omit 方法以支持值的选择与排除 ([6473fde](https://github.com/aomex/aomex/commit/6473fde4d640af7c00078b17ca3d1ed1623970f4))
|
|
24
|
+
* **validator:** 添加 LiteralValidator 支持字面量验证 ([bd50533](https://github.com/aomex/aomex/commit/bd505331c08784e974b6f0f10c877141add8c7fb))
|
|
25
|
+
* **validator:** 规则允许深度嵌套对象字面量 ([356495c](https://github.com/aomex/aomex/commit/356495cf73c0954986351bfb3f5e625f7f8fd6ff))
|
|
26
|
+
* **validator:** 验证器规则入口支持传入schema ([7f0be2e](https://github.com/aomex/aomex/commit/7f0be2e027ad8e527989850ca331cde1d31830e0))
|
|
27
|
+
|
|
28
|
+
### BREAKING CHANGES
|
|
29
|
+
|
|
30
|
+
* mongoose 最低版本为v9
|
|
31
|
+
* Node.js 最低版本提升至 `>=24.0.0`。
|
|
32
|
+
* 最低 TypeScript 版本为 7。
|
|
33
|
+
* 请改用 definePrismaSchema(generated) 获取 prismaInput/prismaOutput/prismaEnum
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
## [3.30.7](https://github.com/aomex/aomex/compare/v3.30.6...v3.30.7) (2026-11-01)
|
|
7
37
|
|
|
8
38
|
**Note:** Version bump only for package @aomex/common-validator
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aomex/common-validator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "aomex验证器",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"homepage": "https://aomex.js.org",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aomex/internal-tools": "
|
|
31
|
+
"@aomex/internal-tools": "4.0.0",
|
|
32
32
|
"decimal.js": "^10.6.0",
|
|
33
33
|
"email-validator": "^2.0.4",
|
|
34
34
|
"luxon": "^3.7.2"
|