From ed9df0bb120433752d10dfa1a3a066a6cafd5c95 Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Mon, 18 Feb 2019 15:52:55 +0100 Subject: [PATCH] feat: use pull-mplex instead of libp2p-mplex --- README.md | 2 +- examples/custom-libp2p/index.js | 2 +- examples/custom-libp2p/package.json | 4 ++-- package-list.json | 2 +- package.json | 2 +- src/core/runtime/libp2p-browser.js | 2 +- src/core/runtime/libp2p-nodejs.js | 2 +- test/core/libp2p.spec.js | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 931f47a420..2b2cec4ef4 100644 --- a/README.md +++ b/README.md @@ -885,13 +885,13 @@ Listing of the main packages used in the IPFS ecosystem. There are also three sp | [`libp2p-floodsub`](//github.com/libp2p/js-libp2p-floodsub) | [![npm](https://img.shields.io/npm/v/libp2p-floodsub.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-floodsub/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-floodsub.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-floodsub) | N/A | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-floodsub/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-floodsub) | N/A | | [`libp2p-kad-dht`](//github.com/libp2p/js-libp2p-kad-dht) | [![npm](https://img.shields.io/npm/v/libp2p-kad-dht.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-kad-dht/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-kad-dht.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-kad-dht) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/js-libp2p-kad-dht/master)](https://ci.ipfs.team/job/libp2p/job/js-libp2p-kad-dht/job/master/) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-kad-dht/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-kad-dht) | [Vasco Santos](mailto:vasco.santos@moxy.studio) | | [`libp2p-mdns`](//github.com/libp2p/js-libp2p-mdns) | [![npm](https://img.shields.io/npm/v/libp2p-mdns.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-mdns/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-mdns.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-mdns) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/js-libp2p-mdns/master)](https://ci.ipfs.team/job/libp2p/job/js-libp2p-mdns/job/master/) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-mdns/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-mdns) | N/A | -| [`libp2p-mplex`](//github.com/libp2p/js-libp2p-mplex) | [![npm](https://img.shields.io/npm/v/libp2p-mplex.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-mplex/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-mplex.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-mplex) | N/A | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-mplex/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-mplex) | [Vasco Santos](mailto:vasco.santos@moxy.studio) | | [`libp2p-railing`](//github.com/libp2p/js-libp2p-railing) | [![npm](https://img.shields.io/npm/v/libp2p-railing.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-railing/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-railing.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-railing) | N/A | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-railing/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-railing) | [Vasco Santos](mailto:vasco.santos@moxy.studio) | | [`libp2p-secio`](//github.com/libp2p/js-libp2p-secio) | [![npm](https://img.shields.io/npm/v/libp2p-secio.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-secio/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-secio.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-secio) | N/A | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-secio/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-secio) | N/A | | [`libp2p-tcp`](//github.com/libp2p/js-libp2p-tcp) | [![npm](https://img.shields.io/npm/v/libp2p-tcp.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-tcp/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-tcp.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-tcp) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/js-libp2p-tcp/master)](https://ci.ipfs.team/job/libp2p/job/js-libp2p-tcp/job/master/) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-tcp/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-tcp) | [Jacob Heun](mailto:jacobheun@gmail.com) | | [`libp2p-webrtc-star`](//github.com/libp2p/js-libp2p-webrtc-star) | [![npm](https://img.shields.io/npm/v/libp2p-webrtc-star.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-webrtc-star/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-webrtc-star.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-webrtc-star) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/js-libp2p-webrtc-star/master)](https://ci.ipfs.team/job/libp2p/job/js-libp2p-webrtc-star/job/master/) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-webrtc-star/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-webrtc-star) | [Vasco Santos](mailto:vasco.santos@moxy.studio) | | [`libp2p-websocket-star`](//github.com/libp2p/js-libp2p-websocket-star) | [![npm](https://img.shields.io/npm/v/libp2p-websocket-star.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-websocket-star/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-websocket-star.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-websocket-star) | N/A | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-websocket-star/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-websocket-star) | [Jacob Heun](mailto:jacobheun@gmail.com) | | [`libp2p-websockets`](//github.com/libp2p/js-libp2p-websockets) | [![npm](https://img.shields.io/npm/v/libp2p-websockets.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-websockets/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-websockets.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-websockets) | N/A | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-websockets/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-websockets) | N/A | +| [`pull-mplex`](//github.com/libp2p/pull-mplex) | [![npm](https://img.shields.io/npm/v/pull-mplex.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/pull-mplex/releases) | [![Deps](https://david-dm.org/libp2p/pull-mplex.svg?style=flat-square)](https://david-dm.org/libp2p/pull-mplex) | N/A | [![codecov](https://codecov.io/gh/libp2p/pull-mplex/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/pull-mplex) | [Jacob Heun](mailto:jacobheun@gmail.com) | | **Data Types** | | [`ipfs-block`](//github.com/ipfs/js-ipfs-block) | [![npm](https://img.shields.io/npm/v/ipfs-block.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-block/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-block.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-block) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=ipfs/js-ipfs-block/master)](https://ci.ipfs.team/job/ipfs/job/js-ipfs-block/job/master/) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-block/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-block) | N/A | | [`ipfs-unixfs`](//github.com/ipfs/js-ipfs-unixfs) | [![npm](https://img.shields.io/npm/v/ipfs-unixfs.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-unixfs/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-unixfs.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs) | N/A | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs) | [Alex Potsides](mailto:alex.potsides@protocol.ai) | diff --git a/examples/custom-libp2p/index.js b/examples/custom-libp2p/index.js index 2c17d99fb0..768f084de4 100644 --- a/examples/custom-libp2p/index.js +++ b/examples/custom-libp2p/index.js @@ -8,7 +8,7 @@ const WebSocketStar = require('libp2p-websocket-star') const Bootstrap = require('libp2p-bootstrap') const SPDY = require('libp2p-spdy') const KadDHT = require('libp2p-kad-dht') -const MPLEX = require('libp2p-mplex') +const MPLEX = require('pull-mplex') const SECIO = require('libp2p-secio') const assert = require('assert') diff --git a/examples/custom-libp2p/package.json b/examples/custom-libp2p/package.json index acc1a5b352..661154e370 100644 --- a/examples/custom-libp2p/package.json +++ b/examples/custom-libp2p/package.json @@ -14,10 +14,10 @@ "libp2p-bootstrap": "~0.9.3", "libp2p-kad-dht": "~0.11.1", "libp2p-mdns": "~0.12.0", - "libp2p-mplex": "~0.8.4", "libp2p-secio": "~0.10.1", "libp2p-spdy": "~0.13.0", "libp2p-tcp": "~0.13.0", - "libp2p-websocket-star": "~0.9.0" + "libp2p-websocket-star": "~0.9.0", + "pull-mplex": "~0.1.0" } } diff --git a/package-list.json b/package-list.json index 17278277a9..9e8ee935e7 100644 --- a/package-list.json +++ b/package-list.json @@ -29,13 +29,13 @@ ["libp2p/js-libp2p-floodsub", "libp2p-floodsub"], ["libp2p/js-libp2p-kad-dht", "libp2p-kad-dht"], ["libp2p/js-libp2p-mdns", "libp2p-mdns"], - ["libp2p/js-libp2p-mplex", "libp2p-mplex"], ["libp2p/js-libp2p-railing", "libp2p-railing"], ["libp2p/js-libp2p-secio", "libp2p-secio"], ["libp2p/js-libp2p-tcp", "libp2p-tcp"], ["libp2p/js-libp2p-webrtc-star", "libp2p-webrtc-star"], ["libp2p/js-libp2p-websocket-star", "libp2p-websocket-star"], ["libp2p/js-libp2p-websockets", "libp2p-websockets"], + ["libp2p/pull-mplex", "pull-mplex"], "Data Types", ["ipfs/js-ipfs-block", "ipfs-block"], diff --git a/package.json b/package.json index 6ca11e0338..1aef48c902 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,6 @@ "libp2p-kad-dht": "~0.14.4", "libp2p-keychain": "~0.3.3", "libp2p-mdns": "~0.12.0", - "libp2p-mplex": "~0.8.4", "libp2p-record": "~0.6.1", "libp2p-secio": "~0.11.0", "libp2p-tcp": "~0.13.0", @@ -160,6 +159,7 @@ "pull-cat": "^1.1.11", "pull-defer": "~0.2.3", "pull-file": "^1.1.0", + "pull-mplex": "~0.1.0", "pull-ndjson": "~0.1.1", "pull-pushable": "^2.2.0", "pull-sort": "^1.0.1", diff --git a/src/core/runtime/libp2p-browser.js b/src/core/runtime/libp2p-browser.js index 8fae1ae176..3f52a827cb 100644 --- a/src/core/runtime/libp2p-browser.js +++ b/src/core/runtime/libp2p-browser.js @@ -3,7 +3,7 @@ const WS = require('libp2p-websockets') const WebRTCStar = require('libp2p-webrtc-star') const WebSocketStarMulti = require('libp2p-websocket-star-multi') -const Multiplex = require('libp2p-mplex') +const Multiplex = require('pull-mplex') const SECIO = require('libp2p-secio') const Bootstrap = require('libp2p-bootstrap') const KadDHT = require('libp2p-kad-dht') diff --git a/src/core/runtime/libp2p-nodejs.js b/src/core/runtime/libp2p-nodejs.js index 01e7046e19..c2c378c55c 100644 --- a/src/core/runtime/libp2p-nodejs.js +++ b/src/core/runtime/libp2p-nodejs.js @@ -6,7 +6,7 @@ const WS = require('libp2p-websockets') const WebSocketStarMulti = require('libp2p-websocket-star-multi') const Bootstrap = require('libp2p-bootstrap') const KadDHT = require('libp2p-kad-dht') -const Multiplex = require('libp2p-mplex') +const Multiplex = require('pull-mplex') const SECIO = require('libp2p-secio') const libp2p = require('libp2p') const defaultsDeep = require('@nodeutils/defaults-deep') diff --git a/test/core/libp2p.spec.js b/test/core/libp2p.spec.js index c77709c9ee..951b76f43d 100644 --- a/test/core/libp2p.spec.js +++ b/test/core/libp2p.spec.js @@ -11,7 +11,7 @@ const MemoryStore = require('interface-datastore').MemoryDatastore const PeerInfo = require('peer-info') const PeerBook = require('peer-book') const WebSocketStar = require('libp2p-websocket-star') -const Multiplex = require('libp2p-mplex') +const Multiplex = require('pull-mplex') const SECIO = require('libp2p-secio') const KadDHT = require('libp2p-kad-dht') const Libp2p = require('libp2p')