mswjs/msw 64b6a82e..3ed3d497
base and head as given
- WebSocket logging utilities entered the core
- Browser workers now use WebSocket logging utilities
- WebSocket handler connection events use a revised interface
- files changed
- 16
- in a component
- 9
- lines in components
- 474
- components
- 6
- public routes changed
- 0
- schema statements
- 0
- new dependencies
- 0
- excluded by role
- 7
WebSocket traffic logging
Added- Before
- WebSocket traffic logging did not exist
- After
- Mocked browser sockets log traffic
Browser-based mocked WebSocket connections now log opening, closure, errors, and message direction. Message logs include a truncated public payload and byte length, distinguishing handler-originated traffic from actual socket traffic.
In favour
- In favour: Logs mocked socket traffic absent from browser developer tools
- In favour: Includes payload previews and byte lengths for logged messages
Against
- Against: Proxy-wrapped send methods add work to mocked message delivery
Inspect 9 source files behind this explanation
- src/core/handlers/WebSocketHandler.ts
- src/core/utils/handleWebSocketEvent.ts
- src/core/ws/utils/attachWebSocketLogger.ts
- src/browser/setupWorker/setupWorker.ts
- src/node/SetupServerCommonApi.ts
- src/core/utils/logging/getTimestamp.ts
- src/core/ws/utils/getMessageLength.ts
- src/core/ws/utils/getPublicData.ts
- src/core/ws/utils/truncateMessage.ts
1 new dependency between components — WebSocket Core → Logging Utilities
What else could behave differently
13 components · 37 filesThese components import changed code, directly or through other files. A traced dependency is a place to review, not a confirmed runtime failure.
Reached 3
| Component | Symbol | Cited at | Files | Reached by |
|---|---|---|---|---|
| Core Handlerssrc/core/handlers/ | Body changed getTimestamp | src/core/utils/logging/getTimestamp.ts:8-17 | 2 | 2 directTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
| src/core/ | Signature changed WebSocketHandlerEventMap1 of 3 changed symbols reaching it | src/core/handlers/WebSocketHandler.ts:15-17 | 4 | 2 direct · 2 at two stepsTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
| src/core/utils/internal/ | Body changed getTimestamp | src/core/utils/logging/getTimestamp.ts:8-17 | 1 | none direct · 1 at two stepsTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
Ranked lower 10
| Component | Files | Reached by |
|---|---|---|
| src/core/utils/ | 1 | 1 direct |
| src/core/ws/ | 3 | 3 direct |
| src/browser/setupWorker/ | 2 | 2 direct |
| src/node/ | 5 | 4 direct · 1 at two steps |
| src/browser/ | 1 | 1 direct |
| src/browser/utils/ | 3 | none direct · 3 at two steps |
| src/native/ | 1 | 1 direct |
| src/iife/ | 1 | none direct · 1 at two steps |
| src/browser/setupWorker/start/ | 11 | none direct · 11 at two steps |
| src/browser/setupWorker/stop/ | 2 | none direct · 2 at two steps |
Statements 3
getTimestamp's body changed and reached 2 handler files. 2WebSocketHandlerEventMap's signature changed among 6 of 9 names in its file and reached 4 core files. 22getTimestamp's body changed and reached 1 internal utility file. 115 reached files belong to no component — tests, docs and config.
Routes, schema, dependencies
No public URL, no migration and no new package.
Inspect components, files and symbols
Component
File
Function
imports what changeddownstream of it, one mark per step
Diff
Analysis scope
521 → 6- files at head521
- components24
- changed by this change6
Where the new files landed
4 new files| New file | Belongs to | Used by | Calls | Serves |
|---|---|---|---|---|
| src/core/ws/4 new files | WebSocket Corebase frame | Worker Setup | src/core/utils/internal/Logging Utilitiessrc/core/utils/request/ | — |
4 added files carry no component — 4 test.
16 files changed, 21 claims stated. 13 components reached in total.