Turborepo 2.0 hits the nitrous

Issue #295.June 6, 2024.2 Minute read.
Bytes

I’ve got fantastic news for you. Today is the last day of the launch sale for our new đź”® React Query course, which means you’ll never have to hear about it again. Get 30% off until midnight, or don’t – frankly I’m just kind of tired at this point.

Today’s issue: Microsoft’s death blow to React, the future of Framer Motion, and the doc site generator that’ll make you want to listen to Muse for the next 3 hours.

Welcome to #295.


Eyeballs logo

The Main Thing

Sleepy Frodo

Turborepo after it finishes saving 347 years of compute time

Turborepo 2.0 hits the nitrous

A lot’s changed for Turborepo since they launched v1.0 back in December 2021: they got acquired by Vercel, they launched the Turbopack JS bundler, Jared Palmer (Turbo’s creator) built v0 and became Vercel’s VP of AI, and it helped save “347 years of compute time using Vercel Remote Cache”.

Oh, and its npm downloads have also jumped almost exactly 100x to 2.4 million a week 🥵.

Turborepo 2.0 shows no signs of slowing down, and is another big step towards helping you unlock more scalable monorepos and faster workflows in polyrepos single-package workspaces too.

Let’s get to the highlights:

  • New terminal UI with improved clarity for logs and interactive tasks that allow you to do things like running specific test suites or handling DB migrations

  • Watch mode that gives you dependency-aware hot-reloading with any tool or framework in your repo

  • All-new docs with more monorepo fundamentals and integration guides

Bottom Line: There’s no shortage of pure hatred frustration out there for monorepos, but tools like Turborepo and Nx are leading the way in making them faster, easier to work with, and much more scalable. Godspeed.

        

bright data logo

Our Friends
(With Benefits)

Bobby hill pointing his two fingers at each other

When you find a web scraper that actually works

Make your web scrapers unstoppable with Bright Data

They give you all-in-one scraping infrastructure that can scale to the moon – so you’ll never get blocked or rate limited again.

Here’s how:

  • Run your Puppeteer, Selenium, and Playwright scripts on fully hosted browsers (see Fireship’s video explainer for a great demo)

  • Overcome blocks with their CAPTCHA auto-solvers, automated proxy rotation, and browser fingerprinting (99.9% success rate)

  • Save money with their auto-scaling infrastructure that lets you manage all your scrapers from a single API (92% of dev teams report reduced operational costs)

Take 10 min to try the scraping browser API for free – and see why organizations like Stanford and Microsoft use Bright Data to get the data they need.


Spot the Bug logo

Spot the Bug

Sponsored by Raygun

How much are programmers really using AI and how useful is it? Raygun surveyed hundreds of software developers to find out, and the responses revealed some surprising strengths and notable gaps.

class Stack {
  constructor() {
    this.items = [];
  }

  push(element) {
    this.items.push(element);
  }

  pop() {
    if (this.isEmpty()) {
      throw new Error("Stack is empty");
    }
    return this.items.pop();
  }

  peek() {
    if (this.isEmpty()) {
      throw new Error("Stack is empty");
    }
    return this.items[0];
  }

  isEmpty() {
    return this.items.length === 0;
  }

  size() {
    return this.items.length;
  }

  clear() {
    this.items = [];
  }
}

Cool Bits logo

Cool Bits

  1. Rhys Sullivan made a website called Shiptalkers which lets you “find out if the person you’re losing an argument to on Twitter actually ships code or if it’s all just shiptalk”.

  2. Salma Alam-Naylor and Lazar Nikolov are hosting a free livestream on How to trace performance issues on the frontend and backend of your app for Sentry. You’ll learn how to fix poor Core Web Vitals, slow DB queries, the dreaded server-side request waterfall, and more. [sponsored]

  3. Matt Perry (the creator of Framer Motion, not Monica Geller’s boyfriend) wrote an article asking if we still need Framer Motion after 5 years of web platform improvements. Spoiler alert – the creator of Framer Motion says we still need it.

  4. Juntao QIU and Martin Fowler definitely just broke the record for longest article ever written about data fetching patterns for single page apps.

  5. Lydia Gorham from Stytch broke down a polarizing debate: using JWTs vs. Sessions for auth. Two auth approaches enter the ring, but only one can emerge victorious… right? [sponsored]

  6. Astro’s doc site generator, Starlight turned 1 this past week, and Sarah Rainsberger teased what’s coming next for the tool in her talk. Time to listen to Muse for the next 3 hours.

  7. Turso just introduced Native Vector Search for SQLite. If you have no idea what those words mean, we’ll get you caught up in Monday’s issue of Bytes.

  8. Callstack is hosting 3 hands-on workshops for advanced React and React Native developers, covering React Native Performance, React Server Components and Actions, and Advanced Testing Strategies. [sponsored]

  9. The Chrome team wrote an article about customizing your performance workflows in DevTools.

  10. Microsoft Edge apparently got a lot faster by switching from React to WebUI 2.0 for rendering its UI. As someone with a popular React course, I find this sort of baseless propaganda deeply upsetting.


Spot the Bug logo

Spot the Bug: Solution

Sponsored by Raygun

In a Stack data structure, the last element added is the first one to be removed (LIFO). The peek method should return the last element added, not the first one.

class Stack {
  constructor() {
    this.items = [];
  }

  push(element) {
    this.items.push(element);
  }

  pop() {
    if (this.isEmpty()) {
      throw new Error("Stack is empty");
    }
    return this.items.pop();
  }

  peek() {
    if (this.isEmpty()) {
      throw new Error("Stack is empty");
    }
    return this.items[this.items.length - 1];
  }

  isEmpty() {
    return this.items.length === 0;
  }

  size() {
    return this.items.length;
  }

  clear() {
    this.items = [];
  }
}