Repository navigation
ci: fix preview deploy and move to Node 22 - #159
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
EdgeTX Buddy has been automatically deployed to Cloudflare. |
pfeerick
marked this pull request as ready for review
November 17, 2026 11:59
pfeerick
enabled auto-merge (squash)
November 17, 2026 12:00
pfeerick
disabled auto-merge
November 17, 2026 12:07
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
preview-webstarted failing (first seen on #158) before it reaches any Buddy code:cloudflare/wrangler-actioninstalls 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-webwas 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-prodisn'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, likerelease-web-prod, and pass--branch=${{ github.head_ref }}and--commit-hash=<PR head SHA>towrangler 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.setup-nodesteps,.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:
yarn --immutablelint:all,fmt:check,test:typesyarn testbuild:storybook,compile:productionyarn run packpackthen failed on update metadata in my container on both versions. It's environment-specific, and this PR's CI coverspackon all three OSes.actionlintreports the same notes onmainand on this branch; they're existing shellcheck notes on unrelated steps. I couldn't run the Cloudflare deploy locally, so this PR's ownpreview-webrun 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, soyarn installfails on Node 24. The plan is a separate PR moving to Yarn 4, which would also fix the stalepackageManager: yarn@1.22.22field and remove the straypackage-lock.json.🤖 Generated with Claude Code