Skip to content

build(deps): regenerate bun.lock for bun 1.4 and clear npm audit - #423

Merged
MatiasOS merged 2 commits into
devfrom
build/bun-1-4-lockfile
Nov 20, 2026
Merged

MatiasOS merged 2 commits into
devfrom
build/bun-1-4-lockfile

Conversation

@MatiasOS

@MatiasOS MatiasOS commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR fixes the two CI checks that every PR to dev currently fails: build and audit. That includes #405 and the Zcash stack built on it (#406 to #413). Merge this first, then rebase #405 onto it.

1. build: regenerate bun.lock with Bun 1.4 (3bdc0fa)

CI installs with setup-bun bun-version: latest, which is now Bun 1.4. Bun 1.4 honours nested overrides. The lockfile was written by Bun 1.3, which dropped overrides.vitest.vite, so bun install --frozen-lockfile fails.

 bun.lock
-  "lockfileVersion": 1,
+  "lockfileVersion": 3,
+    "vitest": { "vite": "^7.3.2" },
 package.json
-  "packageManager": "bun@1.1.0",   "engines": { "bun": ">=1.1.0" }
+  "packageManager": "bun@1.4.2",   "engines": { "bun": ">=1.4.0" }

2. audit: clear the 6 root advisories (e1ad69c)

 "overrides": {
+  "decode-uri-component": "^0.5.1",
+  "uuid": "^11.1.1",
+  "ws": "^8.21.3",
+  "zod": "^4.6.6",
 },
 "devDependencies": {
-  "happy-dom": "^20.8.9",
+  "happy-dom": "^21.0.4",
Package Advisory Pulled in by Why the override is safe
ws 8.18.0 → 8.23.0 GHSA-58qx-3vcg-4xpx, GHSA-96hv-2xvq-fx4p old viem copies under @walletconnect/utils and @reown/appkit* The ws 7 consumers are Node-only: react-native/metro dev tooling, jayson, and @walletconnect/jsonrpc-ws-connection, which uses the native WebSocket in browsers.
uuid 8/9 → 11.1.1 GHSA-w5hq-g745-h8pq @metamask/sdk, @metamask/utils 8.x and 9.x have no patched release. 11 keeps the same named exports and still ships CJS.
zod 3 → 4.6.7 GHSA-mrhx-c7xc-m3w5 @reown/appkit-wallet, @coinbase/cdp-sdk 3.x has no patched release. Both packages use only APIs that zod 4 keeps, and both load their schemas under 4.6.7.
decode-uri-component 0.2.2 → 0.5.1 GHSA-qr28-fpjm-wq7f, GHSA-vcc3-ghjq-m6fr query-string 7 @walletconnect/utils lists query-string as a dependency but never imports it.
happy-dom 20 → 21.0.4 GHSA-834v-8h66-3h79, GHSA-c8p4-j97h-3vg8 dev dependency (vitest) Test-only.

The bun.lock diff touches only these packages, plus one hoisting move of @metamask/sdk-communication-layer.

Evidence

  • Before:
  • After (CI):
    • The build check passed on 3bdc0fa: bun install v1.4.5, 876 packages installed, ✓ built in 37.63s.
    • On e1ad69c, audit, build and both lint checks pass.
  • After (local, Bun 1.4.5):
    • npm run audit: found 0 vulnerabilities.
    • bun install --frozen-lockfile: no changes.
    • typecheck: clean.
    • test:run: 105 passed.
    • vite build: ✓.
  • Runtime smoke test: I served the production build with vite preview and drove it with Playwright. I loaded /, /#/1 and /#/settings, then opened the wallet modal on /#/devtools and clicked WalletConnect.
    • Before and after give identical results: 0 page errors, and the modal lists Rainbow, Base Account, MetaMask and WalletConnect.
    • No console errors mention walletconnect, reown, zod, uuid or websockets.

Merge Danger

Door: two-way

Reverting either commit restores the previous tree.

Blast Radius: wallet connect

  • The uuid, zod and ws overrides cross major versions inside the wallet stack: RainbowKit, WalletConnect, MetaMask SDK and Base Account. The smoke test covers opening the modal, not a completed wallet connection.
  • Contributors need Bun 1.4 or newer (bun upgrade), because Bun 1.3 can't read lockfileVersion 3.

Not covered here: npm run audit resolves dependencies fresh from package.json and never reads bun.lock. bun audit against the committed bun.lock still reports in-range vulnerabilities, such as stale react-router, vite, vitest and axios versions. Refreshing those is a separate follow-up.

Bun 1.4 honours nested overrides and fails --frozen-lockfile when
bun.lock does not record them. The lockfile was written by Bun 1.3,
which ignored overrides.vitest.vite, so CI (setup-bun latest) broke.

Bun now writes lockfileVersion 3, which older Bun cannot read, so
packageManager and engines move to Bun 1.4. No resolved versions change.
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚀 Preview: https://pr-423--openscan.netlify.app
📝 Commit: e1ad69cc49ecdbb806171a0647b1cecd257207b6

npm audit failed on 6 root advisories (29 findings, 17 high), all in
transitive wallet-stack deps except happy-dom:

- ws <8.21.0 (GHSA-58qx-3vcg-4xpx, GHSA-96hv-2xvq-fx4p): older viem
  copies under @walletconnect/utils and @reown/appkit* pin ws 8.18.0.
  Override ws to ^8.21.3. The ws 7 consumers (react-native/metro dev
  tooling, jayson, @walletconnect/jsonrpc-ws-connection) are Node-only;
  in the browser walletconnect uses the native WebSocket.
- uuid <11.1.1 (GHSA-w5hq-g745-h8pq): @metamask/sdk and @metamask/utils
  pull uuid 8 and 9, which have no patched release. Override to ^11.1.1,
  which keeps the same named exports and still ships CJS.
- zod <4.6.6 (GHSA-mrhx-c7xc-m3w5): no patched zod 3. Override to
  ^4.6.6. @reown/appkit-wallet and @coinbase/cdp-sdk only use APIs that
  zod 4 keeps, and both load their schemas under 4.6.7.
- decode-uri-component <=0.5.0 (GHSA-qr28-fpjm-wq7f, GHSA-vcc3-ghjq-m6fr):
  only reached through query-string 7, which @walletconnect/utils lists
  but never imports. Override to ^0.5.1.
- happy-dom <=21.0.3 (GHSA-834v-8h66-3h79, GHSA-c8p4-j97h-3vg8): test-only
  dev dependency, bumped to ^21.0.4.
@MatiasOS MatiasOS changed the title build(deps): regenerate bun.lock with bun 1.4 build(deps): regenerate bun.lock for bun 1.4 and clear npm audit Nov 20, 2026
@MatiasOS
MatiasOS merged commit 6b1a2b1 into dev Nov 20, 2026
4 checks passed
@MatiasOS
MatiasOS deleted the build/bun-1-4-lockfile branch November 20, 2026 21:59
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