Skip to content

Commit

Permalink
feat: replace protocol-buffers with protons (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire authored and daviddias committed Sep 7, 2017
1 parent c2446ec commit ca8fa72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"lodash.uniqwith": "^4.5.0",
"lodash.values": "^4.3.0",
"multihashing-async": "~0.4.6",
"protocol-buffers": "^3.2.1",
"protons": "^1.0.0",
"pull-defer": "^0.2.2",
"pull-length-prefixed": "^1.3.0",
"pull-pushable": "^2.1.1",
Expand Down
4 changes: 2 additions & 2 deletions src/types/message/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const protobuf = require('protocol-buffers')
const protons = require('protons')
const Block = require('ipfs-block')
const isEqualWith = require('lodash.isequalwith')
const assert = require('assert')
Expand All @@ -10,7 +10,7 @@ const codecName = require('multicodec/src/name-table')
const vd = require('varint-decoder')
const multihashing = require('multihashing-async')

const pbm = protobuf(require('./message.proto'))
const pbm = protons(require('./message.proto'))
const Entry = require('./entry')

class BitswapMessage {
Expand Down
4 changes: 2 additions & 2 deletions test/types/message.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const chai = require('chai')
chai.use(require('dirty-chai'))
const expect = chai.expect
const protobuf = require('protocol-buffers')
const protons = require('protons')
const map = require('async/map')
const CID = require('cids')
const isNode = require('detect-node')
Expand All @@ -16,7 +16,7 @@ const testDataPath = (isNode ? '../' : '') + 'fixtures/serialized-from-go'
const rawMessageFullWantlist = loadFixture(__dirname, testDataPath + '/bitswap110-message-full-wantlist')
const rawMessageOneBlock = loadFixture(__dirname, testDataPath + '/bitswap110-message-one-block')

const pbm = protobuf(require('../../src/types/message/message.proto'))
const pbm = protons(require('../../src/types/message/message.proto'))

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

0 comments on commit ca8fa72

Please sign in to comment.