-
Notifications
You must be signed in to change notification settings - Fork 647
feat(styled-react): add deprecated tags to exports #7261
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: 06911d6 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 |
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 deprecates the @primer/styled-react package by adding @deprecated JSDoc tags to all exports across the main, experimental, and deprecated entrypoints. The deprecation guides users to migrate to CSS Modules and @primer/react components without the sx prop, or to use @primer/primitives for theming.
Key Changes
- Added comprehensive
@deprecatedJSDoc comments to all exports inindex.tsx,experimental.tsx, anddeprecated.tsx - Created a new test file to programmatically verify all exports have deprecation tags and comments
- Added changeset for patch release
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/styled-react/src/index.tsx | Added @deprecated JSDoc comments to all 100+ exports with appropriate guidance messages |
| packages/styled-react/src/experimental.tsx | Added @deprecated JSDoc comments to all experimental exports |
| packages/styled-react/src/deprecated.tsx | Added @deprecated JSDoc comments to all deprecated exports |
| packages/styled-react/src/tests/deprecated-exports.test.ts | New test file using TypeScript compiler API to validate all exports have deprecation tags and comments |
| .changeset/dull-books-fry.md | Changeset documenting the deprecation changes for patch release |
|
|
||
| /** | ||
| * @deprecated Styling with the `sx` prop is no longer supported. Use CSS | ||
| * Modules instead |
Copilot
AI
Dec 2, 2025
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.
Missing period at the end of the deprecation message. All other deprecation messages in this file end with a period for consistency. Should be "Use CSS Modules instead."
| * Modules instead | |
| * Modules instead. |
|
|
||
| /** | ||
| * @deprecated Styling with the `sx` prop is no longer supported. Use CSS | ||
| * Modules instead |
Copilot
AI
Dec 2, 2025
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.
Missing period at the end of the deprecation message. All other deprecation messages in this file end with a period for consistency. Should be "Use CSS Modules instead."
| * Modules instead | |
| * Modules instead. |
| export { | ||
| /** | ||
| * @deprecated Styling with the `sx` prop is no longer supported. Use CSS | ||
| * Modules instead |
Copilot
AI
Dec 2, 2025
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.
Missing period at the end of the deprecation message. All other deprecation messages in this file end with a period for consistency. Should be "Use CSS Modules instead."
| * Modules instead | |
| * Modules instead. |
Closes https://github.com/github/primer/issues/6075
Changelog
New
@primer/styled-reactentrypoints are marked as deprecated and have a commentChanged
@primer/styled-reactentrypoints to be marked as deprecatedRemoved
Rollout strategy