colinhacks Profile Banner
colinhacks/zod Profile
colinhacks/zod

@colinhacks

Followers
21K
Following
7K
Media
847
Statuses
4K

the Zod guy πŸ§™β€β™€οΈ created zshy, co-created Standard Schema, tRPC πŸ¦† friendly neighborhood typescript nerd πŸ‘ΌπŸ» investor πŸ’» prev @ bun, edgedb πŸ›οΈ mit

Seattle
Joined October 2012
Don't wanna be here? Send us removal request.
@colinhacks
colinhacks/zod
11 days
Introducing zshy β€” a bundler-free batteries-included build tool for TypeScript libraries πŸ’
Tweet media one
27
76
1K
@colinhacks
colinhacks/zod
14 hours
RT @jherr: I should really just:. alias "pnpm init"="pnpm init && pnpm add zod". At this point.
0
3
0
@colinhacks
colinhacks/zod
4 days
first commit to tRPC was five years ago today
Tweet media one
10
7
286
@colinhacks
colinhacks/zod
7 days
nothing like being out on the water not thinking about zod error codes
Tweet media one
@colinhacks
colinhacks/zod
11 months
nothing like being out on the water thinking about Zod error codes
Tweet media one
3
3
193
@colinhacks
colinhacks/zod
10 days
the Cursor docs want you to migrate your codebase to Zod 4
Tweet media one
8
5
184
@colinhacks
colinhacks/zod
10 days
normalize using JSON pointer syntax in docs
Tweet media one
4
1
113
@colinhacks
colinhacks/zod
11 days
repo link below. there's a big FAQ in there for the real nerds πŸ“¦.
Tweet media one
github.com
πŸ’ Bundler-free build tool for TypeScript libraries. Powered by tsc. - colinhacks/zshy
2
3
71
@colinhacks
colinhacks/zod
11 days
that's it! there's a lot of big wins with this approach:. 🍌 no config file, just package.json and tsconfig.json.🍌 no bundler.🍌 use any file structure you want.🍌 use any import syntax you want (.js, .ts, extensionless).
1
0
32
@colinhacks
colinhacks/zod
11 days
then writes your "exports" map directly into your package.json β€” you never have to worry about it again
Tweet media one
4
0
27
@colinhacks
colinhacks/zod
11 days
it generates the following files:
Tweet media one
1
0
18
@colinhacks
colinhacks/zod
11 days
then run a build with `npx zshy`. it runs two tsc builds against your specified entrypoints. ESM .ts β†’ .js/.d.ts.CJS .ts β†’ .cjs/.d.cts
Tweet media one
2
0
24
@colinhacks
colinhacks/zod
11 days
the DX is heavily inspired by the wonderful library "tshy" by @izs. tshy really blazed the trail for tsc-first build tools. after installing `zshy`, specify your entrypoint map in package.json:
Tweet media one
4
0
25
@colinhacks
colinhacks/zod
11 days
there's no bundler, just plain tsc β€” so you get typechecking *and* gold standard transpilation . the usual "bundler-ey" stuff (extension rewriting, asset copying, import.meta shims, etc) are implemented with the (super underutilized) TypeScript Compiler API
Tweet media one
1
0
39
@colinhacks
colinhacks/zod
11 days
this started life as an internal built tool for Zod, but I'm spinning it out as a standalone tool
Tweet media one
1
0
52
@colinhacks
colinhacks/zod
11 days
yeah. this feels good
Tweet media one
16
11
508
@colinhacks
colinhacks/zod
12 days
if you want to learn more about this versioning approach, check out the Versioning docs . if you don’t, upgrade to zod@4 and you’ll never have to think about it agin πŸ™ƒ.
Tweet media one
zod.dev
0
0
10
@colinhacks
colinhacks/zod
12 days
Library authorsβ€”if you’ve implemented Zod 4 support according to best practices ( no code changes should be needed. Just bump your peer dependency range to include zod@4 and cut a new patch/minor. don't drop 3.25.x support (at least until your next major)
Tweet media one
2
0
24