Colin McDonnell ๐Ÿ’Ž Zod's Avatar

Colin McDonnell ๐Ÿ’Ž Zod

@colinhacks.com.bsky.social

๐Ÿ’Ž Creator of Zod, tRPC (v0) ๐Ÿ”ฎ OSS Fellow @ Clerk ๐Ÿฆ† Friendly neighborhood TypeScript nerd ๐Ÿง‘๐Ÿผโ€๐Ÿ’ป Prev @ Bun, EdgeDB, YC, MIT

4,826 Followers  |  215 Following  |  155 Posts  |  Joined: 19.05.2023  |  1.5291

Latest posts by colinhacks.com on Bluesky

Post image

in the absence of an existing convention, I'm adding these three fields to Zod's package.json.

making this stuff auto-discoverable would resolve one of the biggest usability issues with today's agents/IDEs. a simple convention here will go a long way! ๐Ÿค˜

29.07.2025 08:45 โ€” ๐Ÿ‘ 26    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

sounds like you found an alternative but the answer is "not at all". MIT license, go ham :)

03.06.2025 18:46 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

very nice ๐Ÿคฉ

28.05.2025 19:56 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Zod 4 Release Day Happy Hour ยท Luma Zod 4 is here! This new major version of Zod has been under development for over a year, and itโ€™s finally going stable on May 19th. Join me to eat food, drinkโ€ฆ

folks in the Bay Area: come hang out!
lu.ma/waqmeggb

17.05.2025 04:23 โ€” ๐Ÿ‘ 31    ๐Ÿ” 1    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Preview
Zod 4 Release Day Happy Hour ยท Luma Zod 4 is here! This new major version of Zod has been under development for over a year, and itโ€™s finally going stable on May 19th. Join me to eat food, drinkโ€ฆ

I'm throwing a happy hour in SF that evening to celebrate (thx @clerk.com!) โ€” if you're any the area come hang out :) lu.ma/waqmeggb

15.05.2025 18:17 โ€” ๐Ÿ‘ 6    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Zod 4 stable will be released this Monday, May 19th!

15.05.2025 18:16 โ€” ๐Ÿ‘ 105    ๐Ÿ” 6    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 2

hi Axel! big fan! the ? syntax definitely felt right...and when it unlocked recursive objects I knew it was the way.

though actually in Zod 4, z.object() adds the "?"to T.optional() but not to z.union(T, z.undefined()) as you're suggesting...a small change that makes things a little more sound

12.04.2025 07:57 โ€” ๐Ÿ‘ 6    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

z.safeint() exists but it's just z.int() ๐Ÿ™ƒ anything outside of safe range will throw. hadn't considered doubleint seriously. is that basically z.int128()? I'd represent that with a ZodBigInt subclass (similar to z.int64() and z.uint64 currently). but idk if it's widely used enough to merit addition?

12.04.2025 07:51 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

yikes, thanks! last minute changes gone awry

10.04.2025 19:54 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

thank you! this means a lot and is exactly the reaction I was hoping for :))))

10.04.2025 19:53 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

huge thanks to @clerk.com for supporting my work on Zod 4! they've been an amazing partner through the much-longer-than-expected development process ๐Ÿซถ

10.04.2025 15:23 โ€” ๐Ÿ‘ 8    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
@zod/core | Zod Docs

the beta period will last 4-6 weeks so ecosystem tooling/library authors can implement day-one support. if that's you: this page is a good starting point. donโ€™t hesitate to reach out for guidance!
v4.zod.dev/packages/core

10.04.2025 15:23 โ€” ๐Ÿ‘ 6    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Migration guide | Zod Docs

breakage was kept to an absolute minimum, but there are some relatively minor changes to the public API. i'd love for some brave pioneers to upgrade and report any breakage not described in the changelog:
v4.zod.dev/v4/changelog

10.04.2025 15:23 โ€” ๐Ÿ‘ 9    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Introducing Zod 4 beta | Zod Docs

Zod 4 is now in beta!

๐Ÿ’Ž 7x faster object parsing
๐Ÿ’Ž 20x reduction in tsc instantiations
๐Ÿ’Ž 57% smaller core bundle size
๐Ÿ’Ž metadata via .meta()
๐Ÿ’Ž z.toJSONSchema()
๐Ÿ’Ž z.templateLiteral()
๐Ÿ’Ž z.stringbool()
๐Ÿ’Ž z.int32(), z.float32(), etc
๐Ÿ’Ž z.file()
๐Ÿ’Ž new logo ๐Ÿ˜‡

10.04.2025 15:23 โ€” ๐Ÿ‘ 304    ๐Ÿ” 44    ๐Ÿ’ฌ 21    ๐Ÿ“Œ 14
Post image

if I may be so bold, I'd like to propose some much-needed nomenclature

25.02.2025 07:48 โ€” ๐Ÿ‘ 114    ๐Ÿ” 3    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 1

thanks for letting me know! the docs (including this banner placement) are going to move out of the readme soon which should mitigate this. I'd be surprised if they enforce this for a solo developer though...something like CodeFund is more likely to ruffle feathers I think

24.02.2025 23:35 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

i'm trying out a new OSS funding experimentโ€”a "featured" sponsor slot at the top of the Zod README

โœ“ features are week-to-week (~140k impressions)
โœ“ simple auction-based pricing (per-week or standing bids accepted)
โœ“ artwork subject to approval

DM/email me if your company is interested! ๐Ÿค™

24.02.2025 00:55 โ€” ๐Ÿ‘ 62    ๐Ÿ” 7    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 2
Post image

who suggested this and why weren't they fired immediately

08.02.2025 22:09 โ€” ๐Ÿ‘ 71    ๐Ÿ” 1    ๐Ÿ’ฌ 6    ๐Ÿ“Œ 1

I want chain-of-thought for ChatGPT Voice Mode but it just mutters to itself for 30 seconds before answering my question

08.02.2025 02:33 โ€” ๐Ÿ‘ 28    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

star count for Standard Schemaโ€”pretty successful launch, i'd say ๐Ÿคฉ

04.02.2025 20:53 โ€” ๐Ÿ‘ 66    ๐Ÿ” 1    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

thanks Corbin! I really appreciate this ๐Ÿ˜‡

29.01.2025 00:47 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

i might still be misunderstanding something here though ๐Ÿ™ƒ

27.01.2025 19:12 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

(deleted an earlier reply, I misunderstood the problem)

Zod does in fact try to avoid the Partial<> in z.record() wherever possible: github.com/colinhacks/z...

in this case it's behaving as intended. not much point in adding a question mark to an index signature since it's essentially implied.

27.01.2025 19:12 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

send me the PR when its merged and I'll tweet it out!

27.01.2025 17:43 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Incredibly proud to be a part of an ecosystem as friendly and open as TypeScript's. Itโ€™s been a joy working together with my "competitors" to make something that can hopefully benefit the whole ecosystem ๐Ÿคฉ

27.01.2025 16:24 โ€” ๐Ÿ‘ 29    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
GitHub - standard-schema/standard-schema: A standard interface for TypeScript schema validation libraries A standard interface for TypeScript schema validation libraries - standard-schema/standard-schema

If youโ€™re a maintainer interested in implementing/integrating with the spec, refer to the README for some simple integration examples, an FAQ, and links to other integrations/PRs.

If youโ€™re having trouble, DM me and Iโ€™d be happy to help ๐Ÿค™
github.com/standard-sch...

27.01.2025 16:24 โ€” ๐Ÿ‘ 8    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

A lot of frameworks and tools already accept Standard Schemas! Huge shoutout to the early adopters: tRPC, Tanstack Form, Tanstack Router, UploadThing and t3-env, OpenAuth, Renoun, and more

๐Ÿ™ @jayair.bsky.social @katt.dev @chorobin.bsky.social @jumr.dev @souporserious.com @awad.dev @unnoq.com

27.01.2025 16:24 โ€” ๐Ÿ‘ 59    ๐Ÿ” 3    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 0

This makes it easier for frameworks and tools (like say, tRPC) to accept user-defined schemas, without needing separate adapters for each lib.

Integrate once, validate anywhere ๐Ÿฆ†

27.01.2025 16:24 โ€” ๐Ÿ‘ 12    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

This is a condensed version of the Standard Schema spec that does a good job of conveying how it works.

Given a spec-compliant validator you can:โ€จโ€จ

a) validate data with it (duh)
b) retrieve validation errors in a standardized format
c) extract its inferred input & output types

27.01.2025 16:24 โ€” ๐Ÿ‘ 12    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

Standard Schema is a specification (a TypeScript interface in fact) not a library.

It was designed collaboratively by myself (creator of Zod ๐Ÿ‘‹), @fabianhiller.com (creator of Valibot), and @ssalbdivad.dev (creator of ArkType).

Itโ€™s the final form of something I tweeted nearly two years ago.

27.01.2025 16:24 โ€” ๐Ÿ‘ 27    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

@colinhacks.com is following 20 prominent accounts