Repository navigation
React Native: Remove babel deps from RN setup (not needed) - #35243
Conversation
|
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)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe React Native Storybook generator removes the ChangesReact Native generator dependency cleanup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
code/lib/create-storybook/src/generators/REACT_NATIVE/index.ts (1)
135-140:⚠️ Potential issue | 🟡 MinorRemove
getBabelDependenciesmock and import from test file.The implementation correctly removes babel dependencies (unnecessary for React Native's Metro bundler), but the test file still imports and mocks
getBabelDependenciesat lines 3 and 38 ofindex.test.ts. These should be removed to keep tests consistent with the implementation changes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@code/lib/create-storybook/src/generators/REACT_NATIVE/index.ts` around lines 135 - 140, Remove the unused getBabelDependencies import and mock from the test file index.test.ts to keep tests consistent with the implementation changes. Specifically, delete the import statement for getBabelDependencies from the top of the test file (around line 3) and remove the jest.mock call for getBabelDependencies (around line 38). Since the implementation no longer collects babel dependencies for React Native, these test artifacts are no longer needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@code/lib/create-storybook/src/generators/REACT_NATIVE/index.ts`:
- Around line 135-140: Remove the unused getBabelDependencies import and mock
from the test file index.test.ts to keep tests consistent with the
implementation changes. Specifically, delete the import statement for
getBabelDependencies from the top of the test file (around line 3) and remove
the jest.mock call for getBabelDependencies (around line 38). Since the
implementation no longer collects babel dependencies for React Native, these
test artifacts are no longer needed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c20349ce-de4d-445d-9fcb-6ec5349f44c5
📒 Files selected for processing (1)
code/lib/create-storybook/src/generators/REACT_NATIVE/index.ts
Closes #
What I did
The react native setup fails on npm for peer dependency issues related to babel, however babel and babel loader are not used at all for react native storybook so we can remove those without issue.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
In a react native project using npm you can run this and see that everything still works
npm_config_legacy_peer_deps=true node /path-to-storybook/storybook/code/lib/create-storybook/dist/bin/index.jsDocumentation
MIGRATION.MD
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.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake 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.🦋 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