Skip to content

chore: Migrate from Yarn 1 (Classic) to Yarn 3+ #1304

Description

@lucas-zimerman

Context

Yarn 1 (Classic) has been in maintenance mode since 2020 and we've been hitting issues caused by its aging dependency resolution.

Most recently, during the JS SDK bump to 10.60.0 (#1303), Yarn 1 generated a corrupt yarn.lock entry for micromatch@4.0.8 — omitting its braces and picomatch dependencies entirely. This caused CI to fail with Cannot find module 'braces' and required manually patching the lockfile plus adding a braces resolution workaround in package.json.

Proposal

Migrate to Yarn 3+ (Berry) using nodeLinker: node-modules mode for maximum compatibility. This would give us:

  • Reliable lockfile generation and dependency hoisting
  • Better performance and caching
  • Active maintenance and security updates
  • Stricter dependency resolution that catches issues like the above at install time

Scope

  • Run corepack enable && yarn set version stable
  • Configure .yarnrc.yml (likely nodeLinker: node-modules for compatibility)
  • Update .gitignore for Yarn Berry artifacts (.yarn/cache, .yarn/releases, etc.)
  • Update CI workflows for Yarn 3 commands
  • Verify sample apps and .yalc setup still work
  • Remove braces resolution workaround from package.json once lockfile is reliable
  • Update contributing docs if any

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions