The Weekly Dev's Brew #13 ☕

The Weekly Dev's Brew #13 ☕

This week in dev land: Zod 4 finally arrives with 14x faster performance and 85% smaller bundle size, Fresh 2 is getting closer to release and VS Code opens its AI editor code to the community.

Zod 4 Brews a Stronger Cup of Type Safety

After brewing for over a year, Zod 4 is finally here in stable form! If you've been using this popular TypeScript validation library, you're in for a treat that's both more robust and lighter weight.

The new release brings impressive performance improvements that will wake you up faster than your morning espresso: 14x faster string parsing, 7x faster array parsing, and 6.5x faster object parsing. For those keeping track, that's enough time saved to perfect your pour-over technique.

Even more impressive is the 100x reduction in TypeScript compiler instantiations, meaning you won't have time to brew an entire pot while waiting for your editor to catch up. The core bundle size has been slashed in half, and if you opt for the new "Zod Mini" variant, you'll see an 85% reduction compared to Zod 3 - sipping just 1.88kb gzipped instead of 12.47kb.

Beyond the performance gains, Zod 4 brings a carafe of new features that TypeScript enthusiasts have been requesting for years:

  • Proper recursive object definitions without type casting

  • A metadata system with JSON Schema conversion

  • File validation schemas for handling uploads

  • Template literal types for validating string patterns

  • Internationalization support for error messages

  • Pretty-printing of errors for better developer experience

To upgrade, you can start with: npm upgrade zod@^3.25.0 and import from "zod/v4". When you're ready to try the ultra-light variant: import { z } from "zod/v4-mini".

Quick Sips

  • Fresh 2 Framework Update: Deno's Fresh web framework is getting closer to a stable 2.0 release, with an alpha version already powering deno.com in production. The new Express/Hono-like APIs and async components are promised to make development simpler. Target for stable release is September 2025, but you can try the alpha now with deno run -Ar jsr:@fresh/init@2.0.0-alpha.34.

  • VS Code Opens Up AI Editor: Microsoft is open-sourcing the GitHub Copilot Chat extension under the MIT license and integrating AI features directly into VS Code core. Their reasoning? LLMs have improved enough that "secret sauce" prompting is less necessary, and they want to enable the community to build better extensions together. Keep an eye on their iteration plan.

  • Astro's Server Islands pattern lets you render portions of your page on-demand without blocking the initial load. Just add server:defer to an Astro component, and it'll load asynchronously after the initial page render. A fantastic blog post by Nick Taylor

  • Understanding React State Preservation: Kent C. Dodds reminds us why our React components sometimes unexpectedly reset state: it's all about position in the component tree. If you conditionally wrap a component like {props.wrap ? <Wrapper>{children}</Wrapper> : children}, you might be accidentally resetting state. The fix? Keep your component tree stable or lift state up.

  • CSS Height Enigma Explained: Josh Comeau breaks down why height: 50% sometimes mysteriously doesn't work in CSS. The short answer: percentage-based heights need a parent with a defined height, otherwise you create a circular dependency. The solution? Switch to Flexbox or Grid when you need elements to fill available space.

Coffee Fact of the Week ☕

In the 1700s, King Gustav III of Sweden was so suspicious of coffee that he organized what might be the world's worst clinical trial. He ordered two identical twin prisoners to drink massive amounts of coffee and tea respectively until they died, to prove coffee was harmful. Plot twist: the monitoring physicians died first, then the king was assassinated, while both prisoners lived long lives.

Much like Gustav's failed experiment, we developers often fall into the trap of confirmation bias when evaluating new tools. We cherry-pick benchmarks that support our preferred libraries (looking at you, Zod 4's impressive numbers), ignore edge cases that break our beautiful abstractions, and sometimes build elaborate justifications for why our favorite framework is "objectively better.”

See you next week. Happy coding & brewing!

JOIN THE BREW CREW

Don't miss the next episode and stay up to date completely for free