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

Commit cfc5cfc

Browse files
committed
feat: aegir-next
1 parent 688d918 commit cfc5cfc

35 files changed

+280
-243
lines changed

.aegir.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict'
22

3+
const factory = require('./test/ipfs-factory/tasks')
4+
35
module.exports = {
46
karma: {
57
files: [{
@@ -8,5 +10,9 @@ module.exports = {
810
served: true,
911
included: false
1012
}]
13+
},
14+
hooks: {
15+
pre: factory.start,
16+
post: factory.stop
1117
}
12-
}
18+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
package-lock.json
2+
yarn.lock
3+
14
**/node_modules
25
**/*.log
36
test/setup/tmp-disposable-nodes-addrs.json

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ matrix:
1313
script:
1414
- npm run lint
1515
- npm run test
16-
- npm run coverage
17-
- make test
1816

1917
before_script:
2018
- export DISPLAY=:99.0

circle.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ machine:
22
node:
33
version: stable
44

5+
test:
6+
post:
7+
- npm run coverage -- --upload
8+
59
dependencies:
610
pre:
711
- google-chrome --version

examples/bundle-browserify/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var ipfs = IPFS()
66

77
function store () {
88
var toStore = document.getElementById('source').value
9-
ipfs.add(new Buffer(toStore), function (err, res) {
9+
ipfs.add(Buffer.from(toStore), function (err, res) {
1010
if (err || !res) {
1111
return console.error('ipfs add error', err, res)
1212
}

examples/bundle-webpack/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class App extends React.Component {
2525
protocol_version: res.protocolVersion
2626
})
2727
})
28-
ipfs.add([new Buffer(stringToUse)], (err, res) => {
28+
ipfs.add([Buffer.from(stringToUse)], (err, res) => {
2929
if (err) throw err
3030
const hash = res[0].hash
3131
this.setState({added_file_hash: hash})

examples/files-api/files-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
var ipfs = require('../../src')('localhost', 5001)
3+
const ipfs = require('../../src')('localhost', 5001)
44

55
ipfs.files.ls('/folder1', function (err, res) {
66
if (err) {

examples/name-api/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const addAndPublish = (e) => {
5252
e.preventDefault()
5353

5454
let input = e.target.elements['text']
55-
let buffer = new Buffer(input.value)
55+
let buffer = Buffer.from(input.value)
5656

5757
showStatus('adding to IPFS...', COLORS.active)
5858

examples/upload-file-via-browser/src/App.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ class App extends React.Component {
3030
let ipfsId
3131
const buffer = Buffer.from(reader.result)
3232
this.ipfsApi.add(buffer)
33-
.then((response) => {
34-
console.log(response)
35-
ipfsId = response[0].hash
36-
console.log(ipfsId)
37-
this.setState({added_file_hash: ipfsId})
38-
}).catch((err) => {
39-
console.error(err)
40-
})
33+
.then((response) => {
34+
console.log(response)
35+
ipfsId = response[0].hash
36+
console.log(ipfsId)
37+
this.setState({added_file_hash: ipfsId})
38+
}).catch((err) => {
39+
console.error(err)
40+
})
4141
}
4242

4343
arrayBufferToString (arrayBuffer) {
@@ -51,11 +51,11 @@ class App extends React.Component {
5151
render () {
5252
return (
5353
<div>
54-
<form id="captureMedia" onSubmit={this.handleSubmit}>
55-
<input type="file" onChange={this.captureFile} />
54+
<form id='captureMedia' onSubmit={this.handleSubmit}>
55+
<input type='file' onChange={this.captureFile} />
5656
</form>
5757
<div>
58-
<a target="_blank"
58+
<a target='_blank'
5959
href={'https://ipfs.io/ipfs/' + this.state.added_file_hash}>
6060
{this.state.added_file_hash}
6161
</a>

gulpfile.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)