Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix: last fixes for green (#719)
Browse files Browse the repository at this point in the history
* fix: do not use stream to value

* chore: update interface-ipfs-core

* fix: go-ipfs has not shipped withLocal yet

* chore: update deps
  • Loading branch information
daviddias authored Mar 16, 2018
1 parent 67a2c8d commit 658bad2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"eslint-plugin-react": "^7.7.0",
"go-ipfs-dep": "^0.4.13",
"gulp": "^3.9.1",
"hapi": "^17.2.2",
"interface-ipfs-core": "~0.56.0",
"hapi": "^17.2.3",
"interface-ipfs-core": "~0.56.5",
"ipfs": "~0.28.2",
"ipfsd-ctl": "~0.30.1",
"pre-commit": "^1.2.2",
Expand Down
27 changes: 10 additions & 17 deletions src/files/stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,17 @@

const promisify = require('promisify-es6')
const _ = require('lodash')
const streamToValue = require('../utils/stream-to-value')

const transform = function (res, callback) {
return streamToValue(res, (err, data) => {
if (err) {
return callback(err)
}

callback(null, {
type: data[0].Type,
blocks: data[0].Blocks,
size: data[0].Size,
hash: data[0].Hash,
cumulativeSize: data[0].CumulativeSize,
withLocality: data[0].WithLocality || false,
local: data[0].Local || null,
sizeLocal: data[0].SizeLocal || null
})
const transform = function (data, callback) {
callback(null, {
type: data.Type,
blocks: data.Blocks,
size: data.Size,
hash: data.Hash,
cumulativeSize: data.CumulativeSize,
withLocality: data.WithLocality || false,
local: data.Local || undefined,
sizeLocal: data.SizeLocal || undefined
})
}

Expand Down

0 comments on commit 658bad2

Please sign in to comment.