-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Upgrade: Packages open
#32484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade: Packages open
#32484
Conversation
WalkthroughRemoved Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller as Core Server / Dev Server
participant Util as openInBrowser()
participant Open as open (pkg)
Caller->>Util: openInBrowser(address)
activate Util
Util->>Open: await open(address)
alt resolved
Open-->>Util: resolved
Util-->>Caller: return
else throws
Open-->>Util: throws
note right of Util #F9F0C1: catch error\nlog guidance for CI/docker
Util-->>Caller: return (after logging)
end
deactivate Util
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-09-17T07:32:14.477ZApplied to files:
🧬 Code graph analysis (1)code/core/src/core-server/dev-server.ts (1)
⏰ 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). (2)
🔇 Additional comments (1)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
|
|
View your CI Pipeline Execution ↗ for commit 4d43dc3
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
code/core/src/core-server/utils/open-in-browser.ts (1)
6-15: Propagate success/failure or surface the underlying error.Right now failures are logged but swallowed, giving callers no signal. Prefer returning a boolean or rethrowing after logging; also log the underlying error at debug level to aid diagnosis.
Apply this diff:
-export async function openInBrowser(address: string) { +export async function openInBrowser(address: string): Promise<boolean> { try { - await open(address); + await open(address); + return true; } catch (error) { - logger.error(dedent` + logger.error(dedent` Could not open ${address} inside a browser. If you're running this command inside a docker container or on a CI, you need to pass the '--ci' flag to prevent opening a browser by default. `); + // Include details for troubleshooting without spamming normal logs + logger.debug(error); + return false; } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
code/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (4)
code/core/package.json(1 hunks)code/core/src/core-server/typings.d.ts(0 hunks)code/core/src/core-server/utils/open-in-browser.ts(1 hunks)code/core/src/typings.d.ts(0 hunks)
💤 Files with no reviewable changes (2)
- code/core/src/core-server/typings.d.ts
- code/core/src/typings.d.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). (1)
- GitHub Check: Core Unit Tests, windows-latest
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 48 | 43 | 🎉 -5 🎉 |
| Self size | 30.11 MB | 30.04 MB | 🎉 -78 KB 🎉 |
| Dependency size | 17.65 MB | 17.30 MB | 🎉 -346 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 192 | 187 | 🎉 -5 🎉 |
| Self size | 886 KB | 886 KB | 🚨 +36 B 🚨 |
| Dependency size | 80.06 MB | 79.63 MB | 🎉 -424 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 174 | 169 | 🎉 -5 🎉 |
| Self size | 35 KB | 35 KB | 0 B |
| Dependency size | 76.49 MB | 76.06 MB | 🎉 -424 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
create-storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 49 | 44 | 🎉 -5 🎉 |
| Self size | 1.55 MB | 1.55 MB | 0 B |
| Dependency size | 47.76 MB | 47.34 MB | 🎉 -424 KB 🎉 |
| Bundle Size Analyzer | node | node |
What I did
We were using
better-opnin place ofopen, but in the mean timeopenhas moved to ESM-only, and improved a lot, so it's in fact now better.This PR switches to the latest version of
open.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
I ran
nr storybook:uiin the monorepo, and my default browser in a new tab.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 canary-release-pr.yml --field pr=<PR_NUMBER>Summary by CodeRabbit
Bug Fixes
Chores