@warlock.js/seal 5.16.0 → 5.17.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +22 -0
  3. package/cjs/index.cjs +953 -6977
  4. package/cjs/index.cjs.map +1 -1
  5. package/cjs/object-_2YHdBxJ.cjs +613 -0
  6. package/cjs/object-_2YHdBxJ.cjs.map +1 -0
  7. package/cjs/object.cjs +10 -0
  8. package/cjs/required-methods-GwIEE6hP.cjs +5868 -0
  9. package/cjs/required-methods-GwIEE6hP.cjs.map +1 -0
  10. package/cjs/string-6m5Y83pJ.cjs +943 -0
  11. package/cjs/string-6m5Y83pJ.cjs.map +1 -0
  12. package/cjs/string.cjs +10 -0
  13. package/esm/factory/validators.d.mts +5 -0
  14. package/esm/factory/validators.d.mts.map +1 -1
  15. package/esm/factory/validators.mjs +4 -3
  16. package/esm/factory/validators.mjs.map +1 -1
  17. package/esm/helpers/index.mjs +1 -1
  18. package/esm/helpers/validation-helpers.mjs +1 -1
  19. package/esm/helpers/validation-helpers.mjs.map +1 -1
  20. package/esm/index.mjs +1 -1
  21. package/esm/object.d.mts +15 -0
  22. package/esm/object.d.mts.map +1 -0
  23. package/esm/object.mjs +13 -0
  24. package/esm/object.mjs.map +1 -0
  25. package/esm/rules/common/equals-field-rules.mjs +1 -1
  26. package/esm/rules/conditional/forbidden-if-rules.mjs +2 -2
  27. package/esm/rules/conditional/present-if-rules.mjs +2 -2
  28. package/esm/rules/conditional/present-unless-rules.mjs +1 -1
  29. package/esm/rules/conditional/present-with-rules.mjs +1 -1
  30. package/esm/rules/conditional/present-without-rules.mjs +1 -1
  31. package/esm/rules/conditional/required-if-rules.mjs +2 -2
  32. package/esm/rules/conditional/required-unless-rules.mjs +2 -2
  33. package/esm/rules/conditional/required-when-rule.mjs +1 -1
  34. package/esm/rules/conditional/required-with-rules.mjs +2 -2
  35. package/esm/rules/conditional/required-without-rules.mjs +2 -2
  36. package/esm/rules/core/forbidden.mjs +1 -1
  37. package/esm/rules/core/required.mjs +1 -1
  38. package/esm/rules/date/date-field-comparison-rules.mjs +1 -1
  39. package/esm/rules/date/date.mjs +1 -1
  40. package/esm/rules/file/file-size.mjs +1 -1
  41. package/esm/rules/scalar/accepted-rule.mjs +2 -2
  42. package/esm/rules/scalar/declined-rule.mjs +2 -2
  43. package/esm/string.d.mts +13 -0
  44. package/esm/string.d.mts.map +1 -0
  45. package/esm/string.mjs +13 -0
  46. package/esm/string.mjs.map +1 -0
  47. package/esm/types/context-types.d.mts +2 -1
  48. package/esm/types/context-types.d.mts.map +1 -1
  49. package/esm/validators/base-validator.d.mts.map +1 -1
  50. package/esm/validators/base-validator.mjs +0 -1
  51. package/esm/validators/base-validator.mjs.map +1 -1
  52. package/esm/validators/object-validator.d.mts.map +1 -1
  53. package/esm/validators/object-validator.mjs +0 -3
  54. package/esm/validators/object-validator.mjs.map +1 -1
  55. package/esm/validators/primitive-validator.mjs +0 -1
  56. package/esm/validators/primitive-validator.mjs.map +1 -1
  57. package/esm/validators/string-validator.d.mts.map +1 -1
  58. package/esm/validators/string-validator.mjs +2 -2
  59. package/esm/validators/string-validator.mjs.map +1 -1
  60. package/llms-full.txt +22 -0
  61. package/package.json +21 -1
  62. 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