From 4a6f7592411ef7a1bc127097a29ee12b5f41b686 Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Thu, 23 Apr 2020 15:44:56 +0100 Subject: [PATCH] fix: remove node globals Related to https://github.com/ipfs/js-ipfs/issues/2924 --- package.json | 9 +++++---- src/index.js | 1 + test/index.spec.js | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6191b95..80b631d 100644 --- a/package.json +++ b/package.json @@ -32,22 +32,23 @@ }, "homepage": "https://github.com/ipfs/js-datastore-pubsub#readme", "dependencies": { + "buffer": "^5.6.0", "debug": "^4.1.1", "err-code": "^2.0.0", "interface-datastore": "~0.8.0", - "multibase": "~0.6.0" + "multibase": "~0.7.0" }, "devDependencies": { - "aegir": "^20.5.0", + "aegir": "^21.9.0", "chai": "^4.2.0", "detect-node": "^2.0.4", "dirty-chai": "^2.0.1", "it-pair": "^1.0.0", - "libp2p-gossipsub": "0.2.0", + "libp2p-gossipsub": "hugomrdias/gossipsub-js#fix/add-buffer", "libp2p-record": "~0.7.0", "p-wait-for": "^3.1.0", "peer-id": "^0.13.6", - "peer-info": "^0.16.2", + "peer-info": "^0.17.5", "sinon": "^7.4.1" }, "contributors": [ diff --git a/src/index.js b/src/index.js index c7799f9..ffa6ebc 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ 'use strict' +const { Buffer } = require('buffer') const { Key } = require('interface-datastore') const { encodeBase32, keyToTopic, topicToKey } = require('./utils') diff --git a/test/index.spec.js b/test/index.spec.js index 93c07ee..98fcdfa 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -1,6 +1,7 @@ /* eslint-env mocha */ 'use strict' +const { Buffer } = require('buffer') const chai = require('chai') const dirtyChai = require('dirty-chai') const expect = chai.expect