Commit 3a050ee
authored
fix(build): stop dts emit leaking @commercetools-frontend/ui-kit into published types (#3254)
* fix(build): stop dts emit leaking @commercetools-frontend/ui-kit into published types
The compound components (Constraints, RadioInput, ViewSwitcher) emitted
import("@commercetools-frontend/ui-kit").T...Props in their published .d.ts.
Strict consumers installing only the granular @commercetools-uikit/* packages
don't have the aggregate preset, so the reference resolved to any (TS7006).
Root cause: @commercetools-frontend/ui-kit is a root devDependency (so the
.visualroute/bundlespec fixtures resolve under strict pnpm), which makes the
bare specifier resolvable during preconstruct's declaration emit, and TS prefers
it over the in-package relative path. The build now hides that symlink for the
preconstruct build step only (trap-guarded restore), forcing the correct
relative specifier. No component API or source changed.
Refs: commercetools/identity#757
* build: assert no aggregate-preset leak in emitted declarations
Add a post-emit regression guard to scripts/build.sh that fails the build
if any granular package's published declarations reference the aggregate
@commercetools-frontend/ui-kit preset by its bare specifier. Future-proofs
the FEC-938 declaration-emit workaround against being dropped, preconstruct
changing resolution, or a new compound component reintroducing the pattern.
Also reword the changeset to be consumer-facing.1 parent bd4ccb7 commit 3a050ee
2 files changed
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
9 | 35 | | |
10 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
11 | 54 | | |
0 commit comments