Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
df650c2 to
9301469
Compare
|
@avivkeller wdyt about this? Does it make sense? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9176 +/- ##
==========================================
- Coverage 86.12% 86.11% -0.02%
==========================================
Files 86 86
Lines 6041 6041
Branches 357 357
==========================================
- Hits 5203 5202 -1
- Misses 834 835 +1
Partials 4 4 ☔ View full report in Codecov by Harness. |
📦 Build Size ComparisonSummary
|
Yes, definitely. Keeping React in dependencies causes duplicate React installations in consumer apps if their React 19 version doesn't match exactly. This leads to broken hooks at runtime. peerDependencies is the standard way to fix this. I'm currently working on improving the external usage experience of the library, so this change is essential. |
9301469 to
dafab94
Compare
dafab94 to
dd4df87
Compare
dd4df87 to
6d60942
Compare
6d60942 to
7734cb5
Compare
7734cb5 to
52588c5
Compare
|
Updated the commit to include a minor infrastructure fix. Added Ready for review. CC @ovflowd @avivkeller |
chore(infra): add pnpm-lock.yaml to .prettierignore
52588c5 to
cc0f889
Compare
Context
The
ui-componentspackage hadreactlisted underdependencies. When published, this metadata structure forces consumer applications running a different sub-version of React 19 to install a duplicate instance of React, triggering runtimeInvalid hook callerrors.Changes
To resolve external runtime duplication while preserving strict React 19 compatibility and seamless local workspace development, this PR applies the following:
reacttopeerDependenciesinpackages/ui-components/package.jsonusing thecatalog:peer-react19protocol to delegate runtime React resolution to the host/consumer application.reactindevDependenciesto guarantee that local package builds (pnpm build), test utilities, and TypeScript types compilation inside the isolated package directory do not break.pnpm-workspace.yaml): Configuredcatalog:peer-react19to target a loose^19.0.0range. When the library is published, pnpm will substitute the catalog protocol with a standard open SemVer range (^19.0.0) matching any consumer's native React 19 installation..changeset/cozy-teeth-speak.md) to comply with the workspace publishing policy.Fixes #9175