Build: Fix CI issues for expo and sveltekit sandboxes#34135
Conversation
|
View your CI Pipeline Execution ↗ for commit 797afae
☁️ Nx Cloud last updated this comment at |
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughReplaces heuristic Vite sandbox detection with a template lookup and adds a targeted Vite downgrade for a specific Expo sandbox. Also removes certain template modifications and adds a new svelte-kit skeleton template entry in the sandbox templates. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
✨ Finishing Touches
📝 Coding Plan
Comment Tip CodeRabbit can generate a title for your PR based on the changes.Add |
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)
scripts/utils/yarn.ts (1)
106-125:⚠️ Potential issue | 🔴 CriticalExpo Vite downgrade branch is unreachable.
Line 106 already matches
react-native-web-vite/expo-ts, so theelse ifat Line 120 never runs. That means the intendedvite: '8.0.0-beta.4'workaround is never applied.💡 Proposed fix
} else if (key === 'react-rsbuild/default-ts') { additionalResolutions = { 'react-docgen': '^8.0.2', }; - } else if (key === 'react-native-web-vite/expo-ts') { - additionalResolutions = { + } + + if (key === 'react-native-web-vite/expo-ts') { + additionalResolutions = { + ...additionalResolutions, // The expo sandbox started to break in beta 5, yet to investigate the root cause // in the meantime, we downgrade to the version where things worked. vite: '8.0.0-beta.4', }; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/utils/yarn.ts` around lines 106 - 125, The branch for applying the Expo Vite downgrade is unreachable because the first if already matches 'react-native-web-vite/expo-ts'; update the conditional logic around the variable key and additionalResolutions so the expo-specific resolution is applied: either remove the duplicate 'react-native-web-vite/expo-ts' from the first if and keep the later else-if that sets vite: '8.0.0-beta.4', or merge the vite entry into the first branch where 'react-native-web-vite/expo-ts' is handled; edit the conditionals around key and the additionalResolutions assignments (the key variable and additionalResolutions object) to ensure the vite override is actually set for the expo case.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@scripts/utils/yarn.ts`:
- Around line 106-125: The branch for applying the Expo Vite downgrade is
unreachable because the first if already matches
'react-native-web-vite/expo-ts'; update the conditional logic around the
variable key and additionalResolutions so the expo-specific resolution is
applied: either remove the duplicate 'react-native-web-vite/expo-ts' from the
first if and keep the later else-if that sets vite: '8.0.0-beta.4', or merge the
vite entry into the first branch where 'react-native-web-vite/expo-ts' is
handled; edit the conditionals around key and the additionalResolutions
assignments (the key variable and additionalResolutions object) to ensure the
vite override is actually set for the expo case.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 407eba25-68e3-4ad0-af23-6409bf8b87f0
📒 Files selected for processing (1)
scripts/utils/yarn.ts
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 49 | 49 | 0 |
| Self size | 20.43 MB | 20.22 MB | 🎉 -212 KB 🎉 |
| Dependency size | 16.54 MB | 16.54 MB | 0 B |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 183 | 183 | 0 |
| Self size | 780 KB | 779 KB | 🎉 -276 B 🎉 |
| Dependency size | 67.62 MB | 67.40 MB | 🎉 -212 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 176 | 176 | 0 |
| Self size | 32 KB | 32 KB | 0 B |
| Dependency size | 66.14 MB | 65.93 MB | 🎉 -212 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
create-storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 50 | 50 | 0 |
| Self size | 1.04 MB | 1.04 MB | 🎉 -144 B 🎉 |
| Dependency size | 36.97 MB | 36.76 MB | 🎉 -212 KB 🎉 |
| Bundle Size Analyzer | node | node |
Closes #
What I did
Temporary workaround while we report the issue to rolldown maintainers
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
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