feat(ui): expose composed profile API via @clerk/ui/experimental#9136
feat(ui): expose composed profile API via @clerk/ui/experimental#9136alexcarpenter wants to merge 2 commits into
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
d61f967 to
98c4da7
Compare
8ffd832 to
480ab9b
Compare
98c4da7 to
e2f1c34
Compare
480ab9b to
30a2ce9
Compare
30a2ce9 to
b54f566
Compare
e2f1c34 to
38f6bb3
Compare
b54f566 to
c430ecc
Compare
38f6bb3 to
84be728
Compare
c430ecc to
bf2e82d
Compare
84be728 to
38a3186
Compare
| describe('@clerk/ui/experimental flat exports', () => { | ||
| for (const name of EXPECTED_EXPORTS) { | ||
| it(`exports ${name} as a component`, () => { | ||
| expect(typeof (experimental as Record<string, unknown>)[name]).toBe('function'); | ||
| }); | ||
| } | ||
|
|
||
| it('does not export the compound namespace objects', () => { | ||
| expect((experimental as Record<string, unknown>).UserProfile).toBeUndefined(); | ||
| expect((experimental as Record<string, unknown>).OrganizationProfile).toBeUndefined(); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
❓ wdyt about a snapshot test here? feels more maintainable instead of the static list
There was a problem hiding this comment.
Done. Roster is now a sorted-keys snapshot, plus a typeof-function guard over all exports and the namespace-absent check.
| // Each component is a top-level named export (not a property on a namespace | ||
| // object) so React Server Components create a client reference for it. That lets | ||
| // consumers render these directly in a Server Component tree without adding their | ||
| // own `'use client'` boundary — the `'use client'` directive lives on each leaf | ||
| // file, and re-exporting forwards those references unchanged. A namespace object | ||
| // (`UserProfile.Account`) would expose only the object as a client reference and | ||
| // break property access across the RSC boundary. | ||
| // | ||
| // The export roster is maintained once, in the per-directory `index` files under | ||
| // `../composed`; this module just re-exports it. |
There was a problem hiding this comment.
this context doesn't really seem relevant to maintain here
There was a problem hiding this comment.
Removed the re-export note; kept only the RSC rationale.
| { | ||
| "name": "@clerk/ui", | ||
| "version": "1.25.2", | ||
| "version": "1.24.2", |
There was a problem hiding this comment.
undo
| "version": "1.24.2", | |
| "version": "1.25.2", |
There was a problem hiding this comment.
Reverted to 1.25.2 (accidental downgrade).
bf2e82d to
04936da
Compare
38a3186 to
62c752b
Compare
62c752b to
8a799d3
Compare
- Restore @clerk/ui version to 1.25.2 (accidental downgrade) - Trim non-essential re-export note from experimental/index.ts - Convert flat-exports roster to a snapshot test
d3a7fbe to
f3a1169
Compare
8a799d3 to
d987559
Compare
Stack 7/7 (top). Wires everything up: the
composedbarrel, the@clerk/ui/experimentalflat named exports, the package.json/tsdown entrypoint, and the integration tests.This is the only PR that changes the public surface. Merges the full composed
UserProfile/OrganizationProfileAPI.Changesets live only on the release PR #9144; this PR carries none.
Stack
Reviewed as a stack. The 7 PRs merge bottom-up into release branch #9144, which integrates into
mainas a single unit.main(integration)@clerk/ui/experimental(public API)