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: websockets/ws
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7.5.3
Choose a base ref
...
head repository: websockets/ws
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8.0.0
Choose a head ref
  • 18 commits
  • 31 files changed
  • 1 contributor

Commits on Jul 14, 2021

  1. [major] Validate subprotocol names

    Make the `WebSocket` constructor throw a `SyntaxError` if any of the
    subprotocol names are invalid or duplicated.
    lpinca committed Jul 14, 2021
    2 Configuration menu
    Copy the full SHA
    0aecf0c View commit details
    Browse the repository at this point in the history
  2. [major] Validate the Sec-WebSocket-Protocol header

    Abort the handshake if the `Sec-WebSocket-Protocol` header is invalid.
    lpinca committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    1877dde View commit details
    Browse the repository at this point in the history
  3. [major] Make the Sec-WebSocket-Extensions header parser stricter

    Make the parser throw an error if the header field value is empty or if
    it begins or ends with a white space.
    lpinca committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    e814110 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    552b506 View commit details
    Browse the repository at this point in the history
  5. [major] Throw an error if the connection URL is invalid

    Make the `WebSocket` constructor throw a `SyntaxError` if the URL
    contains a fragment identifier or if the URL's protocol is not one of
    `'ws:'`, `'wss:'`, or `'ws+unix:'`.
    lpinca committed Jul 14, 2021
    1 Configuration menu
    Copy the full SHA
    ebea038 View commit details
    Browse the repository at this point in the history
  6. [major] Do not decode Buffers to strings

    Avoid decoding text messages and close reasons to strings. Pass them as
    `Buffer`s to the listeners of their respective events. Also, make
    listeners of the `'message'` event take a boolean argument to speficy
    whether or not the message is binary.
    
    Refs: #1878
    Refs: #1804
    lpinca committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    e173423 View commit details
    Browse the repository at this point in the history
  7. [major] Add an ES module wrapper

    Fixes #1886
    lpinca committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    78adf5f View commit details
    Browse the repository at this point in the history
  8. [major] Do not close existing connections

    When `WebSocketServer.prototype.close()` is called, stop accepting new
    connections but do not close the existing ones.
    
    If the HTTP/S server was created internally, then close it and emit the
    `'close'` event when it closes. Otherwise, if client tracking is
    enabled, then emit the `'close'` event when the number of connections
    goes down to zero. Otherwise, emit it in the next tick.
    
    Refs: #1902
    lpinca committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    df7de57 View commit details
    Browse the repository at this point in the history
  9. [major] Call the callback with an error if the server is closed

    Match the behavior of Node.js core `net.Server` and call the callback
    of `WebSocketServer.prototype.close()` with an error if the server is
    already closed.
    lpinca committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    abde9cf View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2021

  1. Configuration menu
    Copy the full SHA
    64b3c71 View commit details
    Browse the repository at this point in the history
  2. [minor] Remove unneeded setters

    Refs: ecb9d9ea
    lpinca committed Jul 15, 2021
    Configuration menu
    Copy the full SHA
    77a675c View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2021

  1. [major] Make WebSocket#addEventListener() ignore non standard events

    Make `WebSocket.prototype.addEventListener()` a noop if the `type`
    argument is not one of `'close'`, `'error'`, `'message'`, or `'open'`.
    lpinca committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    9558ed1 View commit details
    Browse the repository at this point in the history
  2. [major] Ignore listeners not added with WebSocket#addEventListener()

    Make `WebSocket.prototype.removeEventListener()` only remove listeners
    added with `WebSocket.prototype.addEventListener()` and only one at
    time.
    lpinca committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    ea95d9c View commit details
    Browse the repository at this point in the history
  3. [fix] Make listeners added via event handler properties independent

    Prevent the `onclose`, `onerror`, `onmessage`, and `onopen` getters and
    setters from returning or removing event listeners added with
    `WebSocket.prototype.addEventListener()`.
    
    Also prevent `WebSocket.prototype.removeEventListener()` from removing
    event listeners added with the `onclose`, `onerror`, `onmessage`, and
    `onopen` setters.
    
    Refs: #1818
    lpinca committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    8c61563 View commit details
    Browse the repository at this point in the history
  4. [fix] Return null if the event handler is not set

    Make the `onclose`, `onerror`, `onmessage`, and `onopen` getters return
    `null` instead of `undefined` if the event handler is not set.
    lpinca committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    6756cf5 View commit details
    Browse the repository at this point in the history
  5. [minor] Fix nits

    lpinca committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    bd7febb View commit details
    Browse the repository at this point in the history
  6. [major] Overhaul event classes

    - Remove non-standard `OpenEvent` class.
    - Make properties read-only.
    - Update constructor signatures to match the ones defined by the HTML
      standard.
    lpinca committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    21e6500 View commit details
    Browse the repository at this point in the history
  7. [dist] 8.0.0

    lpinca committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    fc40248 View commit details
    Browse the repository at this point in the history
Loading