Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.
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: libp2p/js-libp2p-websockets
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e7ab32f0be1300f1adaff1b7cc7039c9e88ce50c
Choose a base ref
...
head repository: libp2p/js-libp2p-websockets
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e9189bbadf92dc8b524fba1b313f50fa7a00cce3
Choose a head ref

Commits on Apr 5, 2018

  1. Copy the full SHA
    709989a View commit details
  2. feat: add class-is module (#72)

    fsdiogo authored and daviddias committed Apr 5, 2018
    Copy the full SHA
    f59cf88 View commit details
  3. chore: update deps

    daviddias committed Apr 5, 2018
    Copy the full SHA
    ce830d4 View commit details
  4. chore: update contributors

    daviddias committed Apr 5, 2018
    Copy the full SHA
    dd5c63d View commit details
  5. Copy the full SHA
    887dc13 View commit details

Commits on Apr 24, 2018

  1. Fix #70 - Better error for .createServer in browser (#73)

    * Fix #70 - Better error for .createServer in browser
    
    * Add test for throw
    
    * Make test sync
    mkg20001 authored and daviddias committed Apr 24, 2018
    Copy the full SHA
    9ffe03a View commit details

Commits on Apr 30, 2018

  1. chore: update deps

    daviddias committed Apr 30, 2018
    Copy the full SHA
    3ca4829 View commit details
  2. chore: update contributors

    daviddias committed Apr 30, 2018
    Copy the full SHA
    1d0e97d View commit details
  3. Copy the full SHA
    11b62d6 View commit details

Commits on Jun 26, 2018

  1. chore: add lead maintainer (#75)

    * chore: add lead maintainer
    
    License: MIT
    Signed-off-by: Jacob Heun <jacobheun@gmail.com>
    
    * Update package.json
    Jacob Heun authored Jun 26, 2018
    Copy the full SHA
    d661bb6 View commit details

Commits on Jan 8, 2019

  1. docs: added example to README (#80)

    The example is adapted from the example in js-libp2p-tcp
    nikor authored and jacobheun committed Jan 8, 2019
    Copy the full SHA
    c26ae32 View commit details

Commits on Jan 10, 2019

  1. fix: reduce bundle size

    hugomrdias authored and jacobheun committed Jan 10, 2019
    Copy the full SHA
    68ae2c3 View commit details
  2. chore: update deps

    hugomrdias authored and jacobheun committed Jan 10, 2019
    Copy the full SHA
    b37b681 View commit details
  3. chore: update contributors

    jacobheun committed Jan 10, 2019
    Copy the full SHA
    8c2d2ad View commit details
  4. chore: release version v0.12.1

    License: MIT
    Signed-off-by: Jacob Heun <jacobheun@gmail.com>
    jacobheun committed Jan 10, 2019
    Copy the full SHA
    24541d3 View commit details

Commits on Jan 24, 2019

  1. fix: ipv6 naming with multiaddr-to-uri package (#81)

    * chore: use multiaddr-to-uri package
    
    * fix: ipv6 naming with multiaddr-to-uri
    vasco-santos authored and jacobheun committed Jan 24, 2019
    Copy the full SHA
    93ef7c3 View commit details
  2. chore: update contributors

    jacobheun committed Jan 24, 2019
    Copy the full SHA
    3d8f5cd View commit details
  3. chore: release version v0.12.2

    License: MIT
    Signed-off-by: Jacob Heun <jacobheun@gmail.com>
    jacobheun committed Jan 24, 2019
    Copy the full SHA
    18885e9 View commit details

Commits on Apr 15, 2019

  1. chore: add discourse badge (#83)

    vasco-santos authored and jacobheun committed Apr 15, 2019
    Copy the full SHA
    83475bd View commit details

Commits on Apr 24, 2019

  1. chore: enable ip6 tests (#85)

    vasco-santos authored and jacobheun committed Apr 24, 2019
    Copy the full SHA
    1be100b View commit details

Commits on Jul 22, 2019

  1. chore: update aegir (#87)

    michaelfig authored and jacobheun committed Jul 22, 2019
    Copy the full SHA
    ff19e81 View commit details

Commits on Aug 21, 2019

  1. chore: update multiaddr-to-uri (#89)

    License: MIT
    Signed-off-by: Marcin Rataj <lidel@lidel.org>
    lidel authored and jacobheun committed Aug 21, 2019
    Copy the full SHA
    ee2dcb3 View commit details
  2. chore: update contributors

    jacobheun committed Aug 21, 2019
    Copy the full SHA
    d65c954 View commit details
  3. chore: release version v0.12.3

    License: MIT
    Signed-off-by: Jacob Heun <jacobheun@gmail.com>
    jacobheun committed Aug 21, 2019
    Copy the full SHA
    5a9434b View commit details

Commits on Sep 30, 2019

  1. refactor: async with multiaddr conn (#92)

    BREAKING CHANGE: Switch to using async/await and async iterators. The transport and connection interfaces have changed. See the README for new usage.
    vasco-santos authored and jacobheun committed Sep 30, 2019
    Copy the full SHA
    ce7bf4f View commit details
  2. test: fix skips (#95)

    The ephemeral port and host skips are no longer valid, so tests have been added for those.
    The other skipped test is now covered by the interface tests, so it's no longer needed.
    
    * chore: add node 12 to ci
    * chore: add docs and dist to gitignore
    * chore: clean up travis file
    jacobheun authored Sep 30, 2019
    Copy the full SHA
    fcb6bcc View commit details
  3. chore: update contributors

    jacobheun committed Sep 30, 2019
    Copy the full SHA
    b0ffbb2 View commit details
  4. chore: release version v0.13.0

    License: MIT
    Signed-off-by: Jacob Heun <jacobheun@gmail.com>
    jacobheun committed Sep 30, 2019
    Copy the full SHA
    b5496fb View commit details

Commits on Oct 30, 2019

  1. fix: catch inbound upgrade errors (#96)

    License: MIT
    Signed-off-by: Jacob Heun <jacobheun@gmail.com>
    jacobheun authored Oct 30, 2019
    Copy the full SHA
    5b59fc3 View commit details
  2. fix: support bufferlist usage (#97)

    several it-* modules leverage bufferlist, but ws does not. We need to convert buffer lists to buffers before handing the data off to ws for transmission
    
    License: MIT
    Signed-off-by: Jacob Heun <jacobheun@gmail.com>
    jacobheun authored Oct 30, 2019
    Copy the full SHA
    3bf66d0 View commit details
  3. chore: update contributors

    jacobheun committed Oct 30, 2019
    Copy the full SHA
    8d48ac2 View commit details
  4. chore: release version v0.13.1

    License: MIT
    Signed-off-by: Jacob Heun <jacobheun@gmail.com>
    jacobheun committed Oct 30, 2019
    Copy the full SHA
    bb206ba View commit details

Commits on Dec 20, 2019

  1. chore: use libp2p-interfaces (#98)

    vasco-santos authored and jacobheun committed Dec 20, 2019
    Copy the full SHA
    a4fafc3 View commit details
  2. chore: update contributors

    jacobheun committed Dec 20, 2019
    Copy the full SHA
    91da056 View commit details
  3. chore: release version v0.13.2

    License: MIT
    Signed-off-by: Jacob Heun <jacobheun@gmail.com>
    jacobheun committed Dec 20, 2019
    Copy the full SHA
    8550ae4 View commit details

Commits on Feb 7, 2020

  1. chore(deps): bump abortable-iterator from 2.1.0 to 3.0.0

    Bumps [abortable-iterator](https://github.com/alanshaw/abortable-iterator) from 2.1.0 to 3.0.0.
    - [Release notes](https://github.com/alanshaw/abortable-iterator/releases)
    - [Commits](alanshaw/abortable-iterator@v2.1.0...v3.0.0)
    
    Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
    dependabot-preview[bot] authored and jacobheun committed Feb 7, 2020
    Copy the full SHA
    261c3e6 View commit details
  2. chore: update it-ws

    Alan Shaw authored and jacobheun committed Feb 7, 2020
    Copy the full SHA
    8ab9162 View commit details
  3. chore: update contributors

    jacobheun committed Feb 7, 2020
    Copy the full SHA
    c8c8212 View commit details
  4. Copy the full SHA
    c8fda16 View commit details

Commits on Feb 14, 2020

  1. fix: remove use of assert module (#101)

    The polyfill is big, we can simulate it by throwing an Error and it doesn't work under React Native.
    achingbrain authored Feb 14, 2020
    Copy the full SHA
    89d3723 View commit details
  2. chore: update contributors

    jacobheun committed Feb 14, 2020
    Copy the full SHA
    cc38c87 View commit details
  3. Copy the full SHA
    eb9e5bd View commit details

Commits on Feb 26, 2020

  1. chore: use libp2p badge

    vasco-santos authored and jacobheun committed Feb 26, 2020
    Copy the full SHA
    d630b32 View commit details
  2. Copy the full SHA
    8bfb19a View commit details
  3. chore: update contributors

    jacobheun committed Feb 26, 2020
    Copy the full SHA
    6f2b61f View commit details
  4. Copy the full SHA
    a33db55 View commit details

Commits on Mar 23, 2020

  1. fix: add buffer (#112)

    hugomrdias authored Mar 23, 2020
    Copy the full SHA
    8065e07 View commit details
  2. chore(deps-dev): bump aegir from 20.6.1 to 21.4.4 (#111)

    * chore(deps-dev): bump aegir from 20.6.1 to 21.4.4
    
    Bumps [aegir](https://github.com/ipfs/aegir) from 20.6.1 to 21.4.4.
    - [Release notes](https://github.com/ipfs/aegir/releases)
    - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
    - [Commits](ipfs/aegir@v20.6.1...v21.4.4)
    
    Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
    
    * test(fix): fix aegir file for latest aegir
    
    Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
    Co-authored-by: Jacob Heun <jacobheun@gmail.com>
    dependabot-preview[bot] and jacobheun authored Mar 23, 2020
    Copy the full SHA
    a17c543 View commit details
  3. chore: update contributors

    jacobheun committed Mar 23, 2020
    Copy the full SHA
    1ad6c7f View commit details
  4. Copy the full SHA
    a37c2bd View commit details
Showing with 1,256 additions and 677 deletions.
  1. +17 −15 .aegir.js
  2. +48 −0 .github/workflows/main.yml
  3. +3 −40 .gitignore
  4. +0 −35 .npmignore
  5. +0 −32 .travis.yml
  6. +211 −0 CHANGELOG.md
  7. +60 −5 README.md
  8. +0 −29 appveyor.yml
  9. +0 −2 ci/Jenkinsfile
  10. +0 −15 circle.yml
  11. +46 −25 package.json
  12. +12 −0 src/constants.js
  13. +49 −0 src/filters.js
  14. +137 −37 src/index.js
  15. +5 −0 src/listener.browser.js
  16. +57 −30 src/listener.js
  17. +0 −37 src/ma-to-url.js
  18. +76 −0 src/socket-to-conn.js
  19. +49 −48 test/browser.js
  20. +53 −13 test/compliance.node.js
  21. +13 −0 test/fixtures/certificate.pem
  22. +15 −0 test/fixtures/key.pem
  23. +405 −314 test/node.js
32 changes: 17 additions & 15 deletions .aegir.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
'use strict'

const multiaddr = require('multiaddr')
const pull = require('pull-stream')

const { Multiaddr } = require('multiaddr')
const pipe = require('it-pipe')
const WS = require('./src')

const mockUpgrader = {
upgradeInbound: maConn => maConn,
upgradeOutbound: maConn => maConn
}
let listener

function boot (done) {
const ws = new WS()
const ma = multiaddr('/ip4/127.0.0.1/tcp/9095/ws')
listener = ws.createListener((conn) => pull(conn, conn))
listener.listen(ma, done)
async function before () {
const ws = new WS({ upgrader: mockUpgrader })
const ma = new Multiaddr('/ip4/127.0.0.1/tcp/9095/ws')
listener = ws.createListener(conn => pipe(conn, conn))
await listener.listen(ma)
listener.on('error', console.error)
}

function shutdown (done) {
listener.close(done)
function after () {
return listener.close()
}

module.exports = {
hooks: {
browser: {
pre: boot,
post: shutdown
}
test: {
before,
after
}
}
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir lint
- run: npx aegir dep-check -- -i wrtc -i electron-webrtc
- run: npx aegir build --no-types
test-node:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [14, 16]
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npx nyc --reporter=lcov aegir test -t node -- --bail
- uses: codecov/codecov-action@v1
test-chrome:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir test -t browser -t webworker --bail
test-firefox:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless
43 changes: 3 additions & 40 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,43 +1,6 @@
docs
node_modules
package-lock.json
yarn.lock

# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Vim editor swap files
*.swp

.nyc_output
docs
dist

35 changes: 0 additions & 35 deletions .npmignore

This file was deleted.

32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

Loading