mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
The HMR messages we send through the WebSocket to the browser were inconsistently called `message`, `msg`, `obj`, `payload`, or `action`. With this PR, we're streamlining the naming to consistently use `message` throughout the codebase. In addition, the discriminating property `action` is renamed to `type`, aligning it with Turbopack's own HMR messages. As an alternative, I considered naming them `action` instead, but this did not yield the desired consistency across the codebase. Ultimately, I decided to stick with `message` to avoid confusion and maintain alignment with Turbopack's terminology (see `@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client`).