Skip to content

chore: standardize on bun for dev and CI#152

Merged
jcstein merged 4 commits into
mainfrom
chore/standardize-on-bun
Jun 4, 2026
Merged

chore: standardize on bun for dev and CI#152
jcstein merged 4 commits into
mainfrom
chore/standardize-on-bun

Conversation

@jcstein

@jcstein jcstein commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

Settles on bun as the single build/runtime tool for dev and CI, per the decision in #150.

  • README: yarnbun commands, documents bun as the package manager
  • CI (deploy.yml, lint.yml): actions/setup-node + yarn → oven-sh/setup-bun@v2 + bun install --frozen-lockfile; lint steps run via bun run <script>
  • package.json: lint/typecheck/format moved into scripts so CI and devs always use the locked local bins; the pagefind step is chained explicitly into build — bun does not auto-run post* lifecycle scripts (yarn v1 did), so the old postbuild would have silently stopped running and broken search
  • prettier added as a pinned devDependency (it was never declared — npx/bunx just fetched latest)
  • Removed yarn.lock and .npmrc (npm-specific)
  • Regenerated bun.lock from scratch. The committed one was migrated from yarn.lock, leaving tarball-URL resolutions with empty metadata — on a clean install bun linked only 7 of ~40 binaries. node_modules/.bin/tsc didn't exist, so CI's tsc fell through to the GitHub runner's global TypeScript 6, which rejects the deprecated baseUrl in tsconfig (TS5101). pagefind's bin was missing too, which would have broken the Pages deploy the same way after merge.
  • nextra pinned to ~4.5.0 (resolves 4.5.1): the fresh lockfile resolve pulled in nextra 4.6.1, whose stricter component validation breaks prerendering several pages (expected nonoptional, received undefined → at children). Upgrading nextra belongs in its own PR.

Note on resolutions

bun warns that it ignores the nested yarn-style resolutions (e.g. @eslint/config-array/minimatch). The flat ones are honored, and the nested ones resolve to the same patched versions anyway, so they're left in place as documentation of the security pins.

Verification (clean room: rm -rf node_modules + bun 1.3.14, same as CI)

  • bun install --frozen-lockfile ✅ — all bins link
  • bun run lint / bun run typecheck / bun run format:check
  • bun run build ✅ — static export + pagefind index lands in out/_pagefind
  • Lint CI green on the PR ✅

⚠️ The deploy workflow only runs on push to main, so the bun-based Pages deploy gets its first real run after merge — worth watching that one deploy.

Closes #150

🤖 Generated with Claude Code

Settles #150 on bun as the single build/runtime tool:

- README: yarn -> bun commands, note bun as the package manager
- deploy.yml / lint.yml: setup-node + yarn -> oven-sh/setup-bun + bun install --frozen-lockfile
- package.json: chain pagefind into the build script explicitly, since bun
  does not auto-run post* lifecycle scripts (yarn v1 did) — keeps search
  indexing working
- remove yarn.lock and .npmrc; regenerate bun.lock (was stale vs package.json)

Note: bun ignores the nested yarn-style resolutions (warns on install) but
the affected transitive deps resolve to the same patched versions anyway.

Closes #150

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jcstein jcstein self-assigned this Jun 4, 2026
@jcstein jcstein requested a review from nuke-web3 June 4, 2026 20:08
jcstein and others added 2 commits June 4, 2026 14:09
bunx in CI resolved a newer TypeScript instead of the locked 5.9.2
(TS 6.x errors on the deprecated baseUrl in tsconfig), and prettier was
never a devDependency at all — npx/bunx just fetched latest. Move the
lint/typecheck/format commands into package.json scripts so they always
use the locally installed, locked versions, and add prettier@^3.8.3 as
a devDependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… link bins

The previous bun.lock was migrated from yarn.lock, leaving tarball-URL
resolutions with empty metadata. On a clean install bun linked only 7 of
~40 binaries — node_modules/.bin/tsc didn't exist, so CI's 'tsc' fell
through to the GitHub runner's global TypeScript 6, which rejects the
deprecated baseUrl in tsconfig (TS5101). pagefind's bin was missing too,
which would have broken the Pages deploy the same way.

Regenerating the lockfile from scratch fixes bin linking. The fresh
resolve pulled in nextra 4.6.1, whose stricter component validation
breaks prerendering several pages, so nextra is pinned to ~4.5.0
(resolves 4.5.1) — upgrading nextra belongs in its own PR.

Verified in a clean room (rm -rf node_modules + frozen install):
lint, typecheck, prettier, and full build incl. pagefind all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nuke-web3

Copy link
Copy Markdown
Member
 bun install
bun install v1.1.29 (6d43b366)
  🚚 @solana/rpc-api [3381/3381]

this one was hanging for me on first bun install but resolved when I tried again... but why do we have that as a dep at all? Maybe we need an audit of deps too in this PR?

Otherwise LTGM

@nuke-web3

nuke-web3 commented Jun 4, 2026

Copy link
Copy Markdown
Member

Also afaik we should commit bun.lockb that is missing in the PR, I rebased on this PR branch in #146 that includes that lockfile

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jcstein

jcstein commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

Replying to both comments:

Re: @solana/rpc-api — good catch to question it, but it's transitive, not direct:

wagmi → @wagmi/connectors → @base-org/account (Coinbase's Base wallet SDK)
      → @coinbase/cdp-sdk → @solana/kit → @solana/rpc-api

@wagmi/connectors ships every wallet connector, and the Coinbase/Base one supports Solana, so its SDK lands in node_modules. We only use the injected connector (app/providers.tsx), so none of it reaches the client bundle — install-time weight only, and not removable without dropping wagmi. Our direct deps are lean (16 + 8 dev, all used); the 3381-package tree is just the wagmi/viem ecosystem. A proper dep audit is worth doing but orthogonal to this PR — happy to open a follow-up issue.

Re: bun.lockb — the lockfile is committed: it's bun.lock, the text format that replaced binary bun.lockb as the default in bun 1.2 (better diffs, mergeable). Your paste shows bun 1.1.29, which predates the text format and silently ignores bun.lock — that's also exactly why your first install hung: it did a full cold resolve of all 3381 packages, unpinned. bun upgrade fixes both (CI uses latest). We shouldn't commit both formats — two lockfiles that can silently drift apart, with which one wins depending on bun version.

The bun.lockb in #146 was generated by the old bun, so it should be dropped on rebase. Added a README note about the >= 1.2 requirement in 10f7c0a.

@jcstein jcstein merged commit 95f3d9e into main Jun 4, 2026
2 of 3 checks passed
@jcstein jcstein deleted the chore/standardize-on-bun branch June 4, 2026 22:39
@jcstein jcstein mentioned this pull request Jun 4, 2026
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.

chore: decide on one build/runtime for dev and CI

2 participants