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

Commit 47518c8

Browse files
committed
feat: aegir-next
1 parent 06d2e0a commit 47518c8

34 files changed

+273
-239
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+
}

.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.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
"http": "stream-http"
1111
},
1212
"scripts": {
13-
"test": "gulp test",
14-
"test:node": "gulp test:node",
15-
"test:browser": "gulp test:browser",
16-
"lint": "aegir-lint",
17-
"build": "gulp build",
18-
"release": "gulp release",
19-
"release-minor": "gulp release --type minor",
20-
"release-major": "gulp release --type major",
21-
"coverage": "gulp coverage",
22-
"coverage-publish": "aegir-coverage publish"
13+
"test": "aegir test --no-parallel",
14+
"test:node": "aegir test --target node --no-parallel",
15+
"test:browser": "aegir test --target browser",
16+
"lint": "aegir lint",
17+
"build": "aegir build",
18+
"release": "aegir release --no-parallel",
19+
"release-minor": "aegir release --type minor --no-parallel",
20+
"release-major": "aegir release --type major --no-parallel",
21+
"coverage": "aegir coverage --no-parallel --timeout 100000",
22+
"coverage-publish": "aegir coverage --provider coveralls --no-parallel --timeout 100000"
2323
},
2424
"dependencies": {
2525
"async": "^2.5.0",
@@ -52,15 +52,15 @@
5252
"tar-stream": "^1.5.4"
5353
},
5454
"engines": {
55-
"node": ">=4.0.0",
55+
"node": ">=6.0.0",
5656
"npm": ">=3.0.0"
5757
},
5858
"repository": {
5959
"type": "git",
6060
"url": "https://github.com/ipfs/js-ipfs-api"
6161
},
6262
"devDependencies": {
63-
"aegir": "^11.0.2",
63+
"aegir": "^12.0.2",
6464
"chai": "^4.1.2",
6565
"dirty-chai": "^2.0.1",
6666
"eslint-plugin-react": "^7.3.0",
@@ -136,4 +136,4 @@
136136
"url": "https://github.com/ipfs/js-ipfs-api/issues"
137137
},
138138
"homepage": "https://github.com/ipfs/js-ipfs-api"
139-
}
139+
}

0 commit comments

Comments
 (0)