From 15307a164e64d52d8fd7060bfdc73f398060af93 Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Mon, 27 Apr 2020 11:50:07 +0100 Subject: [PATCH] fix: add buffer --- package.json | 1 + src/index.js | 1 + test/basics.js | 1 + test/ipld-all.js | 1 + test/ipld-bitcoin.js | 1 + test/ipld-dag-pb.js | 1 + test/ipld-git.js | 1 + 7 files changed, 7 insertions(+) diff --git a/package.json b/package.json index d8cb8d2..a2e7edf 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "rlp": "^2.2.3" }, "dependencies": { + "buffer": "^5.6.0", "cids": "~0.8.0", "ipld-block": "~0.9.1", "ipld-dag-cbor": "~0.15.0", diff --git a/src/index.js b/src/index.js index cb6c0d4..1fcb1c5 100644 --- a/src/index.js +++ b/src/index.js @@ -8,6 +8,7 @@ const ipldDagPb = require('ipld-dag-pb') const ipldRaw = require('ipld-raw') const multicodec = require('multicodec') const typical = require('typical') +const { Buffer } = require('buffer') const { extendIterator } = require('./util') class IPLDResolver { diff --git a/test/basics.js b/test/basics.js index e27616d..d61234f 100644 --- a/test/basics.js +++ b/test/basics.js @@ -13,6 +13,7 @@ const multihash = require('multihashes') const multicodec = require('multicodec') const inMemory = require('ipld-in-memory') const AbortController = require('abort-controller') +const { Buffer } = require('buffer') const IPLDResolver = require('../src') diff --git a/test/ipld-all.js b/test/ipld-all.js index b5cd80a..c2616b4 100644 --- a/test/ipld-all.js +++ b/test/ipld-all.js @@ -17,6 +17,7 @@ const dagPB = require('ipld-dag-pb') const CID = require('cids') const inMemory = require('ipld-in-memory') const multicodec = require('multicodec') +const { Buffer } = require('buffer') const IPLDResolver = require('../src') diff --git a/test/ipld-bitcoin.js b/test/ipld-bitcoin.js index bd3328e..92df97a 100644 --- a/test/ipld-bitcoin.js +++ b/test/ipld-bitcoin.js @@ -10,6 +10,7 @@ const ipldBitcoin = require('ipld-bitcoin') const BitcoinBlock = require('bitcoinjs-lib').Block const multihash = require('multihashes') const multicodec = require('multicodec') +const { Buffer } = require('buffer') const IPLDResolver = require('../src') diff --git a/test/ipld-dag-pb.js b/test/ipld-dag-pb.js index 2cbf6e8..8e4e694 100644 --- a/test/ipld-dag-pb.js +++ b/test/ipld-dag-pb.js @@ -11,6 +11,7 @@ const BlockService = require('ipfs-block-service') const dagPB = require('ipld-dag-pb') const multihash = require('multihashes') const multicodec = require('multicodec') +const { Buffer } = require('buffer') const IPLDResolver = require('../src') module.exports = (repo) => { diff --git a/test/ipld-git.js b/test/ipld-git.js index 0947dac..064a4eb 100644 --- a/test/ipld-git.js +++ b/test/ipld-git.js @@ -9,6 +9,7 @@ const BlockService = require('ipfs-block-service') const ipldGit = require('ipld-git') const multihash = require('multihashes') const multicodec = require('multicodec') +const { Buffer } = require('buffer') const IPLDResolver = require('../src')