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

Update aegir to the latest version 🚀 #1046

Merged
merged 3 commits into from
Aug 28, 2019
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@
"through2": "^3.0.1"
},
"devDependencies": {
"aegir": "^19.0.3",
"aegir": "^20.0.0",
"browser-process-platform": "~0.1.1",
"chai": "^4.2.0",
"cross-env": "^5.2.0",
"dirty-chai": "^2.0.1",
"go-ipfs-dep": "~0.4.21",
"go-ipfs-dep": "0.4.21",
"interface-ipfs-core": "^0.109.0",
"ipfsd-ctl": "~0.43.0",
"nock": "^10.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/dag/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ module.exports = (send) => {
}, cb)
},
(resolved, cb) => {
block(send).get(new CID(resolved['Cid']['/']), (err, ipfsBlock) => {
cb(err, ipfsBlock, resolved['RemPath'])
block(send).get(new CID(resolved.Cid['/']), (err, ipfsBlock) => {
cb(err, ipfsBlock, resolved.RemPath)
})
},
(ipfsBlock, path, cb) => {
Expand Down
4 changes: 2 additions & 2 deletions src/dag/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ module.exports = (send) => {
if (err) {
return callback(err)
}
if (result['Cid']) {
return callback(null, new CID(result['Cid']['/']))
if (result.Cid) {
return callback(null, new CID(result.Cid['/']))
} else {
return callback(result)
}
Expand Down
2 changes: 1 addition & 1 deletion src/dht/findprovs.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = (send) => {
res = [res]
}

let responses = []
const responses = []
res.forEach(result => {
// 4 = Provider
if (result.Type !== 4) return
Expand Down
3 changes: 1 addition & 2 deletions src/dht/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ module.exports = (send) => {
if (res.Type === 5) {
done(null, res.Extra)
} else {
let error = new Error('key was not found (type 6)')
done(error)
done(new Error('key was not found (type 6)'))
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Multipart extends Transform {

this.push(leading)

let content = file.content || Buffer.alloc(0)
const content = file.content || Buffer.alloc(0)

if (Buffer.isBuffer(content)) {
this.push(content)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/prepare-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function contentToStream (content) {
}

function prepareFile (file, opts) {
let files = [].concat(file)
const files = [].concat(file)

return flatmap(files, (file) => {
// add from fs with file path
Expand Down
2 changes: 1 addition & 1 deletion src/utils/pubsub-message-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PubsubMessageStream extends TransformStream {
}

static from (inputStream, callback) {
let outputStream = inputStream.pipe(new PubsubMessageStream())
const outputStream = inputStream.pipe(new PubsubMessageStream())
inputStream.on('end', () => outputStream.emit('end'))
callback(null, outputStream)
}
Expand Down
5 changes: 2 additions & 3 deletions src/utils/send-files-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function headers (file, i) {

module.exports = (send, path) => {
return (options) => {
let request
let ended = false
let writing = false

Expand Down Expand Up @@ -84,7 +83,7 @@ module.exports = (send, path) => {
qs.hash = propOrProp(options, 'hash', 'hashAlg')

if (options.strategy === 'trickle' || options.trickle) {
qs['trickle'] = 'true'
qs.trickle = 'true'
}

const args = {
Expand All @@ -102,7 +101,7 @@ module.exports = (send, path) => {
retStream.emit('error', err)
})

request = send(args, (err, response) => {
const request = send(args, (err, response) => {
if (err) {
return retStream.emit('error', err)
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils/tar-stream-to-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class ObjectsStreams extends ReadableStream {
{ path: 'string', content: Stream<Readable> }
*/
const TarStreamToObjects = (inputStream, callback) => {
let outputStream = new ObjectsStreams()
let extractStream = tar.extract()
const outputStream = new ObjectsStreams()
const extractStream = tar.extract()

extractStream
.on('entry', (header, stream, next) => {
Expand Down
6 changes: 3 additions & 3 deletions test/files-mfs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ describe('.files (the MFS API part)', function () {
})

it('.add with Buffer module', (done) => {
let Buffer = require('buffer').Buffer
const { Buffer } = require('buffer')

let expectedBufferMultihash = 'QmWfVY9y3xjsixTgbd9AorQxH7VtMpzfx2HaWtsoUYecaX'
let file = Buffer.from('hello')
const expectedBufferMultihash = 'QmWfVY9y3xjsixTgbd9AorQxH7VtMpzfx2HaWtsoUYecaX'
const file = Buffer.from('hello')

ipfs.add(file, (err, res) => {
expect(err).to.not.exist()
Expand Down
2 changes: 1 addition & 1 deletion test/log.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('.log', function () {
})

it('.log.tail', (done) => {
let i = setInterval(() => {
const i = setInterval(() => {
ipfs.add(Buffer.from('just adding some data to generate logs'))
}, 1000)

Expand Down