Data Access Testing With @testcontainers

By Adam Rackis on

Testing data access code has always been awkward: unit tests want to be fast and isolated, and a real database is neither. With Docker and @testcontainers you can spin up a throwaway Postgres inside your Vitest suite, push your Drizzle schema into it, and verify that your real insert and query code round-trips correctly.

Modern Web Types

By Chris Coyier on

The web platform evolves. When it does, other tech has to catch up, and not just LLMs. Another one is TypeScript types. Philip Walton explains: For example, here’s an error I got just the other day when trying to use element-scoped view transitions: “Property ‘startViewTransition’ does not exist on type ‘HTMLElement’.” … TypeScript makes it […]

Nub

By Chris Coyier on

Nub looks like an interesting new “toolchain” for Node.js. It’s one of those “it makes everything you already do faster” sort of things, like installing and running scripts. Bytes.dev… … won’t be surprised if it becomes the de facto way to season your Node.js app. You can get some of these advantages by switching runtimes, […]

Fun with TypeScript Generics

By Adam Rackis on

Generics, combined with conditional types can make for an incredibly powerful combination. When you look at things the right way, you can ask very useful questions about your types that allow you to build the precise API you want.

Zod + TypeScript: Schema Validation Made Easy

By Chris Coyier on

I can easily imagine a job interview question being “What’s the difference between TypeScript and Zod and in what circumstances do you need each?” They are both type validation libraries. Would you ever need both? The short answer is that TypeScript is great but can’t help you at runtime, where you might get data from […]

$966,000

Master.dev donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.