My Learning Curve

Feed

Colin McDonnell @colinhacks

Latest entries from Colin McDonnell @colinhacks.

Source: https://colinhacks.com

Introducing Zod Codecs

Aug 23, 2025

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...

Live types in a TypeScript monorepo

May 30, 2024

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...

An email regex for reasonable people

Mar 8, 2023

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...

From README to documentation site in 10 minutes

May 13, 2022

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...

Why Zod 2 isn't leaving beta

Dec 8, 2020

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 (...

Next.js, nested routes, and the war on SPAs

Oct 29, 2020

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...

Why you shouldn't use @emotion/core

Jun 7, 2020

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...