Commit 762041e
fix(ci): RSC-safe
Two CI failures, two fixes.
**RSC build (publish job)**
The Next.js example's `app/layout.tsx` is a Server Component. Importing
`getInitialAppearanceScript` from the package root pulled in the full
client barrel, transitively `react-router`, which exports `useRouteError`
that doesn't exist in the React Server Components build of react-router —
Turbopack RSC bailed with "Export useRouteError doesn't exist in target
module".
Fix: ship `getInitialAppearanceScript` as a leaf subpath
`@tailor-platform/app-shell/initial-appearance`. The source already has no
React / react-router imports (only `type` imports from `theme-context` that
are erased at compile time), so it's a 1KB zero-runtime-dep entry — safe
to call from any RSC layout. Added to `vite.config.ts` build entries and
`package.json` exports. Top-level export still works for non-RSC consumers.
**Snapshot tests (ci job)**
base-ui's runtime emits inline `style` attributes with slightly different
ordering than what was captured in the snapshots after the previous
post-rebase refresh (commit 8372c7b). The drift hit 14 tests across
autocomplete / autocomplete-standalone / combobox / menu / select.
Regenerated with `pnpm vitest run -u`. Three consecutive local runs:
`1031 passed (1031)`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>initial-appearance subpath; refresh base-ui snapshots1 parent 4d4e84d commit 762041e
9 files changed
Lines changed: 24 additions & 121 deletions
File tree
- docs/api
- examples/nextjs-app/src/app
- packages/core
- __snapshots__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
0 commit comments