socketio / socket.io-website

Socket.IO website and blog
https://socket.io
319 stars 700 forks source link

add note about `withCredentials` default value in Migrating from 2.x to 3.0 #352

Closed TasukuUno closed 2 years ago

TasukuUno commented 2 years ago

I upgraded socket.io-client for TypeScript from v2 to v4 today and spent a little time noticing that the withCredentials option was added and that its default was false.

As far as I can tell from my investigation, withCredentials option was added in this PR: https://github.com/socketio/engine.io-client/pull/614

but the default value was true ( this.withCredentials = false !== opts.withCredentials; ). Most users would have been unaffected.

In this commit, https://github.com/socketio/engine.io-client/commit/5f47a50ee5dc47962f3823f4e8dde0b4b407eccd withCredentials option no longer had a default value. It meant that the default value was false.

This change happened between engine.io-client v3 and v4. So it is breaking change socket.io-client from v2 to v3. Please note about it in Migrating from 2.x to 3.0 or add a migration guide for each client.

darrachequesne commented 2 years ago

You are absolutely right, that was missing from the migration guide :+1:

Added in https://github.com/socketio/socket.io-website/commit/87d1883377ae735626a6495658b3fd4c60e1cfb4. Thanks!

TasukuUno commented 2 years ago

@darrachequesne Thank you!!!! 😄