Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Update dependency socket.io to v3 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Nov 27, 2020

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
socket.io 2.3.0 -> 3.0.4 age adoption passing confidence

Release Notes

socketio/socket.io

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.


Renovate configuration

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

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

♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • 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 from 7ded21e to ed16183 Compare December 9, 2020 05:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant