Skip to content

Build: Allow linked mode for react-native-web-expo sandbox#33310

Merged
valentinpalkovic merged 1 commit into
nextfrom
valentin/allow-linked-mode-for-react-native-web-sandbox
Dec 9, 2025
Merged

Build: Allow linked mode for react-native-web-expo sandbox#33310
valentinpalkovic merged 1 commit into
nextfrom
valentin/allow-linked-mode-for-react-native-web-sandbox

Conversation

@valentinpalkovic
Copy link
Copy Markdown
Contributor

@valentinpalkovic valentinpalkovic commented Dec 9, 2025

Closes #

What I did

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • 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.

🦋 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/core team 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

  • Chores
    • Updated React 19 configuration to support an additional package variant.

✏️ Tip: You can customize this high-level summary in your review settings.

@valentinpalkovic valentinpalkovic self-assigned this Dec 9, 2025
@valentinpalkovic valentinpalkovic added build Internal-facing build tooling & test updates ci:normal labels Dec 9, 2025
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Dec 9, 2025

View your CI Pipeline Execution ↗ for commit 127ad3e

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ✅ Succeeded 13m 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-09 08:21:08 UTC

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 9, 2025

📝 Walkthrough

Walkthrough

Updated React 19 resolutions configuration in yarn utility script to include an additional package key react-native-web-vite/expo-ts alongside existing resolution mappings. The conditional branch now handles three package keys instead of two.

Changes

Cohort / File(s) Summary
React 19 Resolution Update
scripts/utils/yarn.ts
Added react-native-web-vite/expo-ts to the conditional branch determining React 19 resolutions, expanding from two to three package keys mapping to { react: '^19.0.0', 'react-dom': '^19.0.0' }

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify the package key name react-native-web-vite/expo-ts is spelled correctly and appropriate for the resolution context
  • Confirm the React 19 resolution values are consistent with existing entries
✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91d158e and 127ad3e.

📒 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

Comment thread scripts/utils/yarn.ts
Comment on lines +96 to +100
const additionalReact19Resolutions = [
'nextjs/default-ts',
'nextjs/prerelease',
'react-native-web-vite/expo-ts',
].includes(key)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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.ts

Repository: 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 -10

Repository: 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.ts

Repository: 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.

@valentinpalkovic valentinpalkovic merged commit 9bd40eb into next Dec 9, 2025
72 of 76 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/allow-linked-mode-for-react-native-web-sandbox branch December 9, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant