From de259ffe56ab50fc904fee57ee6b90ec179db4fc Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Thu, 7 Sep 2017 15:53:45 +0200 Subject: [PATCH] feat: replace protocol-buffers with protons (#16) Ref https://github.com/ipfs/js-ipfs/issues/991 --- .gitignore | 1 + package.json | 4 ++-- src/message/index.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e4c5b0e3..141b7976 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ test/test-data/go-ipfs-repo/LOG.old # while testing npm5 package-lock.json +yarn.lock diff --git a/package.json b/package.json index d41184fb..293bcc90 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "peer-id": "~0.10.0", "peer-info": "~0.11.0", "priorityqueue": "^0.2.0", - "protocol-buffers": "^3.2.1", + "protons": "^1.0.0", "pull-length-prefixed": "^1.3.0", "pull-stream": "^3.6.0", "safe-buffer": "^5.1.1", @@ -83,4 +83,4 @@ "Friedel Ziegelmayer ", "Pedro Teixeira " ] -} \ No newline at end of file +} diff --git a/src/message/index.js b/src/message/index.js index d5df3bb2..7c045c92 100644 --- a/src/message/index.js +++ b/src/message/index.js @@ -3,10 +3,10 @@ const assert = require('assert') const PeerInfo = require('peer-info') const PeerId = require('peer-id') -const protobuf = require('protocol-buffers') +const protons = require('protons') const Record = require('libp2p-record').Record -const pbm = protobuf(require('./dht.proto')) +const pbm = protons(require('./dht.proto')) const MESSAGE_TYPE = pbm.Message.MessageType const CONNECTION_TYPE = pbm.Message.ConnectionType