Migrate from npm + prettier to pnpm + oxfmt#330
Merged
esimkowitz merged 1 commit intomainfrom Apr 27, 2026
Merged
Conversation
Swap the JS toolchain to pnpm (pinned via packageManager + Corepack) and replace prettier with oxfmt for non-Rust files. dx fmt continues to own all *.rs files. - package.json: drop prettier, add oxfmt 0.47, add packageManager pin and pnpm.onlyBuiltDependencies allowlist for @parcel/watcher (Tailwind's filesystem watcher), rewrite scripts to use pnpm/pnpm exec and the new oxfmt --write/--check commands - Rename .prettierrc -> .oxfmtrc.json and .prettierignore -> .oxfmtignore (oxfmt accepts prettier-compatible options); fix the *.rs ignore comment to say "dx fmt" instead of "rustfmt" - CI (ci.yml + build-site.yml): add pnpm/action-setup@v4 before setup-node, switch cache to "pnpm", use pnpm install --frozen-lockfile and pnpm <script> - Husky pre-commit: npx lint-staged -> pnpm exec lint-staged - VSCode: replace esbenp.prettier-vscode with oxc.oxc-vscode for formatter and recommended extensions - Docs: update README and CLAUDE.md to use pnpm; add Corepack note - One-time format sweep from oxfmt: Cargo.toml feature arrays broken into multiline form, public/js/*.js cleaned up (mixed quotes, missing semicolons, missing trailing newlines) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
packageManagerso Corepack auto-installs the right version locally and in CI) and replace prettier with oxfmt 0.47 for non-Rust files.dx fmtstill owns all*.rsfiles.ci.yml,build-site.yml) to install viapnpm install --frozen-lockfilewithpnpm/action-setup@v4andcache: "pnpm"..prettierrc→.oxfmtrc.jsonand.prettierignore→.oxfmtignore(oxfmt accepts the same option names). Husky and VSCode configs updated;oxc.oxc-vscodereplacesesbenp.prettier-vscode.Notable Decisions
pnpm.onlyBuiltDependencies: ["@parcel/watcher"]is committed topackage.json. pnpm fail-closes on dependency install scripts by default;@parcel/watcher(pulled in by@tailwindcss/clifor--watchmode) needs that script approved. This makes the trust decision reproducible and reviewable instead of living in each developer's pnpm-store state.Cargo.tomllong inline feature arrays became multiline, andpublic/js/darkmode.js+public/js/ghpages_redirect.jswere cleaned up (mixed quotes, missing semicolons, missing trailing newlines). Prettier should have caught the JS files via its glob but apparently never had — oxfmt fixed them.package-ecosystem: "npm"block is unchanged — Dependabot's "npm" ecosystem natively supportspnpm-lock.yaml, so renaming would break it.Test plan
formatjob passes (oxfmt --check + dx fmt --check)buildjob passes (pnpm build:webproduces the wasm bundle)clippyjob passes (untouched by this PR)build-siteworkflow passes on merge to mainpnpm installis clean (no "Ignored build scripts" warning)pnpm format:checkandpnpm formatboth workpnpm serve:webstarts Tailwind watcher + dx servepnpm exec lint-stagedon a staged JS/CSS change🤖 Generated with Claude Code
Note
Medium Risk
Mostly build/tooling changes, but it alters the package manager, lockfile, formatting pipeline, and CI workflows, which can break installs or builds if pnpm/corepack assumptions differ across environments.
Overview
Switches the JS toolchain from npm to pnpm, updating GitHub Actions workflows to set up pnpm, cache it, install via
pnpm install --frozen-lockfile, and run build/format scripts through pnpm.Replaces Prettier with
oxfmtfor non-Rust formatting (includinglint-stagedand VSCode defaults), addspnpm-lock.yaml/pinspnpm@10.33.2, and removespackage-lock.json.Includes a repo-wide formatting sweep (e.g.,
Cargo.tomlformatting and small JS cleanup inpublic/js/*).Reviewed by Cursor Bugbot for commit d85b3ff. Bugbot is set up for automated code reviews on this repo. Configure here.