Sandboxes: RN add missing prop-types#34854
Conversation
…templates This update ensures that the React renderer's template-stories correctly declare `prop-types`, aligning with other React-renderer sandboxes. The addition is made in both the baseTemplates and modifications sections.
There was a problem hiding this comment.
Pull request overview
This PR fixes a missing dependency declaration in the React Native Web (Vite) sandbox templates so CI sandboxes don’t fail when React renderer template stories import prop-types.
Changes:
- Add
prop-typestomodifications.extraDependenciesforreact-native-web-vite/expo-ts. - Add
prop-typestomodifications.extraDependenciesforreact-native-web-vite/rn-cli-ts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds the ChangesAdd missing prop-types dependency
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Comment |
…-rn-expo-prop-types Sandboxes: RN add missing `prop-types` (cherry picked from commit 94ab7b4)
What I did
Two of our
react-native-web-vitesandbox templates were missingprop-typesfrommodifications.extraDependencies:react-native-web-vite/expo-tsreact-native-web-vite/rn-cli-tsThe React renderer's template-stories include
js-argtypes.stories.jsx, which importsprop-typesdirectly. Every other React-renderer sandbox incode/lib/cli-storybook/src/sandbox-templates.tsalready declaresprop-typesexplicitly viaextraDependencies— these two were the only outliers and were relying on a transitive hoist that doesn't reliably survive the RN/Expo install paths.This surfaced on the
ci:dailyrun for the 10.5.0-alpha.1 release PR (#34822) as:See CI log:
https://app.circleci.com/pipelines/github/storybookjs/storybook/122653/workflows/3c6828c3-e3ec-4ca8-9244-f3213b480fb9/jobs/1485401
Only
expo-tsactually runs inci:dailytoday (rn-cli-tsis commented out of thedailyarray), but both templates have the identical gap, so I'm fixing both to keep the React-renderer sandbox configs consistent and avoid the same trap whenrn-cli-tsis re-enabled.This is a sandbox/CI-only fix. Real users of these templates who actually use
PropTypesin their components already installprop-typesthemselves; this only affects our synthetic test sandboxes that copy the React renderer's template-stories in.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
The change is verified by the existing
react-native-web-vite/expo-tssandbox E2E inci:daily— the same job that surfaced the failure on #34822. No new test is needed; the failing job becomes the passing job.Manual testing
I did not manual testing, I'm depending on the CI running this correctly, I ensured it's ran with the
dailylabelDocumentation
MIGRATION.MD
No user-facing docs need to change —
prop-typesis only added to internal sandbox templates, not to anything shipped to users.Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsUse
ci:daily— the affected templates (react-native-web-vite/*) only run in thedailycadence, soci:normal/ci:mergedwill not exercise this fix.Make sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.Label:
build— internal sandbox/CI fix; should not appear in the release changelog.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit
prop-typesas a default dependency, ensuring prop validation support is available out of the box for new projects.