• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RobinTail / express-zod-api / 14519766941 / 4
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: renovate/prettier-3.x
DEFAULT BRANCH: master
Ran 17 Apr 2025 03:58PM UTC
Files 52
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Apr 2025 03:56PM UTC coverage: 100.0%. First build
14519766941.4

Pull #2546

github

web-flow
Migration to Zod 4 (#2537)

This PR is for migrating the framework onto Zod 4 as is and preserving
its original behaviour and functionality as much as possible, except
only the utilization of the new Metadata system for its purposes.
All other improvements, taking advantages of new features,
simplifications and prettifying should be separated into dedicated PRs.

The current problems:
- IOSchema ✅ 
- incompability of zod 4 schemas between each other, in particular
Typescript does not like that certain schemas have different `brand()`
and `_zod.values`
- is inability of Typescript to handle circular nature of the `IOSchema`
type when it's based on `ZodObject` from Zod 4.
  - the cause seems to be top level transformations chain
- possible simplification could be any schema that leads to an object,
but not array: `z.ZodType<object & { [Symbol.iterator]?: never }>`
  - made a runtime validation
- Plugin ✅ 
  - ZodType is not patchable through prototypes
  - found a workaround by patching each `Zod*` class
- however, since meta system is now detached, it won't withstand
refinements
  - found a workaround by taking advantage of setter
- Traversing schemas ✅ 
- Schema of `zod` seem to contain and refer to `@zod/core` as children,
not other `zod` ones
  - Found a way to rewrite rules based on `@zod/core`
- Iterating checks 🆗  
- check type is `string`, not literal, have to introduce a lot of
`satisfies`
- they all have base-type `never` for some reason, that makes them
unusable for `.find()`
- checks can also contain other schemas `ZodISODate` for example which
is not typed at all
- `z.base64()` is not the same as `z.string().base64()`, but they both
have `type: string`, so the check itself can act as a schema, and it
should be handled accordingly
    - made handling for those cases
- ⚠️ currently things like `z.int().max(100)` do not work due to
external bug, so it's unclear what exactly such definition would look
like
- `ZodError` does not inherit `Error` ... (continued)
Pull Request #2546: Future: v24

1269 of 1300 branches covered (97.62%)

4285 of 4285 relevant lines covered (100.0%)

68.37 hits per line

Source Files on job run-20.9.0 - 14519766941.4
  • Tree
  • List 52
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 14519766941
  • 0d9382b0 on github
  • Next Job for on make-v24 (#14531805297.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc