chore/dls-922-prod-peer-dev-deps - #845
Conversation
…po & libraries Signed-off-by: Simon Bruneaud <simon.bruneaud@ledger.fr>
Signed-off-by: Simon Bruneaud <simon.bruneaud@ledger.fr>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Reclassifies package dependencies so internal UI primitives install transitively while framework/build dependencies remain peers.
Changes:
- Moves web UI utilities and primitives into production dependencies.
- Removes
@types/reactfrom React Native package manifests. - Updates installation docs, Rollup externals, lockfile, and release plans.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
package.json |
Removes empty dependencies block. |
package-lock.json |
Records dependency classifications. |
libs/ui-rnative/package.json |
Removes React type declarations. |
libs/ui-rnative-visualization/package.json |
Removes React type declarations. |
libs/ui-react/vite.config.ts |
Externalizes runtime dependencies. |
libs/ui-react/src/lib/Components/core/Tooltip/Tooltip.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/TileButton/TileButton.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/Switch/Switch.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/Spinner/Spinner.mdx |
Updates peer installation. |
libs/ui-react/src/lib/Components/core/Select/Select.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/Popover/Popover.mdx |
Clarifies bundled dependency. |
libs/ui-react/src/lib/Components/core/Menu/Menu.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/Link/Link.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/IconButton/IconButton.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/Dialog/Dialog.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/Checkbox/Checkbox.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/Button/Button.mdx |
Simplifies installation. |
libs/ui-react/src/lib/Components/core/Banner/Banner.mdx |
Simplifies installation. |
libs/ui-react/README.md |
Updates peer setup instructions. |
libs/ui-react/package.json |
Reclassifies UI runtime dependencies. |
libs/ui-react/ai-rules/RULES.md |
Documents dependency ownership. |
libs/ui-react/.storybook/docs/SetupTailwind.mdx |
Updates setup command. |
libs/ui-react/.storybook/docs/Setup.mdx |
Removes separate primitive setup. |
libs/ui-react/.storybook/components/SetupNote.tsx |
Lists remaining peers. |
libs/ui-react-visualization/package.json |
Reclassifies styling utilities. |
libs/design-core/package.json |
Makes Tailwind a peer dependency. |
.nx/version-plans/version-plan-1787065800000-ui-rnative.md |
Plans native package patch. |
.nx/version-plans/version-plan-1787065800000-ui-rnative-visualization.md |
Plans native visualization patch. |
.nx/version-plans/version-plan-1787065800000-ui-react.md |
Plans web package patch. |
.nx/version-plans/version-plan-1787065800000-ui-react-visualization.md |
Plans web visualization patch. |
.nx/version-plans/version-plan-1787065800000-design-core.md |
Plans design-core patch. |
| - `@ledgerhq/lumen-ui-react` declares only `react`, `react-dom`, and | ||
| `@ledgerhq/lumen-design-core` as peer dependencies. The component primitives | ||
| (Radix UI, Base UI, `class-variance-authority`, `clsx`, `tailwind-merge`, | ||
| `@tanstack/react-table`) ship as regular dependencies, so consumers do not | ||
| need to install them separately. |
📦 Dev packages publishedTarballs are hosted as assets on a per-PR GitHub pre-release and are deleted automatically when this PR is closed.
|
Signed-off-by: Simon Bruneaud <simon.bruneaud@ledger.fr>
|
Signed-off-by: Simon Bruneaud <simon.bruneaud@ledger.fr>
| "@radix-ui/react-checkbox": "^1.3.2", | ||
| "@radix-ui/react-dialog": "^1.1.15", | ||
| "@radix-ui/react-slot": "^1.2.3", | ||
| "@radix-ui/react-switch": "^1.2.6", | ||
| "@radix-ui/react-tooltip": "^1.2.8", |
There was a problem hiding this comment.
[mid] At the time we set this up, Radix was a peer so teams that already used it (ecommerce/LES) would share one version with Lumen, instead of Lumen nesting a second copy.
For cva, clsx, and tailwind-merge there was a second reason: we wanted consumers to install and use those utilities themselves.
That’s the model in ADR 008 — Bundling Strategy.
If we want to change direction let's, please update/discuss the ADR before.
| 'tailwind-merge', | ||
| 'd3-array', | ||
| 'd3-scale', | ||
| 'd3-shape', |
There was a problem hiding this comment.
ah cool, I have already added some of them in this hot-fix PR
I wanted to add them all including d3 but it was way our of the scope of the fix, happy to see this 👌
| "tslib": "^2.3.0" | ||
| }, | ||
| "peerDependencies": { | ||
| "tailwindcss": "^4.1.17" |
There was a problem hiding this comment.
I likely won't be around when this gets merged, but I'd hope yo take some time to discuss this with @aquelemiguel and decide whether it makes more sense to keep clsx, tailwind-merge, and cva as peer dependencies — the original idea was to position them as standard tools to use alongside Lumen.
As for Radix, I think moving it to dependencies is fine, but keep in mind that some teams are using it internally and may be behind our current versions (which could result in two versions of the same package in their app).
But giving we dropping the usage anyways, it's fine.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>



No description provided.