chore(deps): move UI libraries from peerDependencies to dependencies - #4
Merged
Conversation
Only react, react-dom, and @inertiajs/react remain as peers — these must be deduplicated with the host app to avoid breaking hooks and the Inertia router. Everything else (radix-ui, recharts, sonner, react-day-picker, cmdk, date-fns, lucide-react, class-variance-authority, clsx, tailwind-merge) now installs automatically with `npm install monorailphp`, so host apps no longer need to declare them. Also drops a stray self-reference to `monorailphp` in `dependencies` that was a leftover from an earlier release.
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
radix-ui,recharts,sonner,react-day-picker,cmdk,date-fns,lucide-react,class-variance-authority,clsx,tailwind-merge) frompeerDependenciesintodependenciesso they install automatically withnpm install monorailphp.react,react-dom, and@inertiajs/reactas peers — these must stay a single instance in the host bundle (hooks + Inertia router).monorailphpself-reference fromdependencies(leftover from an earlier release).docs/getting-started/installation.mdto match.Motivation
Host apps using Monorail currently have to satisfy ~10 peer deps manually (npm 7+ does it for you, but pnpm/yarn with strict peer resolution don't). Most of these libs don't need to dedupe with the host — only React and Inertia do. Promoting them to regular deps removes the friction for new users without harming bundle dedupe in practice (npm/pnpm still dedupes when versions match).
Test plan
npm install monorailphpin a clean Laravel + Inertia React app pulls in all UI libraries automatically