Commit Graph
1568 Commits
Author SHA1 Message Date
Giulio Canti 1dc4495c7e fix flip annotations type (#194) 2025-06-28 11:17:43 +02:00
Tim 106187551a add Effect type constraint apis (#189) 2025-06-28 21:04:28 +12:00
Giulio Canti b146370d31 optimize tagged unions (#193) 2025-06-28 07:54:34 +02:00
Giulio Canti 2e55065206 fix encodeResult signature (#192) 2025-06-28 00:21:42 +02:00
Giulio Canti 4466ef7c30 Generating a title based on the value being validated (#191) 2025-06-27 18:08:23 +02:00
Giulio Canti 9b81732003 refactor refinements (#190) 2025-06-27 16:23:26 +02:00
Tim 2058dea642 add HttpClient to bundle check (#188) 2025-06-27 20:29:55 +12:00
Tim 0dd9566a8c http schema wip (#187) 2025-06-27 20:18:36 +12:00
Giulio Canti e4f526170b fix schema docs (#186) 2025-06-27 08:21:39 +02:00
Giulio Canti 09b184e5f4 fix schema imports (#185) 2025-06-27 07:46:48 +02:00
Tim 24a4840162 try schema namespace (#184) 2025-06-27 16:34:40 +12:00
Tim 9b2c3e7128 build exports based on .index.ts (#183) 2025-06-27 14:20:01 +12:00
Tim 97d5578d08 add array overload to Effect.catchTag (#182) 2025-06-27 13:02:27 +12:00
Tim f78063e0c9 wip (#105) 2025-06-27 12:15:06 +12:00
Tim dff58bffbe backport from effect (#181) 2025-06-27 10:11:41 +12:00
Giulio Canti 9ef4675b3f handle ParseOptions.propertyOrder (#180) 2025-06-26 18:17:34 +02:00
Giulio Canti 11b97ad753 update tstyche (#179)
* Enhance documentation for flipping schemas

* update tstyche

* refactor model docs
2025-06-26 15:12:53 +02:00
Giulio Canti a84732ff5b handle unexpected keys (#176)
* handle unexpected keys

* docs

* try to reduce bundle (#177)

* remove Option from UnexpectedKey issue
2025-06-26 08:20:06 +02:00
Giulio Canti 577d3d3a5b fix code snippet (#174) 2025-06-25 18:39:25 +02:00
Giulio Canti c87fc277f5 Default JSON Serialization / Deserialization (#173) 2025-06-25 18:12:12 +02:00
Giulio Canti 30f02fdff7 chore: improve json schema generation (#172)
* add isOptional helper

* improve json schema generation

* remove unused function
2025-06-25 16:24:15 +02:00
Giulio Canti b0674038ba add Introduction (#171) 2025-06-24 19:38:33 +02:00
Giulio Canti 5b31719546 Message system (#169)
* refactor formatters

* fix docgen

* remove message field from Structured formatter

* Enhance candidate type retrieval

* use SchemaIssue.AnyOf
2025-06-24 16:32:08 +02:00
Giulio Canti b025ea9c86 Record: properly handle literal keys (#170)
* add new bundle as a baseline

* properly handle literal keys

* add type-level tests
2025-06-24 16:31:32 +02:00
Michael Arnaldi d086c50784 unify provide service and make provide (#168)
* unify provide service and make provide

* compact impl
2025-06-24 12:17:30 +02:00
Giulio Canti ecc0ba8828 move abort from return type to Filter (#167) 2025-06-23 08:30:14 +02:00
Giulio Canti 931ccb87d5 remove ast parameter from SchemaGetter / SchemaMiddleware (#166) 2025-06-22 16:18:33 +02:00
Giulio Canti fa3735bad3 simplify Tree formatter messages (#165)
* simplify Tree formatter

* add transformation / middleware context

* simplify Tree formatter messages

* chore

* chore
2025-06-22 15:54:03 +02:00
Giulio Canti 7e9142ff34 fix identifier annotation handling (#164)
* improve message system

* refactor Filter signature

* add typeCodecLambda / encodedCodecLambda lambdas

* fix decodeUnknownResult signature

* handle message annotation in InvalidType

* latest zod

* rename formatters

* i18next examples

* Message as function

* fix None value management

* simplify

* shorten default messages

* fix structured formatter bug

* remove useless field

* add AnyOf issue

* remove annotations from Pointer issue

* refactor formatters

* formatSystemMessage

* docs

* add annotations parameters to all checks

* fix identifier annotation
2025-06-21 16:38:06 +02:00
Giulio Canti bfcdbadfb2 rename derive (#163)
* Literals.mapMembers

* Struct.mapFields

* Tuple.mapElements

* Union.mapMembers

* add test helper
2025-06-18 07:36:00 +02:00
Giulio Canti aca4cabb28 rename map to derive (#162) 2025-06-17 17:38:52 +02:00
Giulio Canti 4fcf3be2df Add validation to ensure literals are finite numbers in LiteralType (#161) 2025-06-17 07:47:55 +02:00
Giulio Canti d26de26a2a Fields / Elements / Members Mapping (#160)
* refactor Struct

* add evolveKeys

* add evolveEntries

* docs

* add struct lambda

* implement map / mapPick

* docs

* improve AST formatting

* add Tuple.map

* add Union.map

* add Literals.map & docs

* fix example

* add tuple pick / omit

* test opaque structs

* add Struct.mapOmit, Tuple.mapPick, Tuple.mapOmit

* add Apply type-level helper

* remove code duplications

* chore

* add renameKeys

* add renameIndices

* simplify EntryEvolved

* add Schema.encodeKeys
2025-06-16 16:38:52 +02:00
Giulio Canti 8ee0074eda add pretty generation (#159)
* add pretty generation

* add bundle

* chore

* chore
2025-06-10 18:33:43 +02:00
Giulio Canti ce3645a47f handle __proto__ own key in do notation (#158) 2025-06-10 16:25:29 +02:00
Giulio Canti eda4bb5004 add equivalence generation (#157)
* add equivalence generation

* apply new naming convention

* add override annotation helper

* fix "__proto__" own key management

* add bundle
2025-06-10 10:40:38 +02:00
Giulio Canti 1e4acaa571 Implement getAnnotation function to retrieve JSON schema annotations from AST (#156) 2025-06-09 16:07:19 +02:00
Giulio Canti 75a1df79e7 renaming: align mutability to optionality (#155)
* rename isReadonly to isMutable

* rename OptionalToken, ReadonlyToken, and DefaultConstructorToken to Optionality, Mutability, and ConstructorDefault
2025-06-09 09:37:14 +02:00
Giulio Canti e4151b7543 add arbitrary generation (#151)
* add arbitrary generation

* improve SchemaToJsonSchema

* add bundle

* makeLazy

* add Context

* more recursive tests

* fix annotations

* add filter management

* add tuple checks

* add struct checks

* try to reduce bundle

* add @rollup/plugin-replace for environment variable handling and update error messages in SchemaAST

* fix structWithRest check

* fix index signatures parsing

* simplify stringMatching algo

* fix is / asserts

* more tests

* date checks

* bigint checks

* fix context passing

* docs

* use reset context
2025-06-09 08:08:31 +02:00
Michael ArnaldiandGiulio Canti 6258206a71 test immer without dependency (#148)
* test immer without dependency

* add equality tests

* make classes immerable by default

* remove workaround

* remove duplicated test

---------

Co-authored-by: Giulio Canti <giulio.canti@gmail.com>
2025-06-08 07:26:47 +02:00
Michael Arnaldi fb462d84c8 Avoid using defineProperty in hash for compatibility with frozen objects (#154) 2025-06-07 11:33:08 +02:00
Tim b0c0493140 improve batch grouping (#153) 2025-06-06 15:34:26 +12:00
Tim c6eb09e6cf propagate context in Effect.addFinalizer (#152) 2025-06-06 15:00:08 +12:00
Giulio Canti 53d8b52851 json schema generation (#150)
* json schema generation

* tuples

* object

* more tests

* add bundle

* handle documentation annotation
2025-06-05 16:55:38 +02:00
Giulio Canti 48cdb3be47 add test for immer compatibility (#147) 2025-06-03 17:02:49 +02:00
Giulio Canti a017ecd217 Add NonEmptyArray schema support (#146) 2025-06-03 16:34:03 +02:00
Giulio Canti 49e24417a3 Add size checks to SchemaCheck (#145) 2025-06-03 12:27:48 +02:00
Giulio Canti f939c6de83 add support for structural filters (#144)
* better default error messages

* use symbol in isSchema

* add support for structural filters

* chore

* add minEntries / maxEntries
2025-06-03 12:07:42 +02:00
Giulio Canti fdb8d96bc3 fix contextual make (#143)
* fix contextual make

* fix other APIs + more tests

* update tstyche

* docs

* add Opaque test
2025-06-03 08:41:58 +02:00
Giulio Canti 22c05c7d3e add check method (#142)
* add check method

* update docs
2025-05-31 17:42:01 +02:00