Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: socketio/socket.io
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.0.4
Choose a base ref
...
head repository: socketio/socket.io
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.0.5
Choose a head ref
  • 10 commits
  • 57 files changed
  • 3 contributors

Commits on Dec 11, 2020

  1. refactor: add more typing info and upgrade prettier (#3725)

    This upgrades prettier to 2.2.0 to gain support for TypeScript's new
    type-only-imports feature.
    david-fong authored Dec 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d1bfe40 View commit details

Commits on Dec 17, 2020

  1. Copy the full SHA
    178e899 View commit details

Commits on Dec 30, 2020

  1. Copy the full SHA
    292d62e View commit details
  2. Copy the full SHA
    f773b48 View commit details

Commits on Jan 4, 2021

  1. Copy the full SHA
    a0a3481 View commit details
  2. chore: bump dependencies

    Download authored and darrachequesne committed Jan 4, 2021
    Copy the full SHA
    230cd19 View commit details

Commits on Jan 5, 2021

  1. Copy the full SHA
    170b739 View commit details
  2. revert: restore the socket middleware functionality

    This functionality was removed in [1] (included in 3.0.0), but
    catch-all listeners and socket middleware features are complementary
    rather than mutually exclusive.
    
    The only difference with the previous implementation is that passing an
    error to the `next` handler will create an error on the server-side,
    and not on the client-side anymore.
    
    ```js
    io.on("connection", (socket) => {
    
      socket.use(([ event, ...args ], next) => {
        next(new Error("stop"));
      });
    
      socket.on("error", (err) => {
        // to restore the previous behavior
        socket.emit("error", err);
    
        // or close the connection, depending on your use case
        socket.disconnect(true);
      });
    });
    ```
    
    This creates additional possibilities about custom error handlers, which
    may be implemented in the future.
    
    ```js
    // user-defined error handler
    socket.use((err, [ event ], next) => {
      // either handle it
      socket.disconnect();
    
      // or forward the error to the default error handler
      next(err);
    });
    
    // default error handler
    socket.use((err, _, next) => {
      socket.emit("error", err);
    });
    ```
    
    Related: #3678
    
    [1]: 5c73733
    darrachequesne committed Jan 5, 2021
    Copy the full SHA
    bf54327 View commit details
  3. Copy the full SHA
    752dfe3 View commit details
  4. chore(release): 3.0.5

    darrachequesne committed Jan 5, 2021
    Copy the full SHA
    f8a66fd View commit details
Loading