sibyl-ts 0.3.0 → 0.4.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.
- package/CHANGELOG.md +71 -44
- package/LICENSE +15 -15
- package/README.md +749 -633
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/validators/index.d.ts +2 -0
- package/dist/cjs/validators/index.d.ts.map +1 -1
- package/dist/cjs/validators/index.js +2 -0
- package/dist/cjs/validators/index.js.map +1 -1
- package/dist/cjs/validators/nil.d.ts +3 -0
- package/dist/cjs/validators/nil.d.ts.map +1 -0
- package/dist/cjs/validators/nil.js +24 -0
- package/dist/cjs/validators/nil.js.map +1 -0
- package/dist/cjs/validators/undef.d.ts +3 -0
- package/dist/cjs/validators/undef.d.ts.map +1 -0
- package/dist/cjs/validators/undef.js +24 -0
- package/dist/cjs/validators/undef.js.map +1 -0
- package/dist/esm/validators/index.d.ts +2 -0
- package/dist/esm/validators/index.d.ts.map +1 -1
- package/dist/esm/validators/index.js +2 -0
- package/dist/esm/validators/index.js.map +1 -1
- package/dist/esm/validators/nil.d.ts +3 -0
- package/dist/esm/validators/nil.d.ts.map +1 -0
- package/dist/esm/validators/nil.js +20 -0
- package/dist/esm/validators/nil.js.map +1 -0
- package/dist/esm/validators/undef.d.ts +3 -0
- package/dist/esm/validators/undef.d.ts.map +1 -0
- package/dist/esm/validators/undef.js +20 -0
- package/dist/esm/validators/undef.js.map +1 -0
- package/package.json +74 -74
package/CHANGELOG.md
CHANGED
|
@@ -1,44 +1,71 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project 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
|
-
## [0.
|
|
9
|
-
|
|
10
|
-
###
|
|
11
|
-
|
|
12
|
-
- `
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project 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
|
+
## [0.4.1] - 2026-01-16
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Updated README with documentation for `undef()` and `nil()` validators
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Code formatting issues
|
|
17
|
+
|
|
18
|
+
## [0.4.0] - 2026-01-16
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- `undef()` validator for explicit undefined checks
|
|
23
|
+
- `nil()` validator for explicit null checks
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Refactored all validator tests to use regex assertions for error messages, improving test resilience
|
|
28
|
+
|
|
29
|
+
## [0.3.1] - 2026-01-14
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Updated README with comprehensive documentation for `partial()` and `omit()` validators
|
|
34
|
+
|
|
35
|
+
## [0.3.0] - 2026-01-14
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- `omit()` validator for creating validators with specific object properties omitted
|
|
40
|
+
- GitHub Actions CI workflow for automated build and test validation
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- ESLint configuration now properly excludes test files to prevent parsing errors
|
|
45
|
+
- Code formatting issues
|
|
46
|
+
|
|
47
|
+
## [0.2.0] - 2026-01-13
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- `partial()` validator for creating validators with optional object properties
|
|
52
|
+
- Playground directory for testing and experimenting with validators
|
|
53
|
+
- Object validators now organized in dedicated `object/` folder (matching string validators structure)
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- Moved `obj()` validator to `src/validators/object/object.ts`
|
|
58
|
+
- Updated exports to maintain backward compatibility
|
|
59
|
+
|
|
60
|
+
## [0.1.0] - 2026-01-11
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
- Initial release of sibyl-ts (TypeScript validation library inspired by Psycho-Pass Sibyl System)
|
|
65
|
+
- Type-safe validators: string, number, boolean, date, array, object, tuple, union, literal, enum
|
|
66
|
+
- String validators: email, URL, UUID, IP address
|
|
67
|
+
- Safe parsing with `tryJudge()` method
|
|
68
|
+
- Comprehensive error handling with detailed error messages
|
|
69
|
+
- Full TypeScript support with automatic type inference
|
|
70
|
+
- Dual ESM/CommonJS module support
|
|
71
|
+
- Complete test suite with vitest
|
package/LICENSE
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
ISC License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
-
copyright notice and this permission notice appear in all copies.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|