From 6b816cc1ec2963858bad524fb1df28c14e8bab76 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Fri, 17 Sep 2021 11:17:09 +0200 Subject: [PATCH 1/3] fix: remove instanceof (#11) `instanceOf` is unreliable with esm/cjs dual publised modules. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 1fce613..7fac33e 100644 --- a/src/index.js +++ b/src/index.js @@ -18,7 +18,7 @@ import { BaseBlockstore } from 'blockstore-core/base' function cidToKey (cid) { const c = CID.asCID(cid) - if (!(c instanceof CID)) { + if (!c) { throw errcode(new Error('Not a valid cid'), 'ERR_INVALID_CID') } From 804eb9c88a62fb452337d6922be461d9e0dedf80 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 17 Sep 2021 11:31:14 +0200 Subject: [PATCH 2/3] chore: update contributors --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ac2c505..fb46d00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-datastore-adapter", - "version": "2.0.1", + "version": "2.0.2", "description": "datastore interface", "leadMaintainer": "Alex Potsides ", "main": "src/index.js", From 6e54ba3d3c002bfd8a02ff08f4726cafbe48751a Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 17 Sep 2021 11:31:14 +0200 Subject: [PATCH 3/3] chore: release version v2.0.2 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b91f2d..10c89f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [2.0.2](https://github.com/ipfs/js-blockstore-datastore-adapter/compare/v2.0.1...v2.0.2) (2021-09-17) + + +### Bug Fixes + +* remove instanceof ([#11](https://github.com/ipfs/js-blockstore-datastore-adapter/issues/11)) ([6b816cc](https://github.com/ipfs/js-blockstore-datastore-adapter/commit/6b816cc1ec2963858bad524fb1df28c14e8bab76)) + + + ## [2.0.1](https://github.com/ipfs/js-blockstore-datastore-adapter/compare/v2.0.0...v2.0.1) (2021-09-09)