Introducing Zod Codecs
Zod 4.1 introduced a new z.codec() API for defining bi-directional transformations in Zod. The problem with transforms Zod's .transform() method is great for one-way data conversio...
Feed
Latest entries from Colin McDonnell @colinhacks.
Zod 4.1 introduced a new z.codec() API for defining bi-directional transformations in Zod. The problem with transforms Zod's .transform() method is great for one-way data conversio...
I propose the following convention for JavaScript libraries to make their AI resources auto-discoverable via package.json. { // package.json "llms": "https://docs.cool-library.com/...
EDIT: A previous version of this post recommended publishConfig , operating under the mistaken belief that it could be used to override "exports" during npm publish . As it turns o...
I maintain Zod, which is a schema library. Zod lets people declare an email schema like this: import {z} from 'zod'; z.string().email(); A lot of people think every technically val...
Spoiler alert: GitHub Pages and GitHub actions are not involved. I recently set out to build a proper documentation site for Zod with a short and eminently reasonable list of goals...
In the mid-2010s, the pendulum of web development swung massively in the direction of increased type safety. First, we all switched back to relational DBs after recovering from an ...
Zod's v2 has been in beta since September 2020 (around 3 months as of this writing). The people are starting to talk. The background The reason Zod 2 has been in beta for so long (...
Edit: 2022 The issues described here have been largely solved by layouts in Next.js 13. I recently set out to implement a single-page application (SPA) on top of Next.js. To clarif...
Update 2023 — Updated for Next.js 13, React Router 6, and React 18. Update 2022 — Next.js 13 now supports nested routes via the /app directory. However, it requires a server to ren...
**Update: November 29, 2020** > > I have an idea for a SaaS product related to Next.js and authentication, and I'm looking for a co-founder! Ideally you'd be intimately familiar wi...
Check out the HN discussion here . This article has been translated into Japanese and Russian . The existing open-source funding models don't work well for small projects. Big proj...
A maintainer of Emotion published a very thoughtful response to a version of this post! I encourage you to check that out here . The essay below has modified to address some of his...
Check out the HN roast discussion here ! 🤗 This article has been translated into Russian . I recently set out to build my personal website — the one you're reading now, as it happ...
Update 2023 — Many of the problems with other libraries have been solved since this post was originally published. There are a handful of wildly popular validation libraries in the...