Skip to content

Blocks: Declare the @types/react-is devDependency - #81203

Merged
manzoorwanijk merged 1 commit into
trunkfrom
fix/blocks-react-is-types-dependency
Aug 5, 2026
Merged

Blocks: Declare the @types/react-is devDependency#81203
manzoorwanijk merged 1 commit into
trunkfrom
fix/blocks-react-is-types-dependency

Conversation

@manzoorwanijk

@manzoorwanijk manzoorwanijk commented Aug 5, 2026

Copy link
Copy Markdown
Member

What?

Follow up to #81148. Declares @types/react-is as a devDependency of @wordpress/blocks.

Why?

packages/blocks imports react-is but only packages/plugins declares @types/react-is. Default npm hoisting puts it in the root node_modules, so tsc finds it by accident. Without hoisting it fails:

packages/blocks/src/store/process-block-type.ts(6,36): error TS7016: Could not find a declaration file for module 'react-is'.

Same failure on #75814: https://github.com/WordPress/gutenberg/actions/runs/30979264622/job/92219984529?pr=75814

How?

devDependencies, not dependencies: isValidElementType returns a boolean, so no react-is type reaches build-types.

Testing Instructions

npx tsc --build packages/blocks/tsconfig.json passes. To see the original failure, run npm install --install-strategy=linked on trunk first.

Use of AI Tools

Authored with Claude Code. I have reviewed and take responsibility for the changes.

@github-actions github-actions Bot added the [Package] Blocks /packages/blocks label Aug 5, 2026
@manzoorwanijk manzoorwanijk added the [Type] Code Quality Issues or PRs that relate to code quality label Aug 5, 2026
@manzoorwanijk manzoorwanijk self-assigned this Aug 5, 2026
@manzoorwanijk
manzoorwanijk marked this pull request as ready for review August 5, 2026 06:13
@github-actions

github-actions Bot commented Aug 5, 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: manzoorwanijk <manzoorwanijk@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

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

@Mamaduka Mamaduka 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, @manzoorwanijk!

@manzoorwanijk
manzoorwanijk enabled auto-merge (squash) August 5, 2026 06:15
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Size Change: -138 B (0%)

Total Size: 7.81 MB

📦 View Changed
Filename Size Change
build/styles/edit-widgets/style-rtl.css 5.04 kB -36 B (-0.71%)
build/styles/edit-widgets/style-rtl.min.css 3.61 kB -32 B (-0.88%)
build/styles/edit-widgets/style.css 5.03 kB -37 B (-0.73%)
build/styles/edit-widgets/style.min.css 3.61 kB -33 B (-0.91%)

compressed-size-action

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Flaky tests detected in 4eea775.
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/30980501785
📝 Reported issues:

@manzoorwanijk
manzoorwanijk merged commit 6259444 into trunk Aug 5, 2026
55 checks passed
@manzoorwanijk
manzoorwanijk deleted the fix/blocks-react-is-types-dependency branch August 5, 2026 06:47
@github-actions github-actions Bot added this to the Gutenberg 23.8 milestone Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Blocks /packages/blocks [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants