You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 15e8071
Browse filesBrowse the repository at this point in the historyBrowse files
docs: note that new public exports need an explicit root re-export
Document the rollup-plugin-dts nested-barrel declaration-drop quirk that this
PR's NavigationItem/NavigationNavbar fix addresses, so future maintainers adding
custom exports know to add an explicit re-export in src/index.tsx and verify
against the built dist/index.d.ts.
Signed-off-by: marblom007 <[email protected]>
Copy file name to clipboardExpand all lines: AGENTS.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,17 @@ Keep that peer list in step with the enforced set in the test above. Use the
66
66
Known live instance: [#1735](https://github.com/layer5io/sistent/issues/1735) (`date-fns` in
67
67
`src/custom/UniversalFilter.tsx`).
68
68
69
+
## New public exports need an explicit root re-export
70
+
71
+
`rollup-plugin-dts` (used by tsup for the declaration bundle) silently drops symbols that reach
72
+
the root barrel only through a nested `export * from './custom'` (or `./base`, etc.) - the runtime
73
+
export in `dist/index.*js` survives, but the declaration is missing from `dist/index.d.ts`, so
74
+
`import { Foo, type FooProps } from '@sistent/sistent'` fails type-checking downstream. When you add
75
+
a new public component or type in a `src/<domain>/` subtree, also add an explicit
76
+
`export { Foo, type FooProps } from './<domain>/Foo';` to `src/index.tsx` (see the documented block
77
+
of examples there, e.g. `FeedbackButton`, `NavigationItem`). Verify by building and grepping
78
+
`dist/index.d.ts` for the symbol - a green `jest`/lint run will not catch this.
79
+
69
80
## Repo state that looks broken but is pre-existing
70
81
71
82
`prettier --check` fails on ~82 files and `tsc --noEmit` reports errors across `src/` (including
0 commit comments