Build: Allow linked mode for react-native-web-expo sandbox#33310
Conversation
|
View your CI Pipeline Execution ↗ for commit 127ad3e
☁️ Nx Cloud last updated this comment at |
📝 WalkthroughWalkthroughUpdated React 19 resolutions configuration in yarn utility script to include an additional package key Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
scripts/utils/yarn.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,json,html,ts,tsx,mjs}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use ESLint and Prettier configurations that are enforced in the codebase
Files:
scripts/utils/yarn.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Enable TypeScript strict mode
Files:
scripts/utils/yarn.ts
🧠 Learnings (1)
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Avoid mocking only a subset of required dependencies in Vitest tests
Applied to files:
scripts/utils/yarn.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: normal
- GitHub Check: nx
- GitHub Check: Danger JS
- GitHub Check: nx
- GitHub Check: nx
- GitHub Check: Core Unit Tests, windows-latest
| const additionalReact19Resolutions = [ | ||
| 'nextjs/default-ts', | ||
| 'nextjs/prerelease', | ||
| 'react-native-web-vite/expo-ts', | ||
| ].includes(key) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the template key exists and check peer dependency handling patterns
echo "=== Searching for template key 'react-native-web-vite/expo-ts' ==="
rg -n "react-native-web-vite/expo-ts" --type=ts --type=js -C 2
echo -e "\n=== Examining yarn.ts file structure around lines 96-100 and 150-165 ==="
sed -n '90,110p' scripts/utils/yarn.ts
echo "---"
sed -n '145,170p' scripts/utils/yarn.tsRepository: storybookjs/storybook
Length of output: 3061
🏁 Script executed:
#!/bin/bash
# Check if there's a specific reason why react-native-web-vite/expo-ts might not need peer dependency handling
echo "=== Check template configuration for react-native-web-vite/expo-ts ==="
sed -n '765,800p' code/lib/cli-storybook/src/sandbox-templates.ts
echo -e "\n=== Verify React 19 is explicitly set for this template ==="
rg -n "react-native-web-vite/expo-ts" code/lib/cli-storybook/src/sandbox-templates.ts -A 10 | head -20
echo -e "\n=== Check git history of yarn.ts for similar peer dependency handling additions ==="
git log --oneline scripts/utils/yarn.ts | head -10Repository: storybookjs/storybook
Length of output: 2471
🏁 Script executed:
#!/bin/bash
# Check the actual peer dependency error handling condition more carefully
echo "=== Full peer dependency error handling block ==="
sed -n '150,172p' scripts/utils/yarn.ts
echo -e "\n=== Check if key matching uses exact match or substring ==="
rg -n "key === 'react-native-web-vite" scripts/utils/yarn.tsRepository: storybookjs/storybook
Length of output: 1288
Add peer dependency error suppression for the React 19 template.
The addition of 'react-native-web-vite/expo-ts' to receive React 19 resolutions is correct, but it's missing the corresponding peer dependency error handling. This template will receive React 19 (lines 99-102) but will fail during yarn bootstrap because it doesn't suppress INCOMPATIBLE_PEER_DEPENDENCY errors (line 152 explicitly notes that React 19 causes such errors with transitive dependencies).
All other React 19/prerelease templates ('nextjs', 'react-vite/prerelease', 'react-webpack/prerelease', 'react-rsbuild/default-ts') have peer dependency error suppression in the conditional block (lines 150-161). Add key.includes('react-native-web-vite') to that condition to fix this.
🤖 Prompt for AI Agents
In scripts/utils/yarn.ts around lines 96-100 and the conditional block at
~150-161, the new React 19 template 'react-native-web-vite/expo-ts' is added to
additionalReact19Resolutions but the peer dependency error suppression clause
wasn't updated; update the suppression condition to also match this template by
adding key.includes('react-native-web-vite') alongside the existing checks so
that INCOMPATIBLE_PEER_DEPENDENCY errors are suppressed for
react-native-web-vite templates receiving React 19.
Closes #
What I did
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
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.tsMake 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
✏️ Tip: You can customize this high-level summary in your review settings.