ci(design-system): gate published bundle singleton externals#2035
ci(design-system): gate published bundle singleton externals#2035innerdvations wants to merge 4 commits into
Conversation
Add bundle contract tests, declared-imports check, and CI steps so singleton deps cannot be inlined into the published dist again.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Superseded by config-driven bundle-contract.test.ts in src/__tests__.
|



Summary
bundle-contract.config.json+test:bundle-contract) that asserts singleton deps stay external indist/index.mjsanddist/index.js.check:declared-importsto fail when production source imports a package not listed inpackage.jsondependencies/peers (catches undeclared@codemirror/state,@tanstack/react-virtual, etc.).Why is it needed?
strapi/strapi#26951 showed that inlining
@codemirror/stateinto the published design-system bundle breaks JSON fields in production admin. These gates prevent the same class of regression without relying on manual review.How to test it?
Merge order
Draft — CI is expected to fail on
mainuntil the fix lands.Merge after (or together with) #2034, which declares the missing singleton deps and externalizes them in the bundle. Once #2034 is on
main, these checks should pass on every PR.Related issue(s)/PR(s)