@oxog/vld 1.4.0 → 2.0.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 (242) hide show
  1. package/CHANGELOG.md +449 -333
  2. package/README.md +1171 -1130
  3. package/dist/chunks/bigint-ZKkWLdmi.js +1628 -0
  4. package/dist/chunks/bigint-ZKkWLdmi.js.map +1 -0
  5. package/dist/{coercion/string.js → chunks/date-7Iz2BGsL.js} +271 -5
  6. package/dist/chunks/date-7Iz2BGsL.js.map +1 -0
  7. package/dist/chunks/index-BoV-4S1F.js +894 -0
  8. package/dist/chunks/index-BoV-4S1F.js.map +1 -0
  9. package/dist/chunks/index-eWXdjyyy.js +426 -0
  10. package/dist/chunks/index-eWXdjyyy.js.map +1 -0
  11. package/dist/chunks/json-nIhyRPOU.js +1934 -0
  12. package/dist/chunks/json-nIhyRPOU.js.map +1 -0
  13. package/dist/{validators/unknown.js → chunks/unknown-CjSRcELI.js} +6 -3
  14. package/dist/chunks/unknown-CjSRcELI.js.map +1 -0
  15. package/dist/cjs/errors.cjs +387 -0
  16. package/dist/cjs/errors.cjs.map +1 -0
  17. package/dist/cjs/index.cjs +9815 -0
  18. package/dist/cjs/index.cjs.map +1 -0
  19. package/dist/cjs/locales/index.cjs +2877 -0
  20. package/dist/cjs/locales/index.cjs.map +1 -0
  21. package/dist/cjs/locales/lazy.cjs +3169 -0
  22. package/dist/cjs/locales/lazy.cjs.map +1 -0
  23. package/dist/cjs/mini.cjs +7161 -0
  24. package/dist/cjs/mini.cjs.map +1 -0
  25. package/dist/cli/bin.d.ts +8 -0
  26. package/dist/cli/bin.d.ts.map +1 -0
  27. package/dist/cli/commands/benchmark.d.ts +11 -0
  28. package/dist/cli/commands/benchmark.d.ts.map +1 -0
  29. package/dist/cli/commands/validate.d.ts +11 -0
  30. package/dist/cli/commands/validate.d.ts.map +1 -0
  31. package/dist/cli/index.d.ts +59 -0
  32. package/dist/cli/index.d.ts.map +1 -0
  33. package/dist/codecs/index.d.ts.map +1 -1
  34. package/dist/codecs/index.js +4 -256
  35. package/dist/codecs/index.js.map +1 -1
  36. package/dist/coercion/boolean.d.ts.map +1 -1
  37. package/dist/coercion/index.d.ts +11 -0
  38. package/dist/coercion/index.d.ts.map +1 -0
  39. package/dist/coercion/{bigint.js → index.js} +7 -4
  40. package/dist/coercion/index.js.map +1 -0
  41. package/dist/compat/emitter.d.ts +73 -0
  42. package/dist/compat/emitter.d.ts.map +1 -0
  43. package/dist/compat/emitter.js +181 -0
  44. package/dist/compat/emitter.js.map +1 -0
  45. package/dist/compat/index.d.ts +15 -0
  46. package/dist/compat/index.d.ts.map +1 -0
  47. package/dist/compat/result.d.ts +128 -0
  48. package/dist/compat/result.d.ts.map +1 -0
  49. package/dist/compat/result.js +171 -0
  50. package/dist/compat/result.js.map +1 -0
  51. package/dist/errors.d.ts +58 -1
  52. package/dist/errors.d.ts.map +1 -1
  53. package/dist/errors.js +106 -15
  54. package/dist/errors.js.map +1 -1
  55. package/dist/events.d.ts +140 -0
  56. package/dist/events.d.ts.map +1 -0
  57. package/dist/index.d.ts +13 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +230 -103
  60. package/dist/index.js.map +1 -1
  61. package/dist/kernel.d.ts +29 -0
  62. package/dist/kernel.d.ts.map +1 -0
  63. package/dist/kernel.js +405 -0
  64. package/dist/kernel.js.map +1 -0
  65. package/dist/locales/af.js +4 -2
  66. package/dist/locales/af.js.map +1 -1
  67. package/dist/locales/ar.js +4 -2
  68. package/dist/locales/ar.js.map +1 -1
  69. package/dist/locales/bn.js +4 -2
  70. package/dist/locales/bn.js.map +1 -1
  71. package/dist/locales/da.js +4 -2
  72. package/dist/locales/da.js.map +1 -1
  73. package/dist/locales/de.js +4 -2
  74. package/dist/locales/de.js.map +1 -1
  75. package/dist/locales/en.js +4 -2
  76. package/dist/locales/en.js.map +1 -1
  77. package/dist/locales/es-MX.js +4 -2
  78. package/dist/locales/es-MX.js.map +1 -1
  79. package/dist/locales/es.js +4 -2
  80. package/dist/locales/es.js.map +1 -1
  81. package/dist/locales/fi.js +4 -2
  82. package/dist/locales/fi.js.map +1 -1
  83. package/dist/locales/fr.js +4 -2
  84. package/dist/locales/fr.js.map +1 -1
  85. package/dist/locales/hi.js +4 -2
  86. package/dist/locales/hi.js.map +1 -1
  87. package/dist/locales/id.js +4 -2
  88. package/dist/locales/id.js.map +1 -1
  89. package/dist/locales/index.js +3 -91
  90. package/dist/locales/index.js.map +1 -1
  91. package/dist/locales/it.js +4 -2
  92. package/dist/locales/it.js.map +1 -1
  93. package/dist/locales/ja.js +4 -2
  94. package/dist/locales/ja.js.map +1 -1
  95. package/dist/locales/ko.js +4 -2
  96. package/dist/locales/ko.js.map +1 -1
  97. package/dist/locales/lazy.d.ts +111 -0
  98. package/dist/locales/lazy.d.ts.map +1 -0
  99. package/dist/locales/lazy.js +220 -0
  100. package/dist/locales/lazy.js.map +1 -0
  101. package/dist/locales/nl.js +4 -2
  102. package/dist/locales/nl.js.map +1 -1
  103. package/dist/locales/no.js +4 -2
  104. package/dist/locales/no.js.map +1 -1
  105. package/dist/locales/pl.js +4 -2
  106. package/dist/locales/pl.js.map +1 -1
  107. package/dist/locales/pt-BR.js +4 -2
  108. package/dist/locales/pt-BR.js.map +1 -1
  109. package/dist/locales/pt.js +4 -2
  110. package/dist/locales/pt.js.map +1 -1
  111. package/dist/locales/ru.js +4 -2
  112. package/dist/locales/ru.js.map +1 -1
  113. package/dist/locales/sv.js +4 -2
  114. package/dist/locales/sv.js.map +1 -1
  115. package/dist/locales/sw.js +4 -2
  116. package/dist/locales/sw.js.map +1 -1
  117. package/dist/locales/th.js +4 -2
  118. package/dist/locales/th.js.map +1 -1
  119. package/dist/locales/tr.js +4 -2
  120. package/dist/locales/tr.js.map +1 -1
  121. package/dist/locales/vi.js +4 -2
  122. package/dist/locales/vi.js.map +1 -1
  123. package/dist/locales/zh.js +4 -2
  124. package/dist/locales/zh.js.map +1 -1
  125. package/dist/logger.d.ts +94 -0
  126. package/dist/logger.d.ts.map +1 -0
  127. package/dist/mini.d.ts +182 -0
  128. package/dist/mini.d.ts.map +1 -0
  129. package/dist/mini.js +132 -0
  130. package/dist/mini.js.map +1 -0
  131. package/dist/pigment.d.ts +124 -0
  132. package/dist/pigment.d.ts.map +1 -0
  133. package/dist/pigment.js +178 -0
  134. package/dist/pigment.js.map +1 -0
  135. package/dist/plugins/index.d.ts +8 -0
  136. package/dist/plugins/index.d.ts.map +1 -0
  137. package/dist/plugins/types.d.ts +186 -0
  138. package/dist/plugins/types.d.ts.map +1 -0
  139. package/dist/utils/codec-utils.d.ts.map +1 -1
  140. package/dist/utils/ip-validation.d.ts.map +1 -1
  141. package/dist/validators/base.d.ts +3 -0
  142. package/dist/validators/base.d.ts.map +1 -1
  143. package/dist/validators/index.js +5 -45
  144. package/dist/validators/index.js.map +1 -1
  145. package/dist/validators/object.d.ts.map +1 -1
  146. package/dist/validators/template-literal.d.ts.map +1 -1
  147. package/package.json +153 -79
  148. package/dist/coercion/bigint.js.map +0 -1
  149. package/dist/coercion/boolean.js +0 -67
  150. package/dist/coercion/boolean.js.map +0 -1
  151. package/dist/coercion/date.js +0 -52
  152. package/dist/coercion/date.js.map +0 -1
  153. package/dist/coercion/number.js +0 -160
  154. package/dist/coercion/number.js.map +0 -1
  155. package/dist/coercion/string.js.map +0 -1
  156. package/dist/locales/backup-en.js +0 -105
  157. package/dist/locales/backup-en.js.map +0 -1
  158. package/dist/locales/types.js +0 -2
  159. package/dist/locales/types.js.map +0 -1
  160. package/dist/utils/codec-utils.js +0 -223
  161. package/dist/utils/codec-utils.js.map +0 -1
  162. package/dist/utils/deep-merge.js +0 -76
  163. package/dist/utils/deep-merge.js.map +0 -1
  164. package/dist/utils/ip-validation.js +0 -78
  165. package/dist/utils/ip-validation.js.map +0 -1
  166. package/dist/utils/security.js +0 -61
  167. package/dist/utils/security.js.map +0 -1
  168. package/dist/validators/any.js +0 -25
  169. package/dist/validators/any.js.map +0 -1
  170. package/dist/validators/array.js +0 -190
  171. package/dist/validators/array.js.map +0 -1
  172. package/dist/validators/base.js +0 -491
  173. package/dist/validators/base.js.map +0 -1
  174. package/dist/validators/base64.js +0 -65
  175. package/dist/validators/base64.js.map +0 -1
  176. package/dist/validators/bigint.js +0 -142
  177. package/dist/validators/bigint.js.map +0 -1
  178. package/dist/validators/boolean.js +0 -114
  179. package/dist/validators/boolean.js.map +0 -1
  180. package/dist/validators/codec.js +0 -182
  181. package/dist/validators/codec.js.map +0 -1
  182. package/dist/validators/custom.js +0 -50
  183. package/dist/validators/custom.js.map +0 -1
  184. package/dist/validators/date.js +0 -227
  185. package/dist/validators/date.js.map +0 -1
  186. package/dist/validators/discriminated-union.js +0 -98
  187. package/dist/validators/discriminated-union.js.map +0 -1
  188. package/dist/validators/enum.js +0 -82
  189. package/dist/validators/enum.js.map +0 -1
  190. package/dist/validators/file.js +0 -114
  191. package/dist/validators/file.js.map +0 -1
  192. package/dist/validators/function.js +0 -45
  193. package/dist/validators/function.js.map +0 -1
  194. package/dist/validators/hex.js +0 -62
  195. package/dist/validators/hex.js.map +0 -1
  196. package/dist/validators/intersection.js +0 -64
  197. package/dist/validators/intersection.js.map +0 -1
  198. package/dist/validators/json.js +0 -64
  199. package/dist/validators/json.js.map +0 -1
  200. package/dist/validators/lazy.js +0 -42
  201. package/dist/validators/lazy.js.map +0 -1
  202. package/dist/validators/literal.js +0 -45
  203. package/dist/validators/literal.js.map +0 -1
  204. package/dist/validators/map.js +0 -54
  205. package/dist/validators/map.js.map +0 -1
  206. package/dist/validators/nan.js +0 -32
  207. package/dist/validators/nan.js.map +0 -1
  208. package/dist/validators/never.js +0 -29
  209. package/dist/validators/never.js.map +0 -1
  210. package/dist/validators/null.js +0 -31
  211. package/dist/validators/null.js.map +0 -1
  212. package/dist/validators/number.js +0 -225
  213. package/dist/validators/number.js.map +0 -1
  214. package/dist/validators/object.js +0 -458
  215. package/dist/validators/object.js.map +0 -1
  216. package/dist/validators/record.js +0 -128
  217. package/dist/validators/record.js.map +0 -1
  218. package/dist/validators/set.js +0 -51
  219. package/dist/validators/set.js.map +0 -1
  220. package/dist/validators/string-bool.js +0 -127
  221. package/dist/validators/string-bool.js.map +0 -1
  222. package/dist/validators/string-formats.js +0 -120
  223. package/dist/validators/string-formats.js.map +0 -1
  224. package/dist/validators/string.js +0 -253
  225. package/dist/validators/string.js.map +0 -1
  226. package/dist/validators/symbol.js +0 -42
  227. package/dist/validators/symbol.js.map +0 -1
  228. package/dist/validators/template-literal.js +0 -101
  229. package/dist/validators/template-literal.js.map +0 -1
  230. package/dist/validators/tuple.js +0 -55
  231. package/dist/validators/tuple.js.map +0 -1
  232. package/dist/validators/uint8array.js +0 -98
  233. package/dist/validators/uint8array.js.map +0 -1
  234. package/dist/validators/undefined.js +0 -31
  235. package/dist/validators/undefined.js.map +0 -1
  236. package/dist/validators/union.js +0 -126
  237. package/dist/validators/union.js.map +0 -1
  238. package/dist/validators/unknown.js.map +0 -1
  239. package/dist/validators/void.js +0 -35
  240. package/dist/validators/void.js.map +0 -1
  241. package/dist/validators/xor.js +0 -64
  242. package/dist/validators/xor.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,334 +1,450 @@
1
- # Changelog
2
-
3
- All notable changes to VLD will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.4.0] - 2026-01-02
9
-
10
- ### 🚀 **Zod 4 Full API Parity Achieved**
11
- - **Complete Feature Set**: 100% Zod 4 API compatibility
12
- - **1142 Tests Passing**: Comprehensive test coverage across all features
13
- - **Production Ready**: All validators, codecs, and utilities fully tested
14
-
15
- ### New Features
16
-
17
- #### **v.cidrv6() - IPv6 CIDR Block Validator**
18
- New validator for IPv6 CIDR notation validation:
19
- - Supports full IPv6 addresses with prefix lengths (0-128)
20
- - Validates compressed IPv6 notation (`::`, `::1`, etc.)
21
- - Rejects IPv4 CIDR blocks
22
-
23
- #### **.apply() - External Function Chaining**
24
- Apply external functions to validators for advanced composition:
25
- - Enables functional composition patterns
26
- - Supports custom validation pipelines
27
- - Full TypeScript type inference
28
-
29
- #### **.safeExtend() - Type-Safe Object Extension**
30
- Safely extend object schemas without accidentally overriding existing fields:
31
- - Prevents accidental field overrides in object schemas
32
- - Clear error messages listing all conflicting keys
33
- - Supports chaining multiple safeExtend calls
34
-
35
- ### 🌍 Internationalization Updates
36
- - Added i18n messages for all new features in **27+ languages**
37
- - New messages: `stringCidrv6`, `safeExtendOverlap`
38
- - Updated all locale files with translations
39
-
40
- ### 🔧 Build System Improvements
41
- - **Fixed ESM module resolution**: Directory imports now correctly resolve to `/index.js`
42
- - **Updated fix-imports script**: Now handles directory-based imports properly
43
- - **Renamed to CommonJS**: `scripts/fix-imports.cjs` for ESM package compatibility
44
-
45
- ### 📊 Performance
46
- VLD continues to outperform Zod across all benchmarks:
47
- - **2.52x faster** average performance
48
- - **9/10 benchmark wins** vs Zod
49
- - **2.41x less memory** usage overall
50
- - **83x faster** schema creation
51
-
52
- ### 🧪 Testing
53
- - **49 test suites** - All passing
54
- - **1142 tests** - Comprehensive coverage
55
- - **TypeScript strict mode** - Full type safety verified
56
-
57
- ## [1.3.1] - 2025-11-12
58
-
59
- ### 🎯 **100% Test Success Rate Achieved**
60
- - **Perfect Test Coverage**: All 695 tests now passing (0 failures)
61
- - **IPv6 Validation Fix**: Resolved final failing test for IPv6-mapped addresses
62
- - **Security Validation**: All 4 critical security fixes thoroughly tested
63
-
64
- ### 🔧 Bug Fixes
65
- - **IPv6 Validation**: Fixed validation for IPv4-mapped IPv6 addresses (`::ffff:192.0.2.1`)
66
- - **Test Coverage**: Updated documentation to reflect 695 passing tests (up from 694)
67
-
68
- ### ✅ Quality Assurance
69
- - **100% Test Success**: Achieved perfect test success rate across all test suites
70
- - **Security Hardening**: All security vulnerabilities validated with comprehensive tests
71
- - **Performance Maintained**: No performance impact from security improvements
72
-
73
- ## [1.3.0] - 2025-11-12
74
-
75
- ### 🔒 **Critical Security Update**
76
- - **SECURITY**: Fixed 4 critical security vulnerabilities identified in comprehensive bug analysis
77
- - **Enhanced Security**: Comprehensive protection against prototype pollution, ReDoS attacks, and type safety issues
78
- - **Security-First**: All validators now include security controls while maintaining backwards compatibility
79
-
80
- ### 🛡️ Security Fixes Implemented
81
-
82
- #### **BUG-001: Union Validator Type Safety** ✅ FIXED
83
- - **Issue**: Constructor name spoofing vulnerability in union validators
84
- - **Solution**: Replaced constructor name checking with secure feature detection
85
- - **Impact**: Prevents malicious validator objects from bypassing type checks
86
- - **Location**: `src/validators/union.ts`
87
-
88
- #### **BUG-002: Prototype Pollution Prevention** FIXED
89
- - **Issue**: Prototype pollution vulnerability in codec utilities
90
- - **Solution**: Added comprehensive input validation and suspicious content detection
91
- - **Impact**: Prevents `__proto__`, `constructor`, and `prototype` pollution attacks
92
- - **Location**: `src/utils/codec-utils.ts`
93
-
94
- #### **BUG-004: IPv6 ReDoS Prevention** ✅ FIXED
95
- - **Issue**: Regular Expression Denial of Service (ReDoS) vulnerability in IPv6 validation
96
- - **Solution**: Replaced complex regex with multi-step validation approach
97
- - **Impact**: Prevents catastrophic backtracking attacks while maintaining IPv6 support
98
- - **Location**: `src/validators/string.ts`, `src/coercion/string.ts`
99
-
100
- #### **BUG-005: Safe String Coercion** ✅ FIXED
101
- - **Issue**: Unsafe type coercion without length limits or sanitization
102
- - **Solution**: Added length limits (1M characters) and control character sanitization
103
- - **Impact**: Prevents DoS attacks and information disclosure through malicious strings
104
- - **Location**: `src/coercion/string.ts`
105
-
106
- ### 📊 Quality Improvements
107
- - **Test Coverage**: Maintained excellent coverage at **96.55%** with **695 passing tests**
108
- - **Performance**: All security improvements maintain VLD's performance advantages
109
- - **Backwards Compatibility**: All changes are fully backwards compatible
110
- - **Security Testing**: Comprehensive security test suite added with 18 dedicated tests
111
-
112
- ### 🧪 Testing & Validation
113
- - **Security Test Suite**: Added comprehensive security validation tests
114
- - **Performance Tests**: Verified security fixes don't impact performance
115
- - **Integration Tests**: Validated compatibility with existing codebases
116
- - **Memory Tests**: Confirmed no memory leaks with security enhancements
117
-
118
- ### 📝 Documentation Updates
119
- - **Security Documentation**: Detailed security analysis reports created
120
- - **Bug Fix Reports**: Comprehensive documentation of all fixes implemented
121
- - **Test Coverage**: Updated coverage metrics to reflect new security tests
122
- - **README**: Updated to reflect latest test coverage and security improvements
123
-
124
- ### 🔧 Technical Details
125
- - **Zero Breaking Changes**: All security improvements are backwards compatible
126
- - **Immutable Architecture**: Security hardening maintains VLD's immutable validator pattern
127
- - **Type Safety**: Enhanced type checking without compromising TypeScript inference
128
- - **Error Handling**: Improved error messages for security-related validation failures
129
-
130
- ## [1.2.0] - 2025-08-24
131
-
132
- ### 🎯 **100% Test Success Rate Achieved**
133
- - **569 tests passing** with 0 failures across all test suites
134
- - **97.3% statement coverage** (up from 97.18%)
135
- - **93.5% branch coverage**
136
- - **96.78% function coverage**
137
- - **97.6% line coverage**
138
- - All Zod-compatible codec tests now fully passing
139
-
140
- ### 🚀 Major Features Added
141
-
142
- #### **Codec System - Bidirectional Transformations**
143
- - **NEW**: Complete codec system for bidirectional data transformations
144
- - `v.codec()` factory method for creating custom codecs
145
- - Full encode/decode support with type safety
146
- - Async codec support with `parseAsync()` and `encodeAsync()` methods
147
- - Comprehensive error handling for both directions
148
-
149
- #### **19 Built-in Zod-Compatible Codecs**
150
-
151
- **String Conversion Codecs:**
152
- - `stringToNumber` - String Number with validation
153
- - `stringToInt` - String ↔ Integer with validation
154
- - `stringToBigInt` - String BigInt conversion
155
- - `numberToBigInt` - Number ↔ BigInt conversion
156
- - `stringToBoolean` - Flexible string ↔ boolean (`'true'`, `'1'`, `'yes'`, `'on'` → `true`)
157
-
158
- **Date Conversion Codecs:**
159
- - `isoDatetimeToDate` - ISO 8601 string Date object
160
- - `epochSecondsToDate` - Unix seconds ↔ Date object
161
- - `epochMillisToDate` - Unix milliseconds ↔ Date object
162
-
163
- **JSON and Complex Data:**
164
- - `jsonCodec()` - Generic JSON string ↔ any type
165
- - `base64Json()` - Base64-encoded JSON with schema validation
166
- - `jwtPayload()` - JWT payload decoder (read-only)
167
-
168
- **URL and Web:**
169
- - `stringToURL` - String URL object
170
- - `stringToHttpURL` - HTTP/HTTPS URL validation and conversion
171
- - `uriComponent` - URI component encode/decode
172
-
173
- **Binary Data:**
174
- - `base64ToBytes` - Base64 ↔ Uint8Array
175
- - `base64urlToBytes` - URL-safe Base64 Uint8Array
176
- - `hexToBytes` - Hexadecimal Uint8Array
177
- - `utf8ToBytes` - UTF-8 string Uint8Array
178
- - `bytesToUtf8` - Uint8Array UTF-8 string
179
-
180
- #### **New Validator Types**
181
- - `v.base64()` - Base64 string validation with URL-safe mode
182
- - `v.hex()` - Hexadecimal string validation with lowercase mode
183
- - `v.uint8Array()` - Uint8Array validation with length constraints
184
-
185
- #### **Enhanced Utilities**
186
- - Comprehensive codec utility functions in `codec-utils.ts`
187
- - Cross-platform Base64 encoding/decoding (Node.js + Browser)
188
- - Secure error handling for all codec operations
189
-
190
- ### 📚 Documentation Updates
191
- - **README.md**: Comprehensive codec documentation with examples
192
- - **API.md**: Complete codec API reference with TypeScript examples
193
- - **New Examples**:
194
- - `examples/codecs.js` - JavaScript codec examples
195
- - `examples/codecs.ts` - TypeScript codec examples with full type safety
196
- - Updated CLAUDE.md with codec development guidance
197
-
198
- ### 🔧 Technical Improvements
199
- - **Zero Circular Dependencies**: Refactored codec architecture
200
- - **Full Type Safety**: Complete TypeScript support with inference
201
- - **97.3% Test Coverage**: Comprehensive test suite with 569 passing tests
202
- - **Error Message Localization**: All codec errors support 27+ languages
203
-
204
- ### 🎯 Zod Compatibility
205
- - **100% Zod Codec Parity**: All Zod codecs implemented and compatible
206
- - **Beyond Zod**: Additional codecs not available in Zod
207
- - **Drop-in Replacement**: Seamless migration path from Zod codecs
208
-
209
- ### Performance
210
- - **Optimized Transformations**: Efficient bidirectional conversions
211
- - **Memory Efficient**: Immutable codec architecture prevents leaks
212
- - **Async Support**: Non-blocking operations for I/O-bound transformations
213
-
214
- ## [1.1.1] - 2025-08-18
215
-
216
- ### Security
217
- - **CRITICAL**: Fixed prototype pollution vulnerability in VldObject passthrough mode
218
- - Added protection against `__proto__`, `constructor`, and `prototype` key pollution
219
- - Comprehensive security test suite added
220
-
221
- ### Fixed
222
- - Removed unnecessary escape characters in regex patterns (URL validation)
223
- - Fixed escape characters in locale files (Afrikaans)
224
- - Added ESLint configuration for code quality
225
-
226
- ### Added
227
- - Security test suite with prototype pollution prevention tests
228
- - Coverage improvement tests for better code quality
229
- - ESLint configuration with TypeScript support
230
-
231
- ### Changed
232
- - Improved test coverage to 97.1% statements
233
- - All linting issues resolved
234
-
235
- ## [1.1.0] - 2025-08-12
236
-
237
- ### Added
238
- - Professional benchmark suite with real-world performance testing
239
- - `benchmarks/quick-bench.cjs` - Fast performance comparison
240
- - `benchmarks/memory.cjs` - Memory usage analysis
241
- - `benchmarks/startup.cjs` - Startup time comparison
242
- - `benchmarks/performance.cjs` - Comprehensive benchmark suite
243
- - Complete documentation overhaul in `/docs` folder:
244
- - `API.md` - Full API reference with all methods and examples
245
- - `GETTING_STARTED.md` - Beginner-friendly guide
246
- - `MIGRATION.md` - Step-by-step Zod to VLD migration
247
- - `PERFORMANCE.md` - Performance optimization guide
248
- - `ADVANCED_FEATURES.md` - Deep dive into advanced features
249
-
250
- ### Changed
251
- - Updated README with accurate benchmark results showing 2.07x average improvement
252
- - All documentation converted to English
253
- - Improved build process with automatic ES module import fixes
254
- - Test coverage increased to 99.5%
255
- - Cleaned up project structure for better maintainability
256
-
257
- ### Removed
258
- - Deleted `coverage/` folder (unnecessary for npm package)
259
- - Removed 12 old benchmark files
260
- - Cleaned up `src/errors/` and `src/types/` folders
261
- - Removed redundant test files focused on coverage metrics
262
- - Deleted unnecessary example files
263
-
264
- ### Fixed
265
- - Fixed ES module import issues with `.js` extension resolver
266
- - Resolved CommonJS compatibility for benchmark files
267
- - Fixed all TypeScript compilation errors
268
- - Corrected package.json export configurations
269
-
270
- ### Performance
271
- - Memory usage: 86% less than Zod
272
- - Startup time: 1.94x faster
273
- - Schema creation: 8.22x faster
274
- - Overall performance: 2.07x faster average
275
-
276
- ## [1.0.0] - 2025-08-11
277
-
278
- ### Initial Release
279
-
280
- #### Core Features
281
- - **Blazing Fast Performance**: 2-4x faster than Zod in most operations
282
- - **Zero Dependencies**: Lightweight with no external packages
283
- - **Full TypeScript Support**: Excellent type inference and IntelliSense
284
- - **Zod API Compatibility**: Drop-in replacement with identical API
285
- - **Tree-Shakeable**: Only import what you need
286
-
287
- #### Validation Types
288
- - **Primitives**: string, number, boolean, bigint, symbol, date, undefined, null, void, any, unknown, never
289
- - **Collections**: array, tuple, object, record, map, set
290
- - **Compositions**: union, intersection, literal, enum
291
- - **Modifiers**: optional, nullable, nullish, default, catch
292
-
293
- #### Advanced Features
294
- - **Type Coercion**: Automatic type conversion for common cases
295
- - **Custom Validation**: `refine()` and `superRefine()` for custom logic
296
- - **Data Transformation**: `transform()` for post-validation processing
297
- - **Object Utilities**: `pick()`, `omit()`, `extend()`, `merge()`, `partial()`
298
- - **Error Formatting**: Tree, pretty, and flatten utilities
299
-
300
- #### Internationalization
301
- - Built-in support for 27+ languages
302
- - Easy locale switching with `setLocale()`
303
- - Comprehensive translation coverage
304
-
305
- #### String Validators
306
- - Email, URL, UUID validation
307
- - IP address (v4/v6) validation
308
- - Regex pattern matching
309
- - Length constraints (min, max, length)
310
- - Content checks (includes, startsWith, endsWith)
311
- - Transformations (trim, toLowerCase, toUpperCase)
312
-
313
- #### Number Validators
314
- - Range validation (min, max)
315
- - Type constraints (int, positive, negative, finite, safe)
316
- - Mathematical checks (multipleOf)
317
-
318
- #### Performance Optimizations
319
- - Optimized for V8 JavaScript engine
320
- - Minimal memory allocations
321
- - Fast-path optimizations for common cases
322
- - Immutable validators prevent memory leaks
323
- - Pre-computed validation strategies
324
-
325
- #### Developer Experience
326
- - Clear, actionable error messages
327
- - Comprehensive test suite (99.5% coverage)
328
- - Extensive documentation and examples
329
- - TypeScript-first design
330
- - Intuitive, chainable API
331
-
332
- ---
333
-
1
+ # Changelog
2
+
3
+ All notable changes to VLD will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.0.1] - 2026-01-25
9
+
10
+ ### 🧪 Test Coverage Improvements
11
+ - **99.23% Statement Coverage**: Up from previous release
12
+ - **1,858 Tests Passing**: Comprehensive test suite with 100% success rate
13
+ - **Coverage Gap Tests**: Added dedicated test file for edge cases
14
+
15
+ ### 🔧 Bug Fixes
16
+ - Fixed TypeScript errors in test files
17
+ - Fixed lazy locale loader edge cases
18
+ - Improved codec error handling tests
19
+
20
+ ### 📚 Documentation
21
+ - Updated version references across documentation
22
+ - Improved test coverage documentation
23
+
24
+ ---
25
+
26
+ ## [2.0.0] - 2026-01-20
27
+
28
+ ### 🚀 **Major Release - Modular Architecture**
29
+
30
+ This release introduces a completely new modular architecture for better tree-shaking, lazy locale loading, and dual ESM/CJS support.
31
+
32
+ ### New Features
33
+
34
+ #### **Tree-Shakable Mini API** (`@oxog/vld/mini`)
35
+ New functional API that enables proper tree-shaking:
36
+ ```typescript
37
+ import { string, number, object, optional } from '@oxog/vld/mini';
38
+
39
+ const schema = object({
40
+ name: string().min(1),
41
+ age: optional(number().positive()),
42
+ });
43
+ ```
44
+ - **82% bundle size reduction** when using only needed validators
45
+ - Individual factory functions instead of monolithic `v` object
46
+ - Full TypeScript support with identical type inference
47
+
48
+ #### **Lazy Locale Loading** (`@oxog/vld/locales`)
49
+ Async locale loading to reduce initial bundle size:
50
+ ```typescript
51
+ import { setLocaleAsync } from '@oxog/vld/locales';
52
+ await setLocaleAsync('tr'); // Loads Turkish on demand
53
+ ```
54
+ - **92% bundle reduction** - Only English bundled by default
55
+ - `preloadLocales()` for SSR/batch loading
56
+ - `registerLocale()` for static imports
57
+ - Full backwards compatibility with existing `setLocale()`
58
+
59
+ #### **Dual ESM/CJS Build System**
60
+ - ESM builds for modern bundlers (Vite, esbuild, webpack 5+)
61
+ - CJS builds for Node.js and legacy environments
62
+ - Proper `exports` field in package.json with conditional exports
63
+
64
+ #### **New Coercion Module** (`@oxog/vld/coercion`)
65
+ Dedicated coercion validators export:
66
+ ```typescript
67
+ import { VldCoerceString, VldCoerceNumber } from '@oxog/vld/coercion';
68
+ ```
69
+
70
+ ### 📦 Package Exports
71
+
72
+ New conditional exports for optimal imports:
73
+ ```json
74
+ {
75
+ "@oxog/vld": "Full API (backwards compatible)",
76
+ "@oxog/vld/mini": "Tree-shakable functional API",
77
+ "@oxog/vld/locales": "Lazy locale loader",
78
+ "@oxog/vld/locales/*": "Individual locale files",
79
+ "@oxog/vld/validators/*": "Individual validators",
80
+ "@oxog/vld/codecs": "Codec utilities",
81
+ "@oxog/vld/errors": "Error formatting utilities"
82
+ }
83
+ ```
84
+
85
+ ### 🔧 Build System Changes
86
+ - Migrated to Rollup with `@rollup/plugin-typescript`
87
+ - Removed duplicate `rollup-plugin-typescript2`
88
+ - Added `tsconfig.build.json` for type declarations
89
+ - Inline dynamic imports for CJS lazy locale build
90
+
91
+ ### 📊 Bundle Size Comparison
92
+
93
+ | Scenario | v1.x | v2.0 | Improvement |
94
+ |----------|------|------|-------------|
95
+ | Full API import | 45KB | 45KB | - |
96
+ | Mini API (string + object) | 45KB | ~8KB | **82%** |
97
+ | Single validator | 45KB | ~3KB | **93%** |
98
+ | With 1 locale only | 108KB+ | ~8KB | **92%** |
99
+
100
+ ### 🧪 Testing
101
+ - **1,858 tests** - All passing
102
+ - **99.23% coverage** - Comprehensive test suite
103
+ - Added tests for mini API, lazy locales, and coverage gaps
104
+
105
+ ### ⚠️ Migration Guide
106
+
107
+ **No breaking changes** - v2.0 is fully backwards compatible:
108
+
109
+ ```typescript
110
+ // Old way (still works)
111
+ import { v, setLocale } from '@oxog/vld';
112
+ setLocale('tr');
113
+ const schema = v.string().min(1);
114
+
115
+ // New way (tree-shakable)
116
+ import { string } from '@oxog/vld/mini';
117
+ import { setLocaleAsync } from '@oxog/vld/locales';
118
+ await setLocaleAsync('tr');
119
+ const schema = string().min(1);
120
+ ```
121
+
122
+ ---
123
+
124
+ ## [1.4.0] - 2026-01-02
125
+
126
+ ### 🚀 **Zod 4 Full API Parity Achieved**
127
+ - **Complete Feature Set**: 100% Zod 4 API compatibility
128
+ - **1142 Tests Passing**: Comprehensive test coverage across all features
129
+ - **Production Ready**: All validators, codecs, and utilities fully tested
130
+
131
+ ### ✨ New Features
132
+
133
+ #### **v.cidrv6() - IPv6 CIDR Block Validator**
134
+ New validator for IPv6 CIDR notation validation:
135
+ - Supports full IPv6 addresses with prefix lengths (0-128)
136
+ - Validates compressed IPv6 notation (`::`, `::1`, etc.)
137
+ - Rejects IPv4 CIDR blocks
138
+
139
+ #### **.apply() - External Function Chaining**
140
+ Apply external functions to validators for advanced composition:
141
+ - Enables functional composition patterns
142
+ - Supports custom validation pipelines
143
+ - Full TypeScript type inference
144
+
145
+ #### **.safeExtend() - Type-Safe Object Extension**
146
+ Safely extend object schemas without accidentally overriding existing fields:
147
+ - Prevents accidental field overrides in object schemas
148
+ - Clear error messages listing all conflicting keys
149
+ - Supports chaining multiple safeExtend calls
150
+
151
+ ### 🌍 Internationalization Updates
152
+ - Added i18n messages for all new features in **27+ languages**
153
+ - New messages: `stringCidrv6`, `safeExtendOverlap`
154
+ - Updated all locale files with translations
155
+
156
+ ### 🔧 Build System Improvements
157
+ - **Fixed ESM module resolution**: Directory imports now correctly resolve to `/index.js`
158
+ - **Updated fix-imports script**: Now handles directory-based imports properly
159
+ - **Renamed to CommonJS**: `scripts/fix-imports.cjs` for ESM package compatibility
160
+
161
+ ### 📊 Performance
162
+ VLD continues to outperform Zod across all benchmarks:
163
+ - **2.52x faster** average performance
164
+ - **9/10 benchmark wins** vs Zod
165
+ - **2.41x less memory** usage overall
166
+ - **83x faster** schema creation
167
+
168
+ ### 🧪 Testing
169
+ - **49 test suites** - All passing
170
+ - **1142 tests** - Comprehensive coverage
171
+ - **TypeScript strict mode** - Full type safety verified
172
+
173
+ ## [1.3.1] - 2025-11-12
174
+
175
+ ### 🎯 **100% Test Success Rate Achieved**
176
+ - **Perfect Test Coverage**: All 695 tests now passing (0 failures)
177
+ - **IPv6 Validation Fix**: Resolved final failing test for IPv6-mapped addresses
178
+ - **Security Validation**: All 4 critical security fixes thoroughly tested
179
+
180
+ ### 🔧 Bug Fixes
181
+ - **IPv6 Validation**: Fixed validation for IPv4-mapped IPv6 addresses (`::ffff:192.0.2.1`)
182
+ - **Test Coverage**: Updated documentation to reflect 695 passing tests (up from 694)
183
+
184
+ ### ✅ Quality Assurance
185
+ - **100% Test Success**: Achieved perfect test success rate across all test suites
186
+ - **Security Hardening**: All security vulnerabilities validated with comprehensive tests
187
+ - **Performance Maintained**: No performance impact from security improvements
188
+
189
+ ## [1.3.0] - 2025-11-12
190
+
191
+ ### 🔒 **Critical Security Update**
192
+ - **SECURITY**: Fixed 4 critical security vulnerabilities identified in comprehensive bug analysis
193
+ - **Enhanced Security**: Comprehensive protection against prototype pollution, ReDoS attacks, and type safety issues
194
+ - **Security-First**: All validators now include security controls while maintaining backwards compatibility
195
+
196
+ ### 🛡️ Security Fixes Implemented
197
+
198
+ #### **BUG-001: Union Validator Type Safety** ✅ FIXED
199
+ - **Issue**: Constructor name spoofing vulnerability in union validators
200
+ - **Solution**: Replaced constructor name checking with secure feature detection
201
+ - **Impact**: Prevents malicious validator objects from bypassing type checks
202
+ - **Location**: `src/validators/union.ts`
203
+
204
+ #### **BUG-002: Prototype Pollution Prevention** ✅ FIXED
205
+ - **Issue**: Prototype pollution vulnerability in codec utilities
206
+ - **Solution**: Added comprehensive input validation and suspicious content detection
207
+ - **Impact**: Prevents `__proto__`, `constructor`, and `prototype` pollution attacks
208
+ - **Location**: `src/utils/codec-utils.ts`
209
+
210
+ #### **BUG-004: IPv6 ReDoS Prevention** ✅ FIXED
211
+ - **Issue**: Regular Expression Denial of Service (ReDoS) vulnerability in IPv6 validation
212
+ - **Solution**: Replaced complex regex with multi-step validation approach
213
+ - **Impact**: Prevents catastrophic backtracking attacks while maintaining IPv6 support
214
+ - **Location**: `src/validators/string.ts`, `src/coercion/string.ts`
215
+
216
+ #### **BUG-005: Safe String Coercion** ✅ FIXED
217
+ - **Issue**: Unsafe type coercion without length limits or sanitization
218
+ - **Solution**: Added length limits (1M characters) and control character sanitization
219
+ - **Impact**: Prevents DoS attacks and information disclosure through malicious strings
220
+ - **Location**: `src/coercion/string.ts`
221
+
222
+ ### 📊 Quality Improvements
223
+ - **Test Coverage**: Maintained excellent coverage at **96.55%** with **695 passing tests**
224
+ - **Performance**: All security improvements maintain VLD's performance advantages
225
+ - **Backwards Compatibility**: All changes are fully backwards compatible
226
+ - **Security Testing**: Comprehensive security test suite added with 18 dedicated tests
227
+
228
+ ### 🧪 Testing & Validation
229
+ - **Security Test Suite**: Added comprehensive security validation tests
230
+ - **Performance Tests**: Verified security fixes don't impact performance
231
+ - **Integration Tests**: Validated compatibility with existing codebases
232
+ - **Memory Tests**: Confirmed no memory leaks with security enhancements
233
+
234
+ ### 📝 Documentation Updates
235
+ - **Security Documentation**: Detailed security analysis reports created
236
+ - **Bug Fix Reports**: Comprehensive documentation of all fixes implemented
237
+ - **Test Coverage**: Updated coverage metrics to reflect new security tests
238
+ - **README**: Updated to reflect latest test coverage and security improvements
239
+
240
+ ### 🔧 Technical Details
241
+ - **Zero Breaking Changes**: All security improvements are backwards compatible
242
+ - **Immutable Architecture**: Security hardening maintains VLD's immutable validator pattern
243
+ - **Type Safety**: Enhanced type checking without compromising TypeScript inference
244
+ - **Error Handling**: Improved error messages for security-related validation failures
245
+
246
+ ## [1.2.0] - 2025-08-24
247
+
248
+ ### 🎯 **100% Test Success Rate Achieved**
249
+ - **569 tests passing** with 0 failures across all test suites
250
+ - **97.3% statement coverage** (up from 97.18%)
251
+ - **93.5% branch coverage**
252
+ - **96.78% function coverage**
253
+ - **97.6% line coverage**
254
+ - All Zod-compatible codec tests now fully passing
255
+
256
+ ### 🚀 Major Features Added
257
+
258
+ #### **Codec System - Bidirectional Transformations**
259
+ - **NEW**: Complete codec system for bidirectional data transformations
260
+ - `v.codec()` factory method for creating custom codecs
261
+ - Full encode/decode support with type safety
262
+ - Async codec support with `parseAsync()` and `encodeAsync()` methods
263
+ - Comprehensive error handling for both directions
264
+
265
+ #### **19 Built-in Zod-Compatible Codecs**
266
+
267
+ **String Conversion Codecs:**
268
+ - `stringToNumber` - String ↔ Number with validation
269
+ - `stringToInt` - String ↔ Integer with validation
270
+ - `stringToBigInt` - String ↔ BigInt conversion
271
+ - `numberToBigInt` - Number BigInt conversion
272
+ - `stringToBoolean` - Flexible string ↔ boolean (`'true'`, `'1'`, `'yes'`, `'on'` → `true`)
273
+
274
+ **Date Conversion Codecs:**
275
+ - `isoDatetimeToDate` - ISO 8601 string ↔ Date object
276
+ - `epochSecondsToDate` - Unix seconds ↔ Date object
277
+ - `epochMillisToDate` - Unix milliseconds ↔ Date object
278
+
279
+ **JSON and Complex Data:**
280
+ - `jsonCodec()` - Generic JSON string ↔ any type
281
+ - `base64Json()` - Base64-encoded JSON with schema validation
282
+ - `jwtPayload()` - JWT payload decoder (read-only)
283
+
284
+ **URL and Web:**
285
+ - `stringToURL` - String URL object
286
+ - `stringToHttpURL` - HTTP/HTTPS URL validation and conversion
287
+ - `uriComponent` - URI component encode/decode
288
+
289
+ **Binary Data:**
290
+ - `base64ToBytes` - Base64 Uint8Array
291
+ - `base64urlToBytes` - URL-safe Base64 Uint8Array
292
+ - `hexToBytes` - Hexadecimal ↔ Uint8Array
293
+ - `utf8ToBytes` - UTF-8 string ↔ Uint8Array
294
+ - `bytesToUtf8` - Uint8Array UTF-8 string
295
+
296
+ #### **New Validator Types**
297
+ - `v.base64()` - Base64 string validation with URL-safe mode
298
+ - `v.hex()` - Hexadecimal string validation with lowercase mode
299
+ - `v.uint8Array()` - Uint8Array validation with length constraints
300
+
301
+ #### **Enhanced Utilities**
302
+ - Comprehensive codec utility functions in `codec-utils.ts`
303
+ - Cross-platform Base64 encoding/decoding (Node.js + Browser)
304
+ - Secure error handling for all codec operations
305
+
306
+ ### 📚 Documentation Updates
307
+ - **README.md**: Comprehensive codec documentation with examples
308
+ - **API.md**: Complete codec API reference with TypeScript examples
309
+ - **New Examples**:
310
+ - `examples/codecs.js` - JavaScript codec examples
311
+ - `examples/codecs.ts` - TypeScript codec examples with full type safety
312
+ - Updated CLAUDE.md with codec development guidance
313
+
314
+ ### 🔧 Technical Improvements
315
+ - **Zero Circular Dependencies**: Refactored codec architecture
316
+ - **Full Type Safety**: Complete TypeScript support with inference
317
+ - **97.3% Test Coverage**: Comprehensive test suite with 569 passing tests
318
+ - **Error Message Localization**: All codec errors support 27+ languages
319
+
320
+ ### 🎯 Zod Compatibility
321
+ - **100% Zod Codec Parity**: All Zod codecs implemented and compatible
322
+ - **Beyond Zod**: Additional codecs not available in Zod
323
+ - **Drop-in Replacement**: Seamless migration path from Zod codecs
324
+
325
+ ### Performance
326
+ - **Optimized Transformations**: Efficient bidirectional conversions
327
+ - **Memory Efficient**: Immutable codec architecture prevents leaks
328
+ - **Async Support**: Non-blocking operations for I/O-bound transformations
329
+
330
+ ## [1.1.1] - 2025-08-18
331
+
332
+ ### Security
333
+ - **CRITICAL**: Fixed prototype pollution vulnerability in VldObject passthrough mode
334
+ - Added protection against `__proto__`, `constructor`, and `prototype` key pollution
335
+ - Comprehensive security test suite added
336
+
337
+ ### Fixed
338
+ - Removed unnecessary escape characters in regex patterns (URL validation)
339
+ - Fixed escape characters in locale files (Afrikaans)
340
+ - Added ESLint configuration for code quality
341
+
342
+ ### Added
343
+ - Security test suite with prototype pollution prevention tests
344
+ - Coverage improvement tests for better code quality
345
+ - ESLint configuration with TypeScript support
346
+
347
+ ### Changed
348
+ - Improved test coverage to 97.1% statements
349
+ - All linting issues resolved
350
+
351
+ ## [1.1.0] - 2025-08-12
352
+
353
+ ### Added
354
+ - Professional benchmark suite with real-world performance testing
355
+ - `benchmarks/quick-bench.cjs` - Fast performance comparison
356
+ - `benchmarks/memory.cjs` - Memory usage analysis
357
+ - `benchmarks/startup.cjs` - Startup time comparison
358
+ - `benchmarks/performance.cjs` - Comprehensive benchmark suite
359
+ - Complete documentation overhaul in `/docs` folder:
360
+ - `API.md` - Full API reference with all methods and examples
361
+ - `GETTING_STARTED.md` - Beginner-friendly guide
362
+ - `MIGRATION.md` - Step-by-step Zod to VLD migration
363
+ - `PERFORMANCE.md` - Performance optimization guide
364
+ - `ADVANCED_FEATURES.md` - Deep dive into advanced features
365
+
366
+ ### Changed
367
+ - Updated README with accurate benchmark results showing 2.07x average improvement
368
+ - All documentation converted to English
369
+ - Improved build process with automatic ES module import fixes
370
+ - Test coverage increased to 99.5%
371
+ - Cleaned up project structure for better maintainability
372
+
373
+ ### Removed
374
+ - Deleted `coverage/` folder (unnecessary for npm package)
375
+ - Removed 12 old benchmark files
376
+ - Cleaned up `src/errors/` and `src/types/` folders
377
+ - Removed redundant test files focused on coverage metrics
378
+ - Deleted unnecessary example files
379
+
380
+ ### Fixed
381
+ - Fixed ES module import issues with `.js` extension resolver
382
+ - Resolved CommonJS compatibility for benchmark files
383
+ - Fixed all TypeScript compilation errors
384
+ - Corrected package.json export configurations
385
+
386
+ ### Performance
387
+ - Memory usage: 86% less than Zod
388
+ - Startup time: 1.94x faster
389
+ - Schema creation: 8.22x faster
390
+ - Overall performance: 2.07x faster average
391
+
392
+ ## [1.0.0] - 2025-08-11
393
+
394
+ ### Initial Release
395
+
396
+ #### Core Features
397
+ - **Blazing Fast Performance**: 2-4x faster than Zod in most operations
398
+ - **Zero Dependencies**: Lightweight with no external packages
399
+ - **Full TypeScript Support**: Excellent type inference and IntelliSense
400
+ - **Zod API Compatibility**: Drop-in replacement with identical API
401
+ - **Tree-Shakeable**: Only import what you need
402
+
403
+ #### Validation Types
404
+ - **Primitives**: string, number, boolean, bigint, symbol, date, undefined, null, void, any, unknown, never
405
+ - **Collections**: array, tuple, object, record, map, set
406
+ - **Compositions**: union, intersection, literal, enum
407
+ - **Modifiers**: optional, nullable, nullish, default, catch
408
+
409
+ #### Advanced Features
410
+ - **Type Coercion**: Automatic type conversion for common cases
411
+ - **Custom Validation**: `refine()` and `superRefine()` for custom logic
412
+ - **Data Transformation**: `transform()` for post-validation processing
413
+ - **Object Utilities**: `pick()`, `omit()`, `extend()`, `merge()`, `partial()`
414
+ - **Error Formatting**: Tree, pretty, and flatten utilities
415
+
416
+ #### Internationalization
417
+ - Built-in support for 27+ languages
418
+ - Easy locale switching with `setLocale()`
419
+ - Comprehensive translation coverage
420
+
421
+ #### String Validators
422
+ - Email, URL, UUID validation
423
+ - IP address (v4/v6) validation
424
+ - Regex pattern matching
425
+ - Length constraints (min, max, length)
426
+ - Content checks (includes, startsWith, endsWith)
427
+ - Transformations (trim, toLowerCase, toUpperCase)
428
+
429
+ #### Number Validators
430
+ - Range validation (min, max)
431
+ - Type constraints (int, positive, negative, finite, safe)
432
+ - Mathematical checks (multipleOf)
433
+
434
+ #### Performance Optimizations
435
+ - Optimized for V8 JavaScript engine
436
+ - Minimal memory allocations
437
+ - Fast-path optimizations for common cases
438
+ - Immutable validators prevent memory leaks
439
+ - Pre-computed validation strategies
440
+
441
+ #### Developer Experience
442
+ - Clear, actionable error messages
443
+ - Comprehensive test suite (99.5% coverage)
444
+ - Extensive documentation and examples
445
+ - TypeScript-first design
446
+ - Intuitive, chainable API
447
+
448
+ ---
449
+
334
450
  For more details, see the [GitHub Releases](https://github.com/ersinkoc/vld/releases)