Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

fix: replace node buffers with uint8arrays #49

Merged
merged 2 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@
},
"homepage": "https://github.com/ipld/js-ipld-raw#readme",
"dependencies": {
"cids": "^0.8.1",
"multicodec": "^1.0.1",
"multihashing-async": "^0.8.1"
"cids": "^1.0.0",
"multicodec": "^2.0.0",
"multihashing-async": "^2.0.0"
},
"devDependencies": {
"aegir": "^22.0.0"
"aegir": "^25.0.0",
"uint8arrays": "^1.0.0"
}
}
5 changes: 3 additions & 2 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ const ipldRaw = require('../src/index')
const resolver = ipldRaw.resolver
const multihash = require('multihashing-async').multihash
const multicodec = require('multicodec')
const uint8ArrayFromString = require('uint8arrays/from-string')

describe('raw codec', () => {
const testData = Buffer.from('test data')
const testData = uint8ArrayFromString('test data')
const testBlob = ipldRaw.util.serialize(testData)

it('multicodec is raw', () => {
Expand Down Expand Up @@ -39,7 +40,7 @@ describe('raw codec', () => {
})

describe('raw util', () => {
const rawData = Buffer.from('some raw data')
const rawData = uint8ArrayFromString('some raw data')

it('serialize is noop', () => {
const result = ipldRaw.util.serialize(rawData)
Expand Down