New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ipfs-unixfs-importer

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-unixfs-importer - npm Package Compare versions

Comparing version 0.44.1 to 0.45.0

18

CHANGELOG.md

@@ -0,1 +1,19 @@

<a name="0.45.0"></a>
# [0.45.0](https://github.com/ipfs/js-ipfs-unixfs-importer/compare/v0.44.1...v0.45.0) (2020-02-04)
### Bug Fixes
* only output unixfs things ([#49](https://github.com/ipfs/js-ipfs-unixfs-importer/issues/49)) ([8ecdcf2](https://github.com/ipfs/js-ipfs-unixfs-importer/commit/8ecdcf2))
### BREAKING CHANGES
* If your data is below the chunk size, and you have `rawLeaves` and
`reduceSingleLeafToSelf` set to true, you'll get a CID that resolves
to a bona fide UnixFS file back with metadata and all that good
stuff instead of a `dag-raw` node.
<a name="0.44.1"></a>

@@ -2,0 +20,0 @@ ## [0.44.1](https://github.com/ipfs/js-ipfs-unixfs-importer/compare/v0.44.0...v0.44.1) (2020-02-03)

5

package.json
{
"name": "ipfs-unixfs-importer",
"version": "0.44.1",
"version": "0.45.0",
"description": "JavaScript implementation of the UnixFs importer used by IPFS",

@@ -51,3 +51,2 @@ "leadMaintainer": "Alex Potsides <alex.potsides@protocol.ai>",

"it-last": "^1.0.0",
"multihashes": "^0.4.14",
"nyc": "^15.0.0",

@@ -74,2 +73,3 @@ "sinon": "^8.0.4"

"Alan Shaw <alan@tableflip.io>",
"Alex Potsides <alex@achingbrain.net>",
"Arpit Agarwal <atvanguard@users.noreply.github.com>",

@@ -91,3 +91,2 @@ "Bernard Mordan <bernard@tableflip.io>",

"Volker Mische <volker.mische@gmail.com>",
"achingbrain <alex@achingbrain.net>",
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>",

@@ -94,0 +93,0 @@ "jbenet <juan@benet.ai>",

@@ -12,2 +12,3 @@ 'use strict'

const parallelBatch = require('it-parallel-batch')
const mc = require('multicodec')

@@ -56,2 +57,19 @@ const dagBuilders = {

if (leaf.cid.codec === 'raw') {
// only one leaf node which is a buffer
const buffer = await ipld.get(leaf.cid)
leaf.unixfs = new UnixFS({
type: 'file',
mtime: file.mtime,
mode: file.mode,
data: buffer
})
const node = new DAGNode(leaf.unixfs.marshal())
leaf.cid = await ipld.put(node, mc.DAG_PB, options)
leaf.size = node.size
}
return {

@@ -58,0 +76,0 @@ cid: leaf.cid,

2

src/utils/persist.js
'use strict'
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const mc = require('multicodec')

@@ -5,0 +5,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc