You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connection metadata crosses reference boundaries in Smocket that Socket.IO encodes as JSON. handshake.auth retains the caller's original graph, and a middleware connect_error passes the server Error and its data by reference to the client. Socket.IO 4.7.5 and 4.8.3 expose separate decoded graphs, convert JSON values such as Date, omit unsupported properties, and do not forward arbitrary Error properties. Both paths should reuse the JSON snapshot boundary accepted in ADR 0026.
Reproduction
constauth={nested: {count: 1},date: newDate(),missing: undefined};constclient=connect(url,{ auth });constserverSocket=awaitserver.nextConnection();auth.nested.count=2;// Socket.IO keeps handshake.auth.nested.count at 1.// Smocket 0.5.1 observes 2 and retains the Date object.server.use((_socket,next)=>{consterror=newError('denied');error.data={nested: {count: 1},date: newDate()};next(error);});// Smocket delivers the same Error and data references to connect_error.
smocket version
0.5.1
Environment
Node 24.11.1, Vitest 4.1.10, Socket.IO 4.7.5 and 4.8.3
Activity