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

RobinTail / express-zod-api / 33591720986
100%

Build:
DEFAULT BRANCH: master
Ran 02 Sep 2026 04:41AM UTC
Jobs 6
Files 51
Run time 1min
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

02 Sep 2026 04:40AM UTC coverage: 100.0%. Remained the same
33591720986

push

github

web-flow
feat(endpoint): Try parsing sync first (#3672)

This should unblock #3666 for compiled schemas.
We're gonna try parsing synchronously first, but if it fails we do
async.
Historically established `.parseAsync()` is chosen for versatility, due
to the #269.

The happy path does not affect the performance.

```
 ✓ bench/parse-maybe-async.bench.ts > Parsing 'sync' schemas 2959ms
     name                          hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · .parseAsync()       8,148,819.69  0.0000  2.1694  0.0001  0.0001  0.0003  0.0004  0.0006  ±0.89%  4074410
   · parseMaybeAsync()  10,416,248.81  0.0000  0.1899  0.0001  0.0001  0.0002  0.0002  0.0005  ±0.26%  5208125

 ✓ bench/parse-maybe-async.bench.ts > Parsing 'async' schemas 1593ms
     name                         hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · .parseAsync()      3,368,112.15  0.0002  0.1607  0.0003  0.0003  0.0005  0.0007  0.0008  ±0.28%  1684062
   · parseMaybeAsync()    227,643.07  0.0038  0.1916  0.0044  0.0045  0.0055  0.0058  0.0100  ±0.19%   113822
```

Meaning:
- Parsing sync schemas (happy path): becomes `1.3x` faster than before
(even without schema compilation);
- Parsing occasionally async schemas regrettably becomes `~14x` slower
than it used to be with `.parseAsync()`;

Therefore:
- I decided to make it an opt-in feature for now, that will become
default in v30 #3643 , when Zod 4.5 will be a required min version and
we'll use compiled schemas anyway for performance benefits;
- but even when enabled, it will try it only once per schema (first
request, cache findings), so if we find out that the schema is async
then we'll keep using `parseAsync` for it.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## New Features

- Added the opt-in `trySyncValidation` setting for endpoint and
middleware schema validation.
- Synchronous validation is attempted fi... (continued)

1114 of 1163 branches covered (95.79%)

19 of 19 new or added lines in 4 files covered. (100.0%)

1610 of 1610 relevant lines covered (100.0%)

601.49 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-24.11.0 - 33591720986.1 02 Sep 2026 04:41AM UTC 51
100.0
GitHub Action Run
2 run-22.x - 33591720986.2 02 Sep 2026 04:41AM UTC 51
100.0
GitHub Action Run
3 run-26.0.0 - 33591720986.3 02 Sep 2026 04:41AM UTC 51
100.0
GitHub Action Run
4 run-22.19.0 - 33591720986.4 02 Sep 2026 04:41AM UTC 51
100.0
GitHub Action Run
5 run-26.x - 33591720986.5 02 Sep 2026 04:41AM UTC 51
100.0
GitHub Action Run
6 run-24.x - 33591720986.6 02 Sep 2026 04:41AM UTC 51
100.0
GitHub Action Run
Source Files on build 33591720986
  • Tree
  • List 51
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33591720986
  • 86dc3731 on github
  • Prev Build on master (#33510372369)
  • Next Build on master (#33596163775)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc