Skip to content

ci: fix preview deploy and move to Node 22 - #159

Merged
pfeerick merged 1 commit into
mainfrom
ci/pin-node-web-deploy
Nov 17, 2026
Merged

pfeerick merged 1 commit into
mainfrom
ci/pin-node-web-deploy

Conversation

@pfeerick

Copy link
Copy Markdown
Member

Why

preview-web started failing (first seen on #158) before it reaches any Buddy code:

/usr/local/bin/npm i wrangler@4
npm error Cannot read properties of null (reading 'edgesOut')

cloudflare/wrangler-action installs wrangler with npm in the working directory. In this job that was the checked out repo, so npm had to resolve Buddy's whole dependency tree. preview-web was the only job that never set a Node version, so it got the runner's default, which is now Node 22 with npm 10.9. That npm version crashes on this tree; npm 10.8 (Node 20) doesn't. I reproduced this in Docker on a clean checkout: Node 20 installs fine, Node 22 crashes.

release-web-prod isn't affected. It has no checkout, so wrangler installs into an empty directory, which works on npm 10.9.

What

  • preview-web: drop the checkout, like release-web-prod, and pass --branch=${{ github.head_ref }} and --commit-hash=<PR head SHA> to wrangler pages deploy. Wrangler would otherwise read these from git. It now installs into an empty directory on any Node version, and the job no longer installs Buddy's full dependency tree just to get wrangler. The job only runs for PRs from this repo, not forks, so the branch name comes from someone with write access.
  • Node 22: Node 20 is end of life, so move all setup-node steps, .node-version (which the devcontainer installs from) and the README to Node 22. There are no dependency changes.

Testing

I ran the Linux CI steps in Docker on Node 20 (as a control) and Node 22:

Step Node 20 Node 22
yarn --immutable ✅ ✅
lint:all, fmt:check, test:types ✅ ✅
yarn test ✅ 286/286 ✅ 286/286
build:storybook, compile:production ✅ ✅
yarn run pack AppImage + snap built AppImage + snap built

pack then failed on update metadata in my container on both versions. It's environment-specific, and this PR's CI covers pack on all three OSes.

actionlint reports the same notes on main and on this branch; they're existing shellcheck notes on unrelated steps. I couldn't run the Cloudflare deploy locally, so this PR's own preview-web run is the check for that part.

Follow-up: Node 24

Node 24 also needs a Yarn upgrade. The bundled Yarn 3.1.0 calls util.isDate, which Node 23 removed, so yarn install fails on Node 24. The plan is a separate PR moving to Yarn 4, which would also fix the stale packageManager: yarn@1.22.22 field and remove the stray package-lock.json.

🤖 Generated with Claude Code

The preview-web job broke: cloudflare/wrangler-action runs
`npm i wrangler@4` in the working directory, which was the checked out
repo, and npm 10.9 (the runner's default Node 22) crashes resolving
Buddy's dependency tree ("Cannot read properties of null (reading
'edgesOut')"). Drop the checkout, as release-web-prod already does, and
pass the branch and commit to `wrangler pages deploy` instead. wrangler
then installs into an empty directory, on any Node version.

Node 20 is end of life, so move CI, .node-version (used by the
devcontainer) and the README to Node 22.

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.34%. Comparing base (d0ff82f) to head (8b058a0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #159   +/-   ##
=======================================
  Coverage   36.34%   36.34%           
=======================================
  Files         116      116           
  Lines        4287     4287           
  Branches     1037     1037           
=======================================
  Hits         1558     1558           
  Misses       2522     2522           
  Partials      207      207           

☔ 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

Copy link
Copy Markdown

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

@pfeerick
pfeerick marked this pull request as ready for review November 17, 2026 11:59
@pfeerick
pfeerick enabled auto-merge (squash) November 17, 2026 12:00
@pfeerick
pfeerick disabled auto-merge November 17, 2026 12:07
@pfeerick
pfeerick merged commit ae3d432 into main Nov 17, 2026
18 checks passed
@pfeerick
pfeerick deleted the ci/pin-node-web-deploy branch November 17, 2026 12:08

This branch was successfully deployed

1 active deployment
preview — 8b058a0c Deployed Nov 17, 2026 by github-actions[bot]
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