From d5b7e23b3cf712820450c02bcd241daf7dc060cc Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Thu, 7 Sep 2017 15:59:01 +0200 Subject: [PATCH] feat: replace protocol-buffers with protons (#48) * feat: replace protocol-buffers with protons Ref https://github.com/ipfs/js-ipfs/issues/991 * chore: ignore lockfiles --- .gitignore | 5 ++++- package.json | 23 ++++++++++++----------- src/message/index.js | 6 +++--- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 0e9a0d0..72c62e8 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,7 @@ node_modules dist -docs \ No newline at end of file +docs + +package-lock.json +yarn.lock \ No newline at end of file diff --git a/package.json b/package.json index fff2072..ca6a051 100644 --- a/package.json +++ b/package.json @@ -44,23 +44,24 @@ "devDependencies": { "aegir": "^11.0.2", "benchmark": "^2.1.4", - "chai": "^4.1.0", + "chai": "^4.1.2", "dirty-chai": "^2.0.1", - "pre-commit": "^1.2.2", + "libp2p": "~0.12.3", + "libp2p-secio": "~0.8.1", + "libp2p-spdy": "~0.11.0", + "libp2p-tcp": "~0.11.0", "lodash.times": "^4.3.2", - "libp2p": "~0.11.0", - "libp2p-secio": "~0.7.1", - "libp2p-spdy": "~0.10.6", - "libp2p-tcp": "~0.10.2", - "peer-id": "~0.9.0", - "peer-info": "~0.10.0" + "peer-id": "~0.10.0", + "peer-info": "~0.11.0", + "pre-commit": "^1.2.2" }, "dependencies": { "async": "^2.5.0", - "debug": "^2.6.8", + "debug": "^3.0.1", "length-prefixed-stream": "^1.5.1", - "libp2p-crypto": "~0.9.4", + "libp2p-crypto": "~0.10.3", "lodash.values": "^4.3.0", + "protons": "^1.0.0", "pull-pushable": "^2.1.1", "time-cache": "~0.3.0" }, @@ -74,4 +75,4 @@ "greenkeeper[bot] ", "wanderer " ] -} \ No newline at end of file +} diff --git a/src/message/index.js b/src/message/index.js index a22482a..ed860a6 100644 --- a/src/message/index.js +++ b/src/message/index.js @@ -1,9 +1,9 @@ 'use strict' -const protobuf = require('protocol-buffers') +const protons = require('protons') -const rpcProto = protobuf(require('./rpc.proto.js')) -const topicDescriptorProto = protobuf(require('./topic-descriptor.proto.js')) +const rpcProto = protons(require('./rpc.proto.js')) +const topicDescriptorProto = protons(require('./topic-descriptor.proto.js')) exports = module.exports exports.rpc = rpcProto