@warlock.js/seal 5.15.0 → 5.17.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 +7 -0
- package/README.md +22 -0
- package/cjs/index.cjs +953 -6977
- package/cjs/index.cjs.map +1 -1
- package/cjs/object-_2YHdBxJ.cjs +613 -0
- package/cjs/object-_2YHdBxJ.cjs.map +1 -0
- package/cjs/object.cjs +10 -0
- package/cjs/required-methods-GwIEE6hP.cjs +5868 -0
- package/cjs/required-methods-GwIEE6hP.cjs.map +1 -0
- package/cjs/string-6m5Y83pJ.cjs +943 -0
- package/cjs/string-6m5Y83pJ.cjs.map +1 -0
- package/cjs/string.cjs +10 -0
- package/esm/factory/validators.d.mts +5 -0
- package/esm/factory/validators.d.mts.map +1 -1
- package/esm/factory/validators.mjs +4 -3
- package/esm/factory/validators.mjs.map +1 -1
- package/esm/helpers/index.mjs +1 -1
- package/esm/helpers/validation-helpers.mjs +1 -1
- package/esm/helpers/validation-helpers.mjs.map +1 -1
- package/esm/index.mjs +1 -1
- package/esm/object.d.mts +15 -0
- package/esm/object.d.mts.map +1 -0
- package/esm/object.mjs +13 -0
- package/esm/object.mjs.map +1 -0
- package/esm/rules/common/equals-field-rules.mjs +1 -1
- package/esm/rules/conditional/forbidden-if-rules.mjs +2 -2
- package/esm/rules/conditional/present-if-rules.mjs +2 -2
- package/esm/rules/conditional/present-unless-rules.mjs +1 -1
- package/esm/rules/conditional/present-with-rules.mjs +1 -1
- package/esm/rules/conditional/present-without-rules.mjs +1 -1
- package/esm/rules/conditional/required-if-rules.mjs +2 -2
- package/esm/rules/conditional/required-unless-rules.mjs +2 -2
- package/esm/rules/conditional/required-when-rule.mjs +1 -1
- package/esm/rules/conditional/required-with-rules.mjs +2 -2
- package/esm/rules/conditional/required-without-rules.mjs +2 -2
- package/esm/rules/core/forbidden.mjs +1 -1
- package/esm/rules/core/required.mjs +1 -1
- package/esm/rules/date/date-field-comparison-rules.mjs +1 -1
- package/esm/rules/date/date.mjs +1 -1
- package/esm/rules/file/file-size.mjs +1 -1
- package/esm/rules/scalar/accepted-rule.mjs +2 -2
- package/esm/rules/scalar/declined-rule.mjs +2 -2
- package/esm/string.d.mts +13 -0
- package/esm/string.d.mts.map +1 -0
- package/esm/string.mjs +13 -0
- package/esm/string.mjs.map +1 -0
- package/esm/types/context-types.d.mts +2 -1
- package/esm/types/context-types.d.mts.map +1 -1
- package/esm/validators/base-validator.d.mts.map +1 -1
- package/esm/validators/base-validator.mjs +0 -1
- package/esm/validators/base-validator.mjs.map +1 -1
- package/esm/validators/object-validator.d.mts.map +1 -1
- package/esm/validators/object-validator.mjs +0 -3
- package/esm/validators/object-validator.mjs.map +1 -1
- package/esm/validators/primitive-validator.mjs +0 -1
- package/esm/validators/primitive-validator.mjs.map +1 -1
- package/esm/validators/string-validator.d.mts.map +1 -1
- package/esm/validators/string-validator.mjs +2 -2
- package/esm/validators/string-validator.mjs.map +1 -1
- package/llms-full.txt +22 -0
- package/package.json +21 -1
- package/skills/seal-basics/SKILL.md +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to `@warlock.js/seal` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 5.17.0 - 2026-09-21
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Granular `@warlock.js/seal/object` and `@warlock.js/seal/string` entry points with the `object` and `string` factories for schemas that do not need the complete `v` factory.
|
|
12
|
+
- `redactValue` option on `v.validate(schema, data, options)`: when set, the `:value` placeholder renders that string instead of the submitted input, both in the attributes handed to `translateRule` and in author `errorMessage` templates. It does not cover a custom rule that concatenates raw input into its own message text. Unset keeps the current behaviour. Per-call options replace the global config, so pass `{ ...getSealConfig(), redactValue }` to keep your translators.
|
|
13
|
+
|
|
7
14
|
## 5.13.0 - 2026-09-17
|
|
8
15
|
|
|
9
16
|
### Fixed
|
package/README.md
CHANGED
|
@@ -18,6 +18,28 @@ yarn add @warlock.js/seal
|
|
|
18
18
|
pnpm add @warlock.js/seal
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
## Granular object and string entry points
|
|
22
|
+
|
|
23
|
+
When a module only needs object and string schemas, import those factories from
|
|
24
|
+
their dedicated entry points instead of the complete `v` factory:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { object } from "@warlock.js/seal/object";
|
|
28
|
+
import { string } from "@warlock.js/seal/string";
|
|
29
|
+
|
|
30
|
+
const commentSchema = object({
|
|
31
|
+
comment: string().trim().required().minLength(3),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const result = await commentSchema["~standard"].validate({
|
|
35
|
+
comment: " Hello ",
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`object` and `string` create the same schema classes with their chain methods
|
|
40
|
+
and Standard Schema bridge. Use the package-root `v` factory when the schema
|
|
41
|
+
also needs other factories.
|
|
42
|
+
|
|
21
43
|
## 🚀 Quick Start
|
|
22
44
|
|
|
23
45
|
```typescript
|