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: 5d55e52529167c25f4fec35cb4753294e75bf9f2
Choose a base ref
...
head repository: websockets/ws
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f5297f7090f6a628832a730187c5b3a06a247f00
Choose a head ref
Loading
Showing with 4,816 additions and 2,435 deletions.
  1. +0 −2 .eslintignore
  2. +14 −4 .eslintrc.yaml
  3. +1 −0 .gitattributes
  4. +2 −0 .github/FUNDING.yml
  5. +10 −7 ISSUE_TEMPLATE.md → .github/issue_template.md
  6. +50 −0 .github/workflows/ci.yml
  7. +0 −1 .gitignore
  8. +1 −0 .npmrc
  9. +5 −0 .prettierrc.yaml
  10. +0 −10 .travis.yml
  11. +178 −99 README.md
  12. +11 −8 SECURITY.md
  13. +5 −6 appveyor.yml
  14. +10 −11 bench/parser.benchmark.js
  15. +32 −14 bench/speed.js
  16. +8 −0 browser.js
  17. +160 −75 doc/ws.md
  18. +45 −22 examples/express-session-parse/index.js
  19. +3 −3 examples/express-session-parse/package.json
  20. +35 −14 examples/express-session-parse/public/app.js
  21. +3 −0 examples/express-session-parse/public/index.html
  22. +0 −1 examples/fileapi/.gitignore
  23. +0 −10 examples/fileapi/package.json
  24. +0 −40 examples/fileapi/public/app.js
  25. +0 −22 examples/fileapi/public/index.html
  26. +0 −56 examples/fileapi/public/uploader.js
  27. +0 −108 examples/fileapi/server.js
  28. +18 −9 examples/{serverstats/server.js → server-stats/index.js}
  29. +1 −1 examples/{serverstats → server-stats}/package.json
  30. +63 −0 examples/server-stats/public/index.html
  31. +0 −33 examples/serverstats/public/index.html
  32. +4 −4 examples/ssl.js
  33. +1 −0 index.js
  34. +70 −13 lib/buffer-util.js
  35. +46 −32 lib/event-target.js
  36. +49 −37 lib/extension.js
  37. +55 −0 lib/limiter.js
  38. +111 −110 lib/permessage-deflate.js
  39. +67 −73 lib/receiver.js
  40. +168 −164 lib/sender.js
  41. +165 −0 lib/stream.js
  42. +88 −13 lib/validation.js
  43. +129 −68 lib/websocket-server.js
  44. +354 −239 lib/websocket.js
  45. +30 −18 package.json
  46. +3 −1 test/autobahn-server.js
  47. +4 −2 test/autobahn.js
  48. +15 −0 test/buffer-util.test.js
  49. +530 −0 test/create-websocket-stream.test.js
  50. +70 −60 test/extension.test.js
  51. +41 −0 test/limiter.test.js
  52. +219 −106 test/permessage-deflate.test.js
  53. +213 −104 test/receiver.test.js
  54. +122 −100 test/sender.test.js
  55. +52 −0 test/validation.test.js
  56. +377 −215 test/websocket-server.test.js
  57. +3 −3 test/websocket.integration.js
  58. +1,175 −517 test/websocket.test.js
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

18 changes: 14 additions & 4 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
extends: standard
env:
browser: true
es6: true
mocha: true
node: true
extends:
- eslint:recommended
- plugin:prettier/recommended
parserOptions:
ecmaVersion: 9
rules:
no-extra-semi: error
semi:
no-console: off
no-var: error
prefer-const: error
quotes:
- error
- always
- single
- avoidEscape: true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github:
- lpinca
17 changes: 10 additions & 7 deletions ISSUE_TEMPLATE.md → .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -7,32 +7,35 @@ General support questions should be raised on a channel like Stack Overflow.
Please fill in as much of the template below as you're able.
-->

- [ ] I've searched for any related issues and avoided creating a duplicate issue.
- [ ] I've searched for any related issues and avoided creating a duplicate
issue.

#### Description

<!-- e.g. Description of the bug or feature -->

#### Reproducible in:

version:
Node.js version(s):
OS version(s):
- version:
- Node.js version(s):
- OS version(s):

#### Steps to reproduce:

1.

2.

3.

### Expected result:
#### Expected result:

<!-- e.g. What you expected to happen -->

### Actual result:
#### Actual result:

<!-- e.g. What actually happened -->

### Attachments:
#### Attachments:

<!-- e.g. Logs, screenshots, screencast, etc. -->
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
- push
- pull_request

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node:
- 8
- 10
- 12
- 14
- 16
os:
- macOS-latest
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run lint
if: matrix.node == 16 && matrix.os == 'ubuntu-latest'
- run: npm test
- run:
echo ::set-output name=job_id::$(node -e
"console.log(crypto.randomBytes(16).toString('hex'))")
id: get_job_id
shell: bash
- uses: coverallsapp/github-action@v1.1.2
with:
flag-name:
${{ steps.get_job_id.outputs.job_id }} (Node.js ${{ matrix.node }}
on ${{ matrix.os }})
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -2,4 +2,3 @@ node_modules/
.nyc_output/
coverage/
.vscode/
npm-debug.log
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
5 changes: 5 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
arrowParens: always
endOfLine: lf
proseWrap: always
singleQuote: true
trailingComma: none
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

Loading