Blocks: Declare the @types/react-is devDependency - #81203
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -138 B (0%) Total Size: 7.81 MB 📦 View Changed
|
|
Flaky tests detected in 4eea775. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/30980501785
|
What?
Follow up to #81148. Declares
@types/react-isas a devDependency of@wordpress/blocks.Why?
packages/blocksimportsreact-isbut onlypackages/pluginsdeclares@types/react-is. Default npm hoisting puts it in the rootnode_modules, sotscfinds it by accident. Without hoisting it fails:Same failure on #75814: https://github.com/WordPress/gutenberg/actions/runs/30979264622/job/92219984529?pr=75814
How?
devDependencies, not dependencies:
isValidElementTypereturns aboolean, so noreact-istype reachesbuild-types.Testing Instructions
npx tsc --build packages/blocks/tsconfig.jsonpasses. To see the original failure, runnpm install --install-strategy=linkedontrunkfirst.Use of AI Tools
Authored with Claude Code. I have reviewed and take responsibility for the changes.