Combined critique #46: dedup tooling devDeps via bun workspace catalog - #854
Merged
Merged
Conversation
10 games + apps/dev + apps/desktop repeated an identical devDependencies
block. Move the shared versions into a root workspaces.catalog and
reference them with "catalog:".
ensure-ready.ts, agent-preflight.ts, and packages/jgengine/src/pkg.ts
read package.json.workspaces as a bare string[] and would have thrown
on the new object form ({ packages, catalog }) — teach all three to
accept both shapes first.
apps/web stays on its own vite 8 / @vitejs/plugin-react 6 / pinned
@types/react-dom, unrelated to the shared catalog (untouched, noted
in the PR).
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
Problem
All 10 games +
apps/dev+apps/desktoprepeated an identicaldevDependenciesblock (@tailwindcss/vite,@types/react,@types/react-dom,@types/three,@react-three/drei,@vitejs/plugin-react,tailwindcss,typescript,vite) with no shared source of truth.Fix
package.jsonworkspacesconverted from a barestring[]to the object form{ packages, catalog }, with the shared dev-dep versions defined once incatalog.Games/*+apps/dev+apps/desktopdevDependenciesnow reference"catalog:"instead of a pinned version string.bun installresolves the catalog refs;bun.lockcommitted with a new top-level"catalog"block.Critical-order trap (handled first, same PR)
scripts/ensure-ready.ts,scripts/agent-preflight.ts, andpackages/jgengine/src/pkg.ts(findWorkspaceRoot, used by thejgengineCLI'sdoctor/create) all readpackage.json.workspacesassuming a barestring[]— each now accepts bothstring[]and{ packages, catalog? }before the rootpackage.jsonwas converted, sobun run agent:preflightnever throws.Untouched — flagged, not silently left
apps/webstays on its own newer stack (vite ^8.1.3,@vitejs/plugin-react ^6.0.3,@types/react-dompinned to19.2.3rather than^19) — an unexplained major-version split from thevite ^6.2.2/@vitejs/plugin-react ^4.3.4used everywhere else. Not part of this catalog (would need someone to confirm apps/web's upgrade was intentional and either backport it repo-wide or keep it isolated); worth a follow-up look.packages/*,registry,examples/*also have some overlapping dev-dep versions but are out of scope here — published packages resolving through a workspace catalog at publish time wasn't verified safe, so left as-is.Gate (local)
bun install— resolves catalog refs,bun.lockupdatedbun run agent:preflight— ok (exercises the new dual-shapeworkspacesreader)bun run build— okbun scripts/check-types-all.ts— 29/29 (baseline)bun run test:all— 4503 pass, 0 fail, 1 skipGenerated by Claude Code