@ipld/dag-cbor
Advanced tools
Comparing version 1.1.3 to 1.1.4
import cbor from 'borc' | ||
import isCircular from 'is-circular' | ||
import isCircular from '@ipld/is-circular' | ||
@@ -18,3 +18,3 @@ // https://github.com/ipfs/go-ipfs/issues/3570#issuecomment-273931692 | ||
function replaceCIDbyTAG (dagNode) { | ||
if (dagNode && typeof dagNode === 'object' && isCircular(dagNode)) { | ||
if (dagNode && typeof dagNode === 'object' && isCircular(CID, dagNode)) { | ||
throw new Error('The object passed has circular references') | ||
@@ -33,4 +33,5 @@ } | ||
if (CID.isCID(obj)) { | ||
return tagCID(obj) | ||
const cid = CID.asCID(obj) | ||
if (cid) { | ||
return tagCID(cid) | ||
} | ||
@@ -37,0 +38,0 @@ |
{ | ||
"name": "@ipld/dag-cbor", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "JS implementation of dag-cbor", | ||
@@ -34,4 +34,4 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"borc": "^2.1.2", | ||
"is-circular": "^1.0.2" | ||
"@ipld/is-circular": "^1.0.3", | ||
"borc": "^2.1.2" | ||
}, | ||
@@ -43,5 +43,5 @@ "devDependencies": { | ||
"mocha": "^8.0.1", | ||
"multiformats": "1.1.11", | ||
"multiformats": "2.0.1", | ||
"polendina": "^1.0.0", | ||
"rollup": "^2.18.0", | ||
"rollup": "^2.22.1", | ||
"standard": "^14.3.4" | ||
@@ -48,0 +48,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
820430
442
+ Added@ipld/is-circular@^1.0.3
+ Added@ipld/is-circular@1.0.3(transitive)
- Removedis-circular@^1.0.2
- Removedis-circular@1.0.2(transitive)