Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit de259ff

Browse files
dignifiedquiredaviddias
authored andcommitted
feat: replace protocol-buffers with protons (#16)
Ref ipfs/js-ipfs#991
1 parent e8ff69d commit de259ff

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ test/test-data/go-ipfs-repo/LOG.old
4040

4141
# while testing npm5
4242
package-lock.json
43+
yarn.lock

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"peer-id": "~0.10.0",
5656
"peer-info": "~0.11.0",
5757
"priorityqueue": "^0.2.0",
58-
"protocol-buffers": "^3.2.1",
58+
"protons": "^1.0.0",
5959
"pull-length-prefixed": "^1.3.0",
6060
"pull-stream": "^3.6.0",
6161
"safe-buffer": "^5.1.1",
@@ -83,4 +83,4 @@
8383
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
8484
"Pedro Teixeira <i@pgte.me>"
8585
]
86-
}
86+
}

src/message/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
const assert = require('assert')
44
const PeerInfo = require('peer-info')
55
const PeerId = require('peer-id')
6-
const protobuf = require('protocol-buffers')
6+
const protons = require('protons')
77
const Record = require('libp2p-record').Record
88

9-
const pbm = protobuf(require('./dht.proto'))
9+
const pbm = protons(require('./dht.proto'))
1010

1111
const MESSAGE_TYPE = pbm.Message.MessageType
1212
const CONNECTION_TYPE = pbm.Message.ConnectionType

0 commit comments

Comments
 (0)