The Weekly Devs' Brew #8

The Weekly Devs' Brew #8

This week's blend: A rich, full-bodied validation update with notes of faster bundling and subtle browser changes. Best enjoyed with your morning coffee!

Today's Main Pour: Zod 4 Released - The Sweet Validation We've Been Waiting For ☕️

After being in development for over a year, Zod 4 has finally reached beta status! This major update to the popular TypeScript validation library brings massive performance improvements and long-requested features.

The new release is faster, slimmer, more tsc-efficient, and implements some long-requested features. You can install the beta with pnpm upgrade zod@next.

What's brewing in Zod 4?

  • Performance: Zod 4 is significantly faster than its predecessor - 2.6x faster string parsing, 3x faster array parsing, and a whopping 7x faster object parsing. If you're working with complex schemas, this should give your application a nice boost.

  • TypeScript love: The team has completely redesigned and simplified the generics of ZodObject to avoid "instantiation explosions". TSC benchmarks show a 20x reduction in instantiations and much better compiler performance.

  • Lighter bundle size: The core bundle size has been reduced by approximately 57%, from 12.47kb to 5.36kb (gzipped). If you're trying to keep your bundles small, this is a big win.

  • Meet the Mini-Me - @zod/mini: For projects with strict bundle size constraints, there's a new sister library with a functional, tree-shakable API that corresponds one-to-one with zod. This slashes the core bundle size by an incredible 6.6x compared to zod@3.

  • Metadata system: Zod 4 comes with a new system for adding strongly-typed metadata to schemas, with a built-in JSON Schema conversion capability.

  • New z.interface() API: The new z.interface() API gives more control over optional properties and finally makes true recursive types possible - no more casting or z.lazy() needed for cyclical data structures!

  • File schemas: You can now validate File instances with size and MIME type checks.

Upgrade your project today (or not, you do you) or check out the full docs for a detailed look at all the improvements.

Fresh Beans: Latest Dev News 🌱

Next.js 15.3 Release Brings Turbocharged Builds and Routing Controls

Next.js 15.3 has arrived with several notable enhancements including Turbopack for builds (alpha), new client instrumentation and navigation hooks, and TypeScript plugin improvements.

The most exciting addition is Turbopack for production builds in alpha. After seeing over 50% of development sessions on Next.js 15 using Turbopack in dev mode, the team has extended this to builds with impressive results: 99.3% of integration tests for next build are already passing.

Early benchmarks show significant improvements: 28% faster than Webpack at 4 cores, 60% faster at 16 cores, and 83% faster at 30 cores. This is a nice win for large codebases.

Another welcome addition is community support for Rspack, providing an alternative bundler with Webpack compatibility. While not an official Next.js plugin, both teams are collaborating on shared foundations like SWC and Lightning CSS.

For frontend developers, there are two new navigation hooks: onNavigate for controlling routing behaviors, and useLinkStatus which returns a pending boolean to indicate when navigation is in progress. These give you finer-grained control over transitions and loading states.

Read more in the full release notes.

CSS Alert: Default Styles for H1 Elements Are Changing

Browsers are beginning to roll out changes in default User Agent styles for nested section headings. This affects how h1 elements are styled when inside sectioning elements like section, article, nav, and aside.

Previously, browsers would automatically adjust the size of h1 elements based on nesting depth within sectioning elements. For example, section > h1 would render with the same font-size as an h2. This behavior is now being removed.

Firefox began rolling this out to Beta users on March 31, 2025, with plans to roll out to all users in Firefox 140. Chrome has been showing deprecation warnings since version 136, and Safari will surely follow along fashionably late.

To avoid issues, explicitly define your document hierarchy using h2 for second-level headings, h3 for third-level, etc., and always define font-size and margin for h1 elements.

Quick Sips: Short & Sweet Bytes ⚡

  • Firebase Gets a Studio Makeover: Google has introduced Firebase Studio, a cloud-based, agentic development environment powered by Gemini that helps developers create and publish production-quality AI apps quickly. The preview includes everything needed to build full-stack AI apps in one place.

  • Rspack joins the Next.js ecosystem: Rspack has created a community-driven plugin bringing direct Rspack support to Next.js. This integration offers a fast, webpack-compatible alternative for teams not yet ready to adopt Turbopack. In development mode, it's 2x faster than webpack, and in production mode, it's 1.5x faster. It's particularly valuable for users deeply integrated into the webpack ecosystem.

  • React for Two Computers: Dan Abramov has published a thought-provoking article exploring React Server Components through the lens of "React for Two Computers." The piece examines how to split computations across server and client, and how React bridges these two environments. This is a deep dive that's worth your time if you're working with React Server Components. Dan also followed up with another fantastic blog post on “JSX Over The Wire”.

  • Cloudflare's Developer Week 2025: Cloudflare has wrapped up their Developer Week 2025 with a slew of announcements including AutoRAG for fully-managed Retrieval-Augmented Generation, Cloudflare Workflows reaching GA, Workers VPC for cross-cloud applications, and Realtime capabilities for interactive apps.

  • Node.js Testing Best Practices Guide Updated: Yoni Goldberg has refreshed his comprehensive Node.js testing guide with over 50 best practices. Key recommendations include starting with integration/component tests, running only a few E2E tests, writing tests during coding (never after), and testing "five known backend exit doors" - responses, state changes, external calls, message queues, and observability.

Weekly Coffee Fact ☕

Starbucks plans to open approximately 8 stores every day over the next few years – that's nearly 3,000 new locations annually where developers can camp out with their laptops! Meanwhile, Silicon Valley launches roughly the same number of AI startups daily trying to secure funding for an idea promising to "revolutionize" something that probably worked fine before.

Enjoyed this brew? Tell your friend. See you next Wednesday with a fresh brew!

JOIN THE BREW CREW

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