Skip to content

Commit ca8fa72

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

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"lodash.uniqwith": "^4.5.0",
7272
"lodash.values": "^4.3.0",
7373
"multihashing-async": "~0.4.6",
74-
"protocol-buffers": "^3.2.1",
74+
"protons": "^1.0.0",
7575
"pull-defer": "^0.2.2",
7676
"pull-length-prefixed": "^1.3.0",
7777
"pull-pushable": "^2.1.1",

src/types/message/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const protobuf = require('protocol-buffers')
3+
const protons = require('protons')
44
const Block = require('ipfs-block')
55
const isEqualWith = require('lodash.isequalwith')
66
const assert = require('assert')
@@ -10,7 +10,7 @@ const codecName = require('multicodec/src/name-table')
1010
const vd = require('varint-decoder')
1111
const multihashing = require('multihashing-async')
1212

13-
const pbm = protobuf(require('./message.proto'))
13+
const pbm = protons(require('./message.proto'))
1414
const Entry = require('./entry')
1515

1616
class BitswapMessage {

test/types/message.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const chai = require('chai')
66
chai.use(require('dirty-chai'))
77
const expect = chai.expect
8-
const protobuf = require('protocol-buffers')
8+
const protons = require('protons')
99
const map = require('async/map')
1010
const CID = require('cids')
1111
const isNode = require('detect-node')
@@ -16,7 +16,7 @@ const testDataPath = (isNode ? '../' : '') + 'fixtures/serialized-from-go'
1616
const rawMessageFullWantlist = loadFixture(__dirname, testDataPath + '/bitswap110-message-full-wantlist')
1717
const rawMessageOneBlock = loadFixture(__dirname, testDataPath + '/bitswap110-message-one-block')
1818

19-
const pbm = protobuf(require('../../src/types/message/message.proto'))
19+
const pbm = protons(require('../../src/types/message/message.proto'))
2020

2121
const BitswapMessage = require('../../src/types/message')
2222
const makeBlock = require('../utils/make-block')

0 commit comments

Comments
 (0)