Sign in

Colin McDonnell 💎 Zod

@colinhacks.com
5.3K followers 225 following 231 posts

💎 Creator of Zod, tRPC (v0) 🔮 OSS Fellow @ Clerk 🦆 Friendly neighborhood TypeScript nerd 🧑🏼‍💻 Prev @ Bun, EdgeDB, YC, MIT

PostsRepliesMedia
Colin McDonnell 💎 Zod @colinhacks.com · 15/09/2026
Yarn worked around this with a hard-coded list of exceptions (@yarnpkg/extensions) which it used to patch known-bad packages. The same list is now use by pnpm v12 and Aube's global virtual stores. Unfortunately it's updated rarely and contains just 142 of the 792 bad packages
120
Colin McDonnell 💎 Zod @colinhacks.com · 15/09/2026
These phantom dependency issues often go unnoticed in hoisted layouts, but cause problems (e.g. the dreaded ERR_MODULE_NOT_FOUND) when installed in isolated layouts or via a global virtual store (GVS) As more package managers add GVS this problem will exacerbate
110
Colin McDonnell 💎 Zod @colinhacks.com · 15/09/2026
In the latest Nub `nubx` lets you disable dlx (downloading packages from the internet) globally, forever This lets you use nubx to invoke project-local CLIs (e.g. prisma, etc) without the risk of a typo running an untrusted package on your machine
070
Colin McDonnell 💎 Zod @colinhacks.com · 15/09/2026
In Zod 4.6 — z.string().url() gets 63x faster It now uses URL.canParse() before falling back to `new URL()` (the old approach)
2291
Colin McDonnell 💎 Zod @colinhacks.com · 14/09/2026
Nub v0.9.1 — Nub autosizes the libuv threadpool on beefier machines Node caps the threadpool at 4. Nub lets this float to the number of machine cores (with conservative nicing beyond 4), increasing max throughput for crypto, zlib, DNS, and native addons like bcrypt and sharp
1102
Colin McDonnell 💎 Zod @colinhacks.com · 14/09/2026
By default Nub resolves a Node version in your project according to the following precedence
100
Colin McDonnell 💎 Zod @colinhacks.com · 14/09/2026
In the latest Nub Set `nodeExecutable` in nub.jsonc to override Nub's Node version resolution logic — you can provide an absolute path, or use $() syntax to dynamically resolve one
110
Colin McDonnell 💎 Zod @colinhacks.com · 13/09/2026
New in Zod 4.6 z.iban() — validates international bank account numbers via regex + ISO 7064 checksum
1190
Colin McDonnell 💎 Zod @colinhacks.com · 13/09/2026
New in Zod 4.6 — .validate() Unlike .parse(), this method returns a boolean, aborts early when it encounters the first error, and instantiates no issue objects. It is 13-39x faster than `.safeParse().success` on invalid data.
2350
Colin McDonnell 💎 Zod @colinhacks.com · 13/09/2026
New in Zod 4.6 — z.instanceof().properties() Specify arbitrary property-level validators on z.instanceof() schemas
2350
Colin McDonnell 💎 Zod @colinhacks.com · 08/08/2026
In the latest version of Nub Support for Promise.allKeyed() and Promise.allSettledKeyed() — the object form of Promise.all()
3272
Colin McDonnell 💎 Zod @colinhacks.com · 05/08/2026
Boron gives you an editor that gives you the power to tweak the ANSI escape codes on a char-by-char basis Also great for hand-designing CLI output for handoff to an agent ✨
030
Colin McDonnell 💎 Zod @colinhacks.com · 05/08/2026
The other tools accept code and handle the syntax highlighting, including "Bash". But for shell screenshots, this rarely looked good.
120
Colin McDonnell 💎 Zod @colinhacks.com · 08/07/2026
Nub's package manager is now 5.5x faster than Bun on our warm install benchmark!
3501
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
Yep! Nub supports versions of Node back to v18.19. It downlevels the syntax on versions that don't support it natively. This is Nub's pattern across all of the modern syntax/APIs it adds:
010
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
nub pm shim — A built-in package manager shimmer Like `corepack enable`, this registers global shims for npm, yarn, and pnpm. These shims intercept your commands and: - Detect the version used in your project - Install that version if needed - Run the command using the proper version
120
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
Nub detects your existing package manager (via package.json or lockfile) and runs in COMPAT MODE 🔐 reads *and writes* your existing lockfile (roundtrip!) ⚙️ respects your config files (see chart) ⚡️ zero config changes required in 99% of cases (Nub aborts when unsupported config is detected)
110
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
nub install — a fast, secure, incrementally adoptable package manager 🐇 2.7x faster than pnpm (warm install) 🧩 pnpm-compatible CLI (muscle memory) 🌅 powered by the Aube engine (by @jdx.dev)
130
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
nubx — a 19x faster npx 🐇 11ms overhead (vs 200ms+ for npx) 🧩 flag-for-flag compatible with npx ☁️ local-first, falls back to dlx
110
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
nub run — a 24x faster than pnpm run 🐇 14ms overhead vs >300ms (commands feel instantaneous) 🧱 monorepo friendly (-r/--filter) 🧩 flag-for-flag compatible with pnpm run
120
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
And because it uses Node itself under the hood, there are no unexpected behavioral divergences. Here's how it does on Deno's Node.js compatibility test suite:
130
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
The `nub` command is flag-for-flag and var-for-var compatible with `node` (via passthrough, primarily)
110
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
When you run a file, Nub detects your project's Node version, auto-installs it if needed, and runs your code with it (no nvm/fnm needed) — including all the augmentations above It respects (in order) 👉 package.json#devEngines 👉 .node-version 👉 .nvmrc 👉 package.json#engines
130
Colin McDonnell 💎 Zod @colinhacks.com · 22/06/2026
Introducing Nub. The all-in-one JavaScript toolkit that augments Node.js (instead of trying to replace it)
81019
Colin McDonnell 💎 Zod @colinhacks.com · 15/12/2025
The following schema libraries have implemented day-one support for the spec 👇 Note the minimum versions (these we're all released in the last few weeks)
1100
Colin McDonnell 💎 Zod @colinhacks.com · 15/12/2025
It puts control in the hands of the *consuming library*. Given a spec-compliant entity, they can: • extract a JSON representation of either its input or output type • control the *draft version* of the produced JSON Schema • pass library-specific config
160
Colin McDonnell 💎 Zod @colinhacks.com · 15/12/2025
This is the first ecosystem-wide standard representation that unifies runtime and static type information Essentially "JSON Schema with inferred types" — which unlocks totally new APIs for frameworks & AI tools
170
Colin McDonnell 💎 Zod @colinhacks.com · 15/12/2025
Introducing ✨ Standard JSON Schema ✨ It's a sister spec to Standard Schema that provides a common interface for any entity that can be converted to JSON Schema
3726
Colin McDonnell 💎 Zod @colinhacks.com · 10/12/2025
Pullfrog is the "agent x GitHub" integration I wish existed 🐸 can plan, review, and implement PRs (and more) 🐸 GitHub-first (no new UI) 🐸 agent-agnostic (bring your own agent / API key) 🐸 runs in GitHub Actions 🐸 configurable: custom per-trigger prompts, automations, etc
1130
Colin McDonnell 💎 Zod @colinhacks.com · 10/12/2025
sounds fake but I'm starting a company with my nemesis David E. ArkType and our first hire is @andarist.bsky.social and our first product is now in beta :)
6815
Colin McDonnell 💎 Zod @colinhacks.com · 26/08/2025
Codecs is useful when mapping data between two different domains. for instance, when converting data in your Node.js backend from a rich JavaScript representation (Dates, BigInts, Maps, Sets, etc) into a JSON-serializable format (ISO datetimes, arrays, etc)
111
Colin McDonnell 💎 Zod @colinhacks.com · 26/08/2025
these methods are intended for use cases involving data *conversion*, not *validation* (though they do that too). so if you pass in an input of an unexpected type, you'll get a TypeScript error.
120
Colin McDonnell 💎 Zod @colinhacks.com · 26/08/2025
"how does .decode() differ from .parse()?" good question! they're identical at runtime, but their type signatures differ in an important way. unlike .parse()—which accepts `unknown` input—decode and encode expect strongly-typed inputs
141
Colin McDonnell 💎 Zod @colinhacks.com · 26/08/2025
It is coupled with the addition of new methods (available on all Zod schemas) .decode() — "forward" parsing .encode() — "reverse" parsing
170
Colin McDonnell 💎 Zod @colinhacks.com · 26/08/2025
Introducing Zod 4.1 and its flagship feature: codecs. z.codec() is a new API for defining *bi-directional transformations* in Zod
710517
Colin McDonnell 💎 Zod @colinhacks.com · 29/07/2025
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! 🤘
1301
Colin McDonnell 💎 Zod @colinhacks.com · 15/05/2025
Zod 4 stable will be released this Monday, May 19th!
41046
Colin McDonnell 💎 Zod @colinhacks.com · 10/04/2025
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 🫶
080
Colin McDonnell 💎 Zod @colinhacks.com · 25/02/2025
if I may be so bold, I'd like to propose some much-needed nomenclature
41123
Colin McDonnell 💎 Zod @colinhacks.com · 24/02/2025
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! 🤙
4627
Colin McDonnell 💎 Zod @colinhacks.com · 08/02/2025
who suggested this and why weren't they fired immediately
6711
Colin McDonnell 💎 Zod @colinhacks.com · 04/02/2025
star count for Standard Schema—pretty successful launch, i'd say 🤩
2651
Colin McDonnell 💎 Zod @colinhacks.com · 27/01/2025
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 🤩
2290
Colin McDonnell 💎 Zod @colinhacks.com · 27/01/2025
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
4593
Colin McDonnell 💎 Zod @colinhacks.com · 27/01/2025
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
1120
Colin McDonnell 💎 Zod @colinhacks.com · 27/01/2025
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.
1272
Colin McDonnell 💎 Zod @colinhacks.com · 27/01/2025
been building a website for the last 3 days. meticulously crafted UI. 100 lighthouse score. sent it to my non-software friend for feedback. her response changed my life
91376
Colin McDonnell 💎 Zod @colinhacks.com · 27/01/2025
ah this works
241
Colin McDonnell 💎 Zod @colinhacks.com · 21/01/2025
what loving god would allow this
5291
Colin McDonnell 💎 Zod @colinhacks.com · 14/01/2025
hello here's a list of every pokemon name that still available on npm
1330