Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update socket.io packages (major) #5893

Merged
merged 3 commits into from
Jan 29, 2021

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 8, 2020

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
socket.io 2.4.1 -> 3.1.0 age adoption passing confidence
socket.io-client 2.4.0 -> 3.1.0 age adoption passing confidence
socket.io-redis 5.4.0 -> 6.0.1 age adoption passing confidence

Release Notes

socketio/socket.io

v3.1.0

Compare Source

Features
Bug Fixes
  • allow integers as event names (1c220dd)

3.0.5 (2021-01-05)

Bug Fixes
  • properly clear timeout on connection failure (170b739)
Reverts
  • restore the socket middleware functionality (bf54327)

3.0.4 (2020-12-07)

3.0.3 (2020-11-19)

3.0.2 (2020-11-17)

Bug Fixes
  • merge Engine.IO options (43705d7)

3.0.1 (2020-11-09)

Bug Fixes
  • export ServerOptions and Namespace types (#​3684) (f62f180)
  • typings: update the signature of the emit method (50671d9)

v3.0.5

Compare Source

Bug Fixes
  • properly clear timeout on connection failure (170b739)
Reverts
  • restore the socket middleware functionality (bf54327)

v3.0.4

Compare Source

v3.0.3

Compare Source

v3.0.2

Compare Source

Bug Fixes
  • merge Engine.IO options (43705d7)

v3.0.1

Compare Source

Bug Fixes
  • export ServerOptions and Namespace types (#​3684) (f62f180)
  • typings: update the signature of the emit method (50671d9)

v3.0.0

Compare Source

Bug Fixes
  • close clients with no namespace (91cd255)
Features
  • emit an Error object upon middleware error (54bf4a4)
  • serve msgpack bundle (aa7574f)
  • add support for catch-all listeners (5c73733)
  • make Socket#join() and Socket#leave() synchronous (129c641)
  • remove prod dependency to socket.io-client (7603da7)
  • move binary detection back to the parser (669592d)
  • add ES6 module export (8b6b100)
  • do not reuse the Engine.IO id (2875d2c)
  • remove Server#set() method (029f478)
  • remove Socket#rooms object (1507b41)
  • remove the 'origins' option (a8c0600)
  • remove the implicit connection to the default namespace (3289f7e)
  • throw upon reserved event names (4bd5b23)
BREAKING CHANGES
  • the Socket#use() method is removed (see 5c73733)

  • Socket#join() and Socket#leave() do not accept a callback argument anymore.

Before:

socket.join("room1", () => {
 io.to("room1").emit("hello");
});

After:

socket.join("room1");
io.to("room1").emit("hello");
// or await socket.join("room1"); for custom adapters
  • the "connected" map is renamed to "sockets"
  • the Socket#binary() method is removed, as this use case is now covered by the ability to provide your own parser.
  • the 'origins' option is removed

Before:

new Server(3000, {
  origins: ["https://example.com"]
});

The 'origins' option was used in the allowRequest method, in order to
determine whether the request should pass or not. And the Engine.IO
server would implicitly add the necessary Access-Control-Allow-xxx
headers.

After:

new Server(3000, {
  cors: {
    origin: "https://example.com",
    methods: ["GET", "POST"],
    allowedHeaders: ["content-type"]
  }
});

The already existing 'allowRequest' option can be used for validation:

new Server(3000, {
  allowRequest: (req, callback) => {
    callback(null, req.headers.referer.startsWith("https://example.com"));
  }
});
  • Socket#rooms is now a Set instead of an object

  • Namespace#connected is now a Map instead of an object

  • there is no more implicit connection to the default namespace:

// client-side
const socket = io("/admin");

// server-side
io.on("connect", socket => {
  // not triggered anymore
})

io.use((socket, next) => {
  // not triggered anymore
});

io.of("/admin").use((socket, next) => {
  // triggered
});
  • the Server#set() method was removed

This method was kept for backward-compatibility with pre-1.0 versions.

socketio/socket.io-client

v3.1.0

Compare Source

Bug Fixes

3.0.5 (2021-01-05)

Bug Fixes
  • emit a connect_error event upon connection failure (53c7374)
  • typings: make sendBuffer and receiveBuffer public (b83f89c)

3.0.4 (2020-12-07)

Bug Fixes

3.0.3 (2020-11-19)

Bug Fixes
  • properly export io in ES modules wrapper (bec1524)

3.0.2 (2020-11-17)

Bug Fixes

3.0.1 (2020-11-09)

Bug Fixes

v3.0.5

Compare Source

Bug Fixes
  • emit a connect_error event upon connection failure (53c7374)
  • typings: make sendBuffer and receiveBuffer public (b83f89c)

v3.0.4

Compare Source

Bug Fixes

v3.0.3

Compare Source

Bug Fixes
  • properly export io in ES modules wrapper (bec1524)

v3.0.2

Compare Source

Bug Fixes

v3.0.1

Compare Source

Bug Fixes

v3.0.0

Compare Source

Code Refactoring
  • rename ERROR to CONNECT_ERROR (13e1db7)
Features
  • emit an Error object upon middleware error (0939395)
  • add bundle with msgpack parser (71d6048)
  • add support for catch-all listeners (55f464f)
  • add volatile events (7ddad2c)
  • move binary detection back to the parser (1789094)
  • add ES6 module export (cbabb03)
  • do not reuse the Engine.IO id (bbe94ad)
  • remove the implicit connection to the default namespace (249e0be)
  • split the events of the Manager and Socket (132f8ec)
  • throw upon reserved event names (6494f61)
BREAKING CHANGES
  • the Socket instance will now emit a "connect_error" event instead of "error" (which is not a reserved event anymore)
// before
socket.on("error", () => {});

// after
socket.on("connect_error", () => {});
  • the Socket#binary() method is removed, as this use case is now covered by the ability to provide your own parser.

  • the Socket instance will no longer forward the events of its Manager

Those events can still be accessed on the Manager instance though:

socket.io.on("reconnect", () => {
  // ...
});
socketio/socket.io-redis

v6.0.1

Compare Source

Bug Fixes

v6.0.0

Compare Source

Features
  • add support for Socket.IO v3 (d9bcb19)
BREAKING CHANGES:
  • all the requests (for inter-node communication) now return a Promise instead of accepting a callback

Before:

io.of('/').adapter.allRooms((err, rooms) => {
  console.log(rooms); // an array containing all rooms (accross every node)
});

After:

const rooms = await io.of('/').adapter.allRooms();
console.log(rooms); // a Set containing all rooms (across every node)
  • RedisAdapter.clients() is renamed to RedisAdapter.sockets()

See socketio/socket.io-adapter@130f28a

  • RedisAdapter.customHook() and RedisAdapter.customRequest() are removed

Those methods will be replaced by a more intuitive API in a future iteration.

  • support for Node.js 8 is dropped

See https://github.com/nodejs/Release


Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/major-socket.io-packages branch 8 times, most recently from 0f0ead0 to 272841c Compare December 16, 2020 08:15
@renovate renovate bot force-pushed the renovate/major-socket.io-packages branch 5 times, most recently from 60b08f7 to 318eb38 Compare December 22, 2020 08:36
@renovate renovate bot force-pushed the renovate/major-socket.io-packages branch 5 times, most recently from eccc7a5 to b889e27 Compare January 3, 2021 10:25
@renovate renovate bot force-pushed the renovate/major-socket.io-packages branch 7 times, most recently from 3c3f9e2 to 9b52246 Compare January 11, 2021 07:50
@renovate renovate bot force-pushed the renovate/major-socket.io-packages branch 5 times, most recently from fac0ff2 to c0dd93c Compare January 19, 2021 09:30
@renovate renovate bot force-pushed the renovate/major-socket.io-packages branch 6 times, most recently from eaae663 to c6bbbbd Compare January 26, 2021 10:46
@renovate renovate bot force-pushed the renovate/major-socket.io-packages branch from c6bbbbd to 2c7f76d Compare January 27, 2021 07:45
@kamilmysliwiec kamilmysliwiec changed the base branch from master to 8.0.0 January 29, 2021 12:49
@kamilmysliwiec kamilmysliwiec merged commit 3ffa76f into 8.0.0 Jan 29, 2021
@delete-merged-branch delete-merged-branch bot deleted the renovate/major-socket.io-packages branch January 29, 2021 14:24
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