Uh oh!
There was an error while loading. Please reload this page.
Stop publishing Storybook arg fixtures in the library bundle - #2442
Merged
Conversation
The build's entry glob re-exports every file in src/{objects,components}/*/,
filtering out only .stories. and .test. files. That let ground-nav-args.js
through, publishing defaultArgs, defaultArgTypes and generateGroundNavProps
as API. Extend the filter to -args. files.🦋 Changeset detectedLatest commit: cbac808 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for cloudfour-patterns ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 freeto 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.
Overview
The published bundle has been exposing three symbols we never meant to ship:
defaultArgs,defaultArgTypesandgenerateGroundNavProps. They come fromground-nav-args.js, a fixture only the Ground Nav stories import. They reacheddistbecause the build has no explicit entry list — it globs everything insrc/{objects,components}/*/and re-exports it, filtering out only.stories.and.test.files. Adding-args.to that filter closes the gap.Because these were never documented, never intended as API, and useless outside Storybook, we are treating this as a bug fix rather than a breaking change. The changeset names all three explicitly so it is discoverable if someone turns out to have imported them. The four real exports come out byte-for-byte identical, and
dist/standalone.cssanddist/standalone.min.cssare untouched — the minified JS bundle drops from 7.8KB to 4.1KB.Screenshots
Testing
The fixture we stopped publishing is still imported by stories, so the thing worth confirming is that Storybook is unaffected:
npm run buildand opendist/cloudfour-patterns.d.ts. It should declare exactly four things —createElasticTextArea,createSubscribe,initCommentReplyFormandinitSkyNav— with no Ground Nav argument objects.