Repository navigation
fix(packaging): auto-discover component exports in source tarball - #199
Merged
Merged
Conversation
The package-source.js script only included exports that were already in packages/core/package.json. Components like TopNav, TabList, Slider, Switch, NumberInput, RadioList, Table, StatusDot, and 12 others were missing from the tarball's exports map — causing 'Module not found' errors when consumers used subpath imports like @xds/core/TopNav. Now auto-discovers all component directories with an index.ts and adds them to exports if not already present. This is a fallback — the core package.json should still be the source of truth, but consumers won't hit silent failures when new components are added without updating the exports map. Co-authored-by: Navi <[email protected]>
Contributor
PR Analysis Report📚 Storybook PreviewNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: 49 accessibility violation(s) found. XDSAspectRatio - 1 issue(s)
XDSAvatar - 1 issue(s)
XDSBadge - 1 issue(s)
XDSButton - 1 issue(s)
XDSCalendar - 1 issue(s)
XDSCard - 2 issue(s)
XDSCenter - 1 issue(s)
XDSCheckboxInput - 1 issue(s)
XDSCloseButton - 1 issue(s)
XDSDateInput - 1 issue(s)
XDSDialog - 1 issue(s)
XDSDivider - 1 issue(s)
XDSDropdownMenu - 1 issue(s)
XDSEmptyState - 1 issue(s)
XDSField - 1 issue(s)
XDSFontWrapper - 1 issue(s)
XDSGrid - 1 issue(s)
XDSHStack - 1 issue(s)
XDSHeading - 1 issue(s)
XDSHoverCard - 1 issue(s)
XDSIcon - 1 issue(s)
XDSLayout - 2 issue(s)
XDSLink - 1 issue(s)
XDSNumberInput - 1 issue(s)
XDSProgressBar - 2 issue(s)
XDSRadioList - 1 issue(s)
XDSSection - 2 issue(s)
XDSSelector - 1 issue(s)
XDSSkeleton - 1 issue(s)
XDSSlider - 1 issue(s)
XDSSpinner - 1 issue(s)
XDSStackItem - 1 issue(s)
XDSStatusDot - 1 issue(s)
XDSSwitch - 1 issue(s)
XDSTabList - 1 issue(s)
XDSTable - 1 issue(s)
Selection - 1 issue(s)
XDSText - 2 issue(s)
XDSTextArea - 1 issue(s)
XDSTextInput - 1 issue(s)
XDSTimeInput - 1 issue(s)
XDSTooltip - 1 issue(s)
XDSTopNav - 1 issue(s)
XDSVStack - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | View full report |
cixzhang
added a commit
that referenced
this pull request
Apr 26, 2026
The package-source.js script only included exports that were already in packages/core/package.json. Components like TopNav, TabList, Slider, Switch, NumberInput, RadioList, Table, StatusDot, and 12 others were missing from the tarball's exports map — causing 'Module not found' errors when consumers used subpath imports like @xds/core/TopNav. Now auto-discovers all component directories with an index.ts and adds them to exports if not already present. This is a fallback — the core package.json should still be the source of truth, but consumers won't hit silent failures when new components are added without updating the exports map. Co-authored-by: Navi <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
The package-source.js script only included exports that were already in packages/core/package.json. Components like TopNav, TabList, Slider, Switch, NumberInput, RadioList, Table, StatusDot, and 12 others were missing from the tarball's exports map — causing 'Module not found' errors when consumers used subpath imports like @xds/core/TopNav. Now auto-discovers all component directories with an index.ts and adds them to exports if not already present. This is a fallback — the core package.json should still be the source of truth, but consumers won't hit silent failures when new components are added without updating the exports map.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
package-source.jsscript only included exports that were already inpackages/core/package.json. 20 component directories (TopNav, TabList, Slider, Switch, NumberInput, RadioList, Table, StatusDot, etc.) were missing from the tarball's exports map.Why
Consumers using subpath imports like
@xds/core/TopNavgotModule not founderrors even though the source files were in the tarball. This was hit during the theme builder v2 exercise oncixzhang/xds_sandbox.Fix
Auto-discovers all component directories with an
index.tsinpackages/core/src/and adds them to the exports map if not already present. This is a fallback — the corepackage.jsonshould still be the source of truth, but consumers won't hit silent failures when new components are added.Before: 22 exports. After: 43 exports (all component directories covered).
Crafted with care by Navi