Commit a6742ae
authored
chore: replace rollup-plugin-dts with tsc for declaration emission (#385)
Remove rollup-plugin-dts and emit type declarations directly with tsc
via a new tsconfig.build.json. The build now produces lib/types/*.d.ts
alongside the existing lib/cjs and lib/esm bundles; the `types` /
`exports.types` entries in package.json point at lib/types/index.d.ts.
The rollup-plugin-dts was just combining all the types into a single
.d.ts file for this project. It wasn't rolling up the .d.ts from its
dependencies.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Primarily build/publish metadata changes, but it affects the
emitted/packaged TypeScript declaration layout and could break consumers
if the new `lib/types` output differs or is incomplete.
>
> **Overview**
> Build output now generates `.d.ts` files via `tsc -p
tsconfig.build.json` into `lib/types/` (declarations-only), rather than
using Rollup to bundle a single `lib/index.d.ts`.
>
> `package.json` and `exports.types` are updated to point consumers at
`./lib/types/index.d.ts`, and `rollup-plugin-dts` is removed from the
Rollup config and dev dependencies.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
9227a7d. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 2e9dab5 commit a6742ae
3 files changed
Lines changed: 17 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments