@ipld/codec-interface
Advanced tools
Comparing version 1.0.13 to 1.0.14
{ | ||
"name": "@ipld/codec-interface", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "Codec interface for IPLD.", | ||
@@ -17,8 +17,9 @@ "main": "index.js", | ||
"devDependencies": { | ||
"aegir": "^20.5.1", | ||
"hundreds": "0.0.2", | ||
"tsame": "^2.0.1" | ||
"aegir": "^31.0.1", | ||
"assert": "^2.0.0", | ||
"buffer": "^6.0.3", | ||
"hundreds": "0.0.9" | ||
}, | ||
"dependencies": { | ||
"cids": "~0.7.2" | ||
"cids": "^1.1.6" | ||
}, | ||
@@ -25,0 +26,0 @@ "repository": { |
@@ -6,5 +6,5 @@ 'use strict' | ||
const assert = require('assert') | ||
const tsame = require('tsame') | ||
const { Buffer } = require('buffer') | ||
const { expect } = require('aegir/utils/chai') | ||
const same = (...args) => assert.ok(tsame(...args)) | ||
const test = it | ||
@@ -42,3 +42,3 @@ | ||
const obj = codec.decode(buffer) | ||
same(obj, { hello: 'world' }) | ||
expect(obj).to.deep.equal({ hello: 'world' }) | ||
}) | ||
@@ -48,3 +48,3 @@ | ||
const codec = create() | ||
same(codec.codec, 'terrible-dag') | ||
expect(codec).to.have.property('codec', 'terrible-dag') | ||
let threw = false | ||
@@ -54,3 +54,3 @@ try { | ||
} catch (e) { | ||
same(e.message, 'Read-only property') | ||
expect(e).to.have.property('message', 'Read-only property') | ||
threw = true | ||
@@ -57,0 +57,0 @@ } |
@@ -6,5 +6,4 @@ 'use strict' | ||
const assert = require('assert') | ||
const tsame = require('tsame') | ||
const { expect } = require('aegir/utils/chai') | ||
const same = (...args) => assert.ok(tsame(...args)) | ||
const test = it | ||
@@ -31,5 +30,5 @@ | ||
const one = reader.get('/a/1').value | ||
same(one, 1) | ||
expect(one).to.equal(1) | ||
const incomplete = reader.get('l/one/two') | ||
same(incomplete.remaining, 'one/two') | ||
expect(incomplete).to.have.property('remaining', 'one/two') | ||
assert.ok(CID.isCID(incomplete.value)) | ||
@@ -41,6 +40,6 @@ }) | ||
let one = reader.get('/a/1').value | ||
same(one, 1) | ||
expect(one).to.equal(1) | ||
reader = mock.reader({ source: () => null, decode: () => fixture }) | ||
one = reader.get('/a/1').value | ||
same(one, 1) | ||
expect(one).to.equal(1) | ||
}) | ||
@@ -52,3 +51,3 @@ | ||
const keys = new Set(links.map(a => a[0])) | ||
same(keys, new Set(['a/2', 'a/4/l', 'l', 'o/l'])) | ||
expect(keys).to.deep.equal(new Set(['a/2', 'a/4/l', 'l', 'o/l'])) | ||
links.forEach(l => assert.ok(CID.isCID(l[1]))) | ||
@@ -60,3 +59,3 @@ }) | ||
const tree = Array.from(reader.tree()) | ||
same(new Set(tree), new Set([ | ||
expect(new Set(tree)).to.deep.equal(new Set([ | ||
'a', | ||
@@ -85,5 +84,5 @@ 'a/0', | ||
threw = true | ||
same(e.message, 'Object has no property notfound') | ||
expect(e).to.have.property('message', 'Object has no property notfound') | ||
} | ||
assert(threw) | ||
}) |
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
9628
4
6
222
+ Added@multiformats/base-x@4.0.1(transitive)
+ Addedcids@1.1.9(transitive)
+ Addedmultibase@4.0.6(transitive)
+ Addedmulticodec@3.2.1(transitive)
+ Addedmultiformats@9.9.0(transitive)
+ Addedmultihashes@4.0.3(transitive)
+ Addeduint8arrays@3.1.1(transitive)
+ Addedvarint@6.0.0(transitive)
- Removedbase-x@3.0.10(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedcids@0.7.5(transitive)
- Removedclass-is@1.1.0(transitive)
- Removedieee754@1.2.1(transitive)
- Removedmultibase@0.6.10.7.0(transitive)
- Removedmulticodec@1.0.4(transitive)
- Removedmultihashes@0.4.21(transitive)
- Removedsafe-buffer@5.2.1(transitive)
Updatedcids@^1.1.6