From fbb71f416aafc79036efd766277afc9e97d06502 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Thu, 7 Sep 2017 10:58:55 +0200 Subject: [PATCH] feat: replace protocol-buffers with protons Ref https://github.com/ipfs/js-ipfs/issues/991 --- .gitignore | 1 + package.json | 4 ++-- src/record.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e4c5b0e..8545c7e 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 \ No newline at end of file diff --git a/package.json b/package.json index ec64a8f..e3e0be0 100644 --- a/package.json +++ b/package.json @@ -52,11 +52,11 @@ "multihashes": "~0.4.9", "multihashing-async": "~0.4.6", "peer-id": "~0.10.0", - "protocol-buffers": "^3.2.1", + "protons": "^1.0.0", "safe-buffer": "^5.1.1" }, "contributors": [ "David Dias ", "Friedel Ziegelmayer " ] -} \ No newline at end of file +} diff --git a/src/record.js b/src/record.js index c6749ec..50ac36c 100644 --- a/src/record.js +++ b/src/record.js @@ -1,11 +1,11 @@ 'use strict' -const protobuf = require('protocol-buffers') +const protons = require('protons') const Buffer = require('safe-buffer').Buffer const assert = require('assert') const PeerId = require('peer-id') -const pb = protobuf(require('./record.proto')).Record +const pb = protons(require('./record.proto')).Record const utils = require('./utils') class Record {