Skip to content

feat: update open to v10 and improve error handling#5500

Merged
chenjiahan merged 5 commits intomainfrom
update_open_v10
Jun 28, 2025
Merged

feat: update open to v10 and improve error handling#5500
chenjiahan merged 5 commits intomainfrom
update_open_v10

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Jun 28, 2025

Summary

  • Update open from v8 to v10
  • Since open v10 is a pure ESM package, we use Rslib to bundle it instead of using prebundle.
  • Removed the check for CodeSandbox, since Rslib no longer bundles the xdg-open script of the open package, we should no longer need to recognize CodeSandbox (this requires further testing)
  • Add error handling for child process errors.
  • This PR should fix the open error on StackBlitz:

image

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings June 28, 2025 02:31
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 28, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 2eae54e
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/685f609b3a55da0008fbfefa
😎 Deploy Preview https://deploy-preview-5500--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 72 (🔴 down 2 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the open dependency from v8 to v10 (pure ESM) and adjusts bundling/configuration accordingly.

  • Replace compiled import of open with direct ESM import in openBrowser
  • Remove open from the prebundle config and Renovate ignore list
  • Bump open to v10.1.2 and adjust package exports

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
packages/core/src/server/open.ts Switched dynamic import from compiled path to ESM import of open
packages/core/prebundle.config.mjs Removed open from prebundle dependencies
packages/core/package.json Bumped open version; changed exports.import to CJS build
.github/renovate.json5 Removed open from pure ESM ignore list
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

packages/core/package.json:19

  • The exports.import field points to the CJS build. To let ESM consumers load the proper bundle, consider pointing this to the ESM output (e.g., ./dist/index.js).
      "import": "./dist/index.cjs",

packages/core/src/server/open.ts:102

  • The fallback branch using import('open') isn't covered by existing tests. Adding a unit test for the openBrowser path (both success and failure) would help ensure correct behavior.
  try {

@chenjiahan chenjiahan changed the title feat(deps): update open to v10 feat(deps): update open to v10 and improve error handling Jun 28, 2025
@chenjiahan chenjiahan changed the title feat(deps): update open to v10 and improve error handling feat: update open to v10 and improve error handling Jun 28, 2025
@chenjiahan chenjiahan merged commit 737c835 into main Jun 28, 2025
19 checks passed
@chenjiahan chenjiahan deleted the update_open_v10 branch June 28, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants