-
Notifications
You must be signed in to change notification settings - Fork 71
fix(Banner) Adds Banner named export
#3214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 7b64ad0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds named export support for the Banner component, enabling developers to import { Banner } instead of relying on default imports. The change maintains backward compatibility by deprecating the default export while adding the new named export pattern.
Key changes:
- Adds
Banneras a named export from the banner package - Updates the named-exports codemod to support Banner component transformations
- Includes test files to validate the codemod functionality
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/banner/src/index.ts | Adds named export for Banner component and deprecates default export |
| tools/codemods/src/codemods/named-exports/transform.ts | Adds Banner to the list of components supported by the named-exports codemod |
| tools/codemods/src/codemods/named-exports/tests/banner.input.tsx | Test input file showing default import pattern for Banner |
| tools/codemods/src/codemods/named-exports/tests/banner.output.tsx | Test output file showing expected named import pattern for Banner |
| .changeset/soft-horses-fail.md | Changeset documenting the minor version bump for banner package |
| .changeset/upset-seals-leave.md | Changeset documenting the patch version bump for codemods package |
|
Size Change: +16 B (0%) Total Size: 1.59 MB
ℹ️ View Unchanged
|
tools/codemods/src/codemods/named-exports/tests/banner.input.tsx
Outdated
Show resolved
Hide resolved
| /** | ||
| * @deprecated Use named export `{ Banner }` instead. See [named-exports codemod documentation](https://github.com/mongodb/leafygreen-ui/tree/main/tools/codemods#named-exports) for migration assistance. | ||
| */ | ||
| default, | ||
| } from './Banner'; | ||
| export { default as Banner } from './Banner'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops missed this one, thank you!
✍️ Proposed changes
'@leafygreen-ui/banner': minor
Exports
{ Banner }as named export'@lg-tools/codemods': patch
Adds
bannerto list of code-mod-able components for "named-exports" codemod