Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

prepare for new aegir major version #2110

Merged
merged 17 commits into from
Jun 11, 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
36 changes: 0 additions & 36 deletions .npmignore

This file was deleted.

13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ stages:

node_js:
- '10'
- '12'

os:
- linux
- osx
- windows

script: npx nyc -s npm run test:node -- --bail
script: npx nyc -s npm run test:node --timeout=10000 -- --bail
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov

jobs:
Expand All @@ -43,5 +44,15 @@ jobs:
- npx aegir test -t browser -- --browsers FirefoxHeadless
- npx aegir test -t webworker -- --browsers FirefoxHeadless

- stage: test
name: electron-main
script:
- xvfb-run npx aegir test -t electron-main -- --bail

- stage: test
name: electron-renderer
script:
- xvfb-run npx aegir test -t electron-renderer -- --bail

notifications:
email: false
2 changes: 1 addition & 1 deletion examples/circuit-relaying/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"ipfs-pubsub-room": "^1.4.0"
},
"devDependencies": {
"aegir": "^18.0.3",
"aegir": "^19.0.3",
"ipfs-css": "~0.12.0",
"parcel-bundler": "^1.6.2",
"tachyons": "^4.9.1"
Expand Down
1 change: 1 addition & 0 deletions examples/circuit-relaying/src/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
'use strict'

const IPFS = require('ipfs')
Expand Down
1 change: 1 addition & 0 deletions examples/circuit-relaying/src/helpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
'use strict'

const Room = require('ipfs-pubsub-room')
Expand Down
100 changes: 48 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
"name": "ipfs",
"version": "0.36.3",
"description": "JavaScript implementation of the IPFS specification",
"keywords": [
"IPFS"
],
"homepage": "https://js.ipfs.io",
"bugs": "https://github.com./ipfs/js-ipfs/issues",
"license": "MIT",
"leadMaintainer": "Alan Shaw <[email protected]>",
"bin": {
"jsipfs": "src/cli/bin.js"
},
"files": [
"src",
"dist"
],
"main": "src/core/index.js",
"browser": {
"./src/core/components/init-assets.js": false,
Expand All @@ -23,23 +30,23 @@
"browser-all-ipld-formats": {
"./src/core/runtime/ipld-browser.js": "./src/core/runtime/ipld-browser-all.js"
},
"engines": {
"node": ">=10.0.0",
"npm": ">=6.0.0"
"bin": {
"jsipfs": "src/cli/bin.js"
},
"repository": "github:ipfs/js-ipfs",
"scripts": {
"lint": "aegir lint",
"build": "aegir build",
"test": "aegir test -t node -t browser -t webworker --no-cors --timeout=10000",
"test:node": "aegir test -t node --timeout=10000",
"test:browser": "aegir test -t browser --no-cors --timeout=10000",
"test:webworker": "aegir test -t webworker --no-cors --timeout=10000",
"test:node:core": "aegir test -t node -f test/core/**/*.js --timeout=10000",
"test:node:http": "aegir test -t node -f test/http-api/index.js --timeout=10000",
"test:node:gateway": "aegir test -t node -f test/gateway/index.js --timeout=10000",
"test:node:cli": "aegir test -t node -f test/cli/index.js --timeout=10000",
"test:node:interface": "aegir test -t node -f test/core/interface.spec.js --timeout=10000",
"test:bootstrapers": "IPFS_TEST=bootstrapers aegir test -t browser -f test/bootstrapers.js --timeout=10000",
"test": "aegir test",
"test:node": "aegir test -t node",
"test:browser": "aegir test -t browser",
"test:webworker": "aegir test -t webworker",
"test:node:core": "aegir test -t node -f test/core/**/*.js",
"test:node:http": "aegir test -t node -f test/http-api/index.js",
"test:node:gateway": "aegir test -t node -f test/gateway/index.js",
"test:node:cli": "aegir test -t node -f test/cli/index.js",
"test:node:interface": "aegir test -t node -f test/core/interface.spec.js",
"test:bootstrapers": "IPFS_TEST=bootstrapers aegir test -t browser -f test/bootstrapers.js",
"benchmark": "echo \"Error: no benchmarks yet\" && exit 1",
"benchmark:node": "echo \"Error: no benchmarks yet\" && exit 1",
"benchmark:node:core": "echo \"Error: no benchmarks yet\" && exit 1",
Expand All @@ -49,47 +56,12 @@
"release-minor": "aegir release --type minor -t node -t browser",
"release-major": "aegir release --type major -t node -t browser"
},
"repository": {
"type": "git",
"url": "git+https://github.com./ipfs/js-ipfs.git"
},
"keywords": [
"IPFS"
],
"license": "MIT",
"bugs": {
"url": "https://github.com./ipfs/js-ipfs/issues"
},
"homepage": "https://github.com./ipfs/js-ipfs#readme",
"pre-push": [
"lint"
],
"devDependencies": {
"aegir": "^18.1.0",
"base64url": "^3.0.1",
"chai": "^4.2.0",
"delay": "^4.1.0",
"detect-node": "^2.0.4",
"dir-compare": "^1.4.0",
"dirty-chai": "^2.0.1",
"execa": "^1.0.0",
"form-data": "^2.3.3",
"hat": "0.0.3",
"interface-ipfs-core": "~0.104.0",
"ipfsd-ctl": "~0.42.0",
"libp2p-websocket-star": "~0.10.2",
"ncp": "^2.0.0",
"qs": "^6.5.2",
"rimraf": "^2.6.2",
"sinon": "^7.3.1",
"stream-to-promise": "^2.2.0"
},
"dependencies": {
"@hapi/ammo": "^3.1.0",
"@hapi/hapi": "^18.3.1",
"@hapi/joi": "^15.0.1",
"async": "^2.6.1",
"async-iterator-all": "0.0.2",
"async-iterator-all": "^1.0.0",
"async-iterator-to-pull-stream": "^1.1.0",
"async-iterator-to-stream": "^1.1.0",
"base32.js": "~0.1.0",
Expand Down Expand Up @@ -200,10 +172,34 @@
"yargs": "^13.2.4",
"yargs-promise": "^1.1.0"
},
"devDependencies": {
"aegir": "^19.0.3",
"base64url": "^3.0.1",
"chai": "^4.2.0",
"delay": "^4.1.0",
"detect-node": "^2.0.4",
"dir-compare": "^1.4.0",
"dirty-chai": "^2.0.1",
"execa": "^1.0.0",
"form-data": "^2.3.3",
"hat": "0.0.3",
"interface-ipfs-core": "~0.104.0",
"ipfsd-ctl": "~0.42.0",
"libp2p-websocket-star": "~0.10.2",
"ncp": "^2.0.0",
"qs": "^6.5.2",
"rimraf": "^2.6.2",
"sinon": "^7.3.1",
"stream-to-promise": "^2.2.0"
},
"optionalDependencies": {
"prom-client": "^11.1.3",
"prometheus-gc-stats": "~0.6.0"
},
"engines": {
"node": ">=10.0.0",
"npm": ">=6.0.0"
},
"contributors": [
"0xflotus <[email protected]>",
"A_A <[email protected]>",
Expand Down
3 changes: 2 additions & 1 deletion src/cli/bin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#! /usr/bin/env node

/* eslint-disable no-console */
'use strict'

process.on('uncaughtException', (err) => {
Expand Down Expand Up @@ -31,7 +32,7 @@ const debug = require('debug')('ipfs:cli')
const parser = require('./parser')
const commandAlias = require('./command-alias')

async function main (args) {
function main (args) {
const oneWeek = 1000 * 60 * 60 * 24 * 7
updateNotifier({ pkg, updateCheckInterval: oneWeek }).notify()

Expand Down
2 changes: 0 additions & 2 deletions src/http/api/resources/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ exports.add = {
}
}

console.log('parseArgs', { default: def })

return { default: def }
},
async handler (request, h) {
Expand Down
2 changes: 1 addition & 1 deletion src/http/api/resources/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports.bitswap = require('./bitswap').stat

exports.repo = require('./repo').stat

exports.bw = async (request, h) => {
exports.bw = (request, h) => {
const { ipfs } = request.server.app
const options = {
peer: request.query.peer,
Expand Down
3 changes: 2 additions & 1 deletion test/cli/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ describe('daemon', () => {
})
})

it('should print version info', async () => {
it('should print version info', async function () {
this.timeout(100 * 1000)
await ipfs('init')

const out = await new Promise(resolve => {
Expand Down
3 changes: 2 additions & 1 deletion test/cli/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ describe('object', () => runOnAndOff((thing) => {
})
})

it('should get and print CIDs encoded in specified base', () => {
it('should get and print CIDs encoded in specified base', function () {
this.timeout(15 * 1000)
return ipfs(`add ${path.resolve(path.join(__dirname, '..'))}/fixtures/planets -r --cid-version=1`)
.then(out => {
const lines = out.trim().split('\n')
Expand Down
2 changes: 2 additions & 0 deletions test/core/create-node.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ describe('create node', function () {
})

ipfs.on('ready', () => {
// eslint-disable-next-line no-console
expect(console.log.called).to.be.false()
// eslint-disable-next-line no-console
console.log.restore()
ipfs.stop(done)
})
Expand Down
7 changes: 3 additions & 4 deletions test/core/dag.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ chai.use(dirtyChai)
const IPFSFactory = require('ipfsd-ctl')
const IPFS = require('../../src/core')

describe('dag', () => {
describe('dag', function () {
this.timeout(10 * 1000)
let ipfsd, ipfs

before(function (done) {
this.timeout(20 * 1000)

const factory = IPFSFactory.create({ type: 'proc' })

factory.spawn({
Expand All @@ -30,7 +29,7 @@ describe('dag', () => {
})
})

after((done) => {
after(function (done) {
if (ipfsd) {
ipfsd.stop(done)
} else {
Expand Down
5 changes: 2 additions & 3 deletions test/core/files.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ const pull = require('pull-stream')
const IPFSFactory = require('ipfsd-ctl')
const IPFS = require('../../src/core')

describe('files', () => {
describe('files', function () {
this.timeout(10 * 1000)
let ipfsd, ipfs

before(function (done) {
this.timeout(20 * 1000)

const factory = IPFSFactory.create({ type: 'proc' })

factory.spawn({
Expand Down
3 changes: 3 additions & 0 deletions test/core/libp2p.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('libp2p customization', function () {
},
_peerInfo: peerInfo,
_peerBook: peerBook,
// eslint-disable-next-line no-console
_print: console.log,
_options: {
libp2p: (opts) => {
Expand Down Expand Up @@ -123,6 +124,7 @@ describe('libp2p customization', function () {
},
_peerInfo: peerInfo,
_peerBook: peerBook,
// eslint-disable-next-line no-console
_print: console.log
}

Expand Down Expand Up @@ -165,6 +167,7 @@ describe('libp2p customization', function () {
},
_peerInfo: peerInfo,
_peerBook: peerBook,
// eslint-disable-next-line no-console
_print: console.log,
_options: {
config: {
Expand Down
5 changes: 2 additions & 3 deletions test/core/object.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ const auto = require('async/auto')
const waterfall = require('async/waterfall')
const IPFS = require('../../src/core')

describe('object', () => {
describe('object', function () {
this.timeout(10 * 1000)
let ipfsd, ipfs

before(function (done) {
this.timeout(50 * 1000)

const factory = IPFSFactory.create({ type: 'proc' })

factory.spawn({
Expand Down
5 changes: 2 additions & 3 deletions test/core/pin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ chai.use(dirtyChai)
const IPFSFactory = require('ipfsd-ctl')
const IPFS = require('../../src/core')

describe('pin', () => {
describe('pin', function () {
this.timeout(10 * 1000)
let ipfsd, ipfs

before(function (done) {
this.timeout(20 * 1000)

const factory = IPFSFactory.create({ type: 'proc' })

factory.spawn({
Expand Down
Loading