From ec213c4864296385d18e45c8cadb663e2cccab83 Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Wed, 25 Mar 2020 15:57:38 +0000 Subject: [PATCH 1/2] fix: remove node globals add buffer update borc --- package.json | 3 ++- src/resolver.js | 2 +- src/util.js | 1 + test/util.spec.js | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ff79ec2..38c0077 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ }, "homepage": "https://github.com/ipld/js-ipld-dag-cbor", "dependencies": { - "borc": "^2.1.0", + "borc": "hugomrdias/borc#fix/remove-node-globals", + "buffer": "^5.5.0", "cids": "~0.8.0", "is-circular": "^1.0.2", "multicodec": "^1.0.0", diff --git a/src/resolver.js b/src/resolver.js index 8190e62..ab5e458 100644 --- a/src/resolver.js +++ b/src/resolver.js @@ -1,7 +1,7 @@ 'use strict' const CID = require('cids') - +const { Buffer } = require('buffer') const util = require('./util') /** diff --git a/src/util.js b/src/util.js index af55c83..61edf8d 100644 --- a/src/util.js +++ b/src/util.js @@ -1,6 +1,7 @@ 'use strict' const cbor = require('borc') +const { Buffer } = require('buffer') const multicodec = require('multicodec') const multihashing = require('multihashing-async') const CID = require('cids') diff --git a/test/util.spec.js b/test/util.spec.js index bca8b14..8e0cf21 100644 --- a/test/util.spec.js +++ b/test/util.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 From de2bce3cf4d8e7bdcd8367cce11b97bfc24d0bef Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Thu, 26 Mar 2020 19:32:42 +0000 Subject: [PATCH 2/2] chore: bump borc --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 38c0077..6ed74f6 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ }, "homepage": "https://github.com/ipld/js-ipld-dag-cbor", "dependencies": { - "borc": "hugomrdias/borc#fix/remove-node-globals", + "borc": "^2.1.2", "buffer": "^5.5.0", "cids": "~0.8.0", "is-circular": "^1.0.2",