Skip to content

build: upgrade Yarn 3.1 to 4.18 - #160

Merged
pfeerick merged 4 commits into
mainfrom
chore/yarn-4
Nov 18, 2026
Merged

pfeerick merged 4 commits into
mainfrom
chore/yarn-4

Conversation

@pfeerick

@pfeerick pfeerick commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Upgrades the bundled Yarn from 3.1.0 (2021) to 4.18.1. First step before bringing #136 (Electron) up to date, so the Electron PR only has to regenerate the lockfile once.

Changes

  • .yarn/releases/yarn-berry.cjs (3.1.0) → .yarn/releases/yarn-4.18.1.cjs
  • packageManager now yarn@4.18.1 — it previously declared yarn@1.22.22, which only worked because Yarn 1 defers to yarnPath
  • yarn.lock migrated from format v5 to v10. The diff is large but resolved versions are unchanged, apart from acorn@8.19.0 now being resolved as terser's optional peer
  • Remove the stale npm package-lock.json (accidentally committed in feat: Backup and Restore for model and radio settings #134), and add it to .gitignore so a locally generated one can't be committed again. It made lockfile-sniffing tools pick npm over Yarn, and an npm install following it installs different versions than yarn.lock.
  • .yarnrc.yml:
    • keeps enableScripts: true (electron, usb, esbuild, playwright need install scripts)
    • keeps the per-project cache (enableGlobalCache: false, compressionLevel: 0)
    • adopts Yarn 4 defaults for approvedGitRepositories (no git deps) and npmMinimalAgeGate (1 day — only affects resolving newly published versions, not installs from the lockfile)

Upgrading a local checkout

An existing node_modules from Yarn 3 can fail the install with an esbuild version mismatch. Delete node_modules and run yarn again.

Testing

Locally (Windows, Node 22): yarn install --immutable, fmt:check, test:types, lint:all, compile:production all pass.

Unit tests show 28 Windows-only failures caused by the tests themselves (execSync("node -e ...") quoting under cmd.exe in zipParser/backup specs, and absolute C:/ paths in the sdcard snapshot). CI runs unit tests on Linux, so these shouldn't appear here.

Follow-ups

  • Replace enableScripts: true with a per-package allowlist (dependenciesMeta.<pkg>.built)

🤖 Generated with Claude Code

- Replace bundled Yarn 3.1.0 release with 4.18.1
- Fix packageManager field, which incorrectly declared yarn@1.22.22
- Migrate yarn.lock to the v10 format (no version changes besides
  terser's optional acorn peer now being resolved)
- Keep install scripts and the per-project cache enabled; adopt Yarn 4
  defaults for git repo approval and the npm minimal age gate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.87%. Comparing base (96e3f9f) to head (af032b6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #160   +/-   ##
=======================================
  Coverage   36.87%   36.87%           
=======================================
  Files         116      116           
  Lines        4301     4301           
  Branches     1038     1038           
=======================================
  Hits         1586     1586           
  Misses       2509     2509           
  Partials      206      206           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

EdgeTX Buddy has been automatically deployed to Cloudflare.
✅ Preview: https://26230c81.buddy-7a6.pages.dev
✅ Storybook: https://26230c81.buddy-7a6.pages.dev/storybook

The project uses Yarn; this npm lockfile was committed by accident
in #134 and has drifted from yarn.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Yarn is the package manager and yarn.lock the source of truth. A stray
package-lock.json (accidentally committed in #134) made tools pick npm,
e.g. wrangler-action running `npm i` in the repo, and an `npm install`
following it installs different versions than yarn.lock. Ignore it so a
locally generated one can't be committed again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pfeerick
pfeerick merged commit 15a569e into main Nov 18, 2026
9 checks passed
@pfeerick
pfeerick deleted the chore/yarn-4 branch November 18, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant