From c305c36b2620dfd9e2d46a9f4e2dd0c34e3f65bb Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Wed, 18 Mar 2020 16:33:29 +0000 Subject: [PATCH] fix: add buffer (#120) related to this https://github.com/ipfs/js-ipfs/issues/2924 --- package.json | 5 +++-- src/index.js | 1 + test/peer-id.spec.js | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6591a41..b98fef0 100644 --- a/package.json +++ b/package.json @@ -45,11 +45,12 @@ "dirty-chai": "^2.0.1" }, "dependencies": { + "buffer": "^5.5.0", "cids": "^0.7.3", "class-is": "^1.1.0", - "libp2p-crypto": "~0.17.2", + "libp2p-crypto": "~0.17.3", "multihashes": "~0.4.15", - "protons": "^1.0.1" + "protons": "^1.0.2" }, "repository": { "type": "git", diff --git a/src/index.js b/src/index.js index d7257b2..c252be7 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,7 @@ 'use strict' +const { Buffer } = require('buffer') const mh = require('multihashes') const CID = require('cids') const cryptoKeys = require('libp2p-crypto/src/keys') diff --git a/test/peer-id.spec.js b/test/peer-id.spec.js index da55c45..382fb76 100644 --- a/test/peer-id.spec.js +++ b/test/peer-id.spec.js @@ -2,6 +2,7 @@ /* eslint-env mocha */ 'use strict' +const { Buffer } = require('buffer') const chai = require('chai') const dirtyChai = require('dirty-chai') chai.use(dirtyChai)