Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace protocol-buffers with protons #149

Merged
merged 1 commit into from
Sep 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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