Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Rename 'SocketMessage' to 'ServerMessage' and 'ClientMessageRuntimeError' to 'ClientMessageError' to better reflect their purpose and improve code readability.

Also update related type names and references across the codebase.

Checklist

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

Copilot AI review requested due to automatic review settings September 27, 2025 02:39
@netlify
Copy link

netlify bot commented Sep 27, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 35cb6e4
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68d74e554a772900084e1e54
😎 Deploy Preview https://deploy-preview-6265--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: 73 (🟢 up 14 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
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

Rename socket message types to better reflect their purpose: 'SocketMessage' to 'ServerMessage' and 'ClientMessageRuntimeError' to 'ClientMessageError'. This improves code clarity by distinguishing server-to-client messages from client-to-server messages.

  • Renamed SocketMessage union type to ServerMessage to clarify server-to-client communication
  • Renamed ClientMessageRuntimeError to ClientMessageError and updated its type value from 'runtime-error' to 'client-error'
  • Updated all type references and usages across the codebase to maintain consistency

Reviewed Changes

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

File Description
packages/core/src/server/socketServer.ts Core type definitions updated with new names and consolidated message type unions
packages/core/src/server/devServer.ts Updated type imports and generic type parameters to use ServerMessage
packages/core/src/server/browserLogs.ts Updated import and function parameter to use ClientMessageError
packages/core/src/client/hmr.ts Updated imports, message handling, and client error reporting to use new type names

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@chenjiahan chenjiahan merged commit 57cdbe8 into main Sep 27, 2025
12 checks passed
@chenjiahan chenjiahan deleted the rename_socket_types_0927 branch September 27, 2025 02:49
@chenjiahan chenjiahan mentioned this pull request Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants