Skip to content

Widget Primitives: make @types/react an optional peer dependency#79272

Merged
retrofox merged 1 commit into
trunkfrom
fix/widget-primitives-optional-react-types
Jun 17, 2026
Merged

Widget Primitives: make @types/react an optional peer dependency#79272
retrofox merged 1 commit into
trunkfrom
fix/widget-primitives-optional-react-types

Conversation

@retrofox

@retrofox retrofox commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What?

Marks @types/react as an optional peer dependency of @wordpress/widget-primitives through peerDependenciesMeta.

Why?

@types/react is only useful to consumers that use TypeScript.

Marking it optional avoids an unmet-peer warning for plain-JavaScript consumers, and matches the convention already followed by other React packages.

Testing

Metadata-only change, with no runtime or test impact. After install, @types/react no longer reports as a missing peer for consumers that do not use TypeScript.

match the convention used across react packages
@retrofox retrofox self-assigned this Jun 17, 2026
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: retrofox <[email protected]>
Co-authored-by: manzoorwanijk <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 8.6 MB

compressed-size-action

@manzoorwanijk manzoorwanijk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@retrofox retrofox enabled auto-merge (squash) June 17, 2026 12:18
@retrofox retrofox merged commit 5d5fb28 into trunk Jun 17, 2026
49 of 51 checks passed
@retrofox retrofox deleted the fix/widget-primitives-optional-react-types branch June 17, 2026 12:33
@github-actions

Copy link
Copy Markdown

Flaky tests detected in 21dbe4b.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27687382663
📝 Reported issues:

@github-actions github-actions Bot added this to the Gutenberg 23.5 milestone Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants