diff --git a/.travis.yml b/.travis.yml index 0be5b0ef5..1368eb6eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ stages: node_js: - '10' - - '8' + - '12' os: - linux @@ -17,10 +17,16 @@ script: npx nyc -s npm run test:node -- --bail after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov jobs: + allow_failures: + - name: electron-renderer + + fast_finish: true + include: - os: windows filter_secrets: false cache: false + - stage: check script: @@ -39,6 +45,16 @@ jobs: addons: firefox: latest script: npx aegir test -t browser -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 diff --git a/package.json b/package.json index 50f63ae52..4e3d34d05 100644 --- a/package.json +++ b/package.json @@ -2,17 +2,24 @@ "name": "ipfs-http-client", "version": "32.0.1", "description": "A client library for the IPFS HTTP API", + "keywords": [ + "ipfs" + ], + "homepage": "https://github.com/ipfs/js-ipfs-http-client", + "bugs": "https://github.com/ipfs/js-ipfs-http-client/issues", + "license": "MIT", "leadMaintainer": "Alan Shaw ", + "files": [ + "src", + "dist" + ], "main": "src/index.js", "browser": { "glob": false, "fs": false, "stream": "readable-stream" }, - "files": [ - "src", - "dist" - ], + "repository": "github:ipfs/js-ipfs-http-client", "scripts": { "test": "aegir test", "test:node": "aegir test -t node", @@ -40,6 +47,7 @@ "flatmap": "0.0.3", "glob": "^7.1.3", "ipfs-block": "~0.8.1", + "ipfs-utils": "~0.0.3", "ipld-dag-cbor": "~0.15.0", "ipld-dag-pb": "~0.17.3", "is-ipfs": "~0.6.1", @@ -47,7 +55,6 @@ "is-stream": "^2.0.0", "iso-stream-http": "~0.1.2", "iso-url": "~0.4.6", - "ipfs-utils": "~0.0.3", "just-kebab-case": "^1.1.0", "just-map-keys": "^1.1.0", "kind-of": "^6.0.2", @@ -71,16 +78,8 @@ "tar-stream": "^2.0.1", "through2": "^3.0.1" }, - "engines": { - "node": ">=8.3.0", - "npm": ">=3.0.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/ipfs/js-ipfs-http-client" - }, "devDependencies": { - "aegir": "^18.2.2", + "aegir": "^19.0.3", "browser-process-platform": "~0.1.1", "chai": "^4.2.0", "cross-env": "^5.2.0", @@ -91,9 +90,10 @@ "nock": "^10.0.2", "stream-equal": "^1.1.1" }, - "keywords": [ - "ipfs" - ], + "engines": { + "node": ">=8.3.0", + "npm": ">=3.0.0" + }, "contributors": [ "Alan Shaw ", "Alan Shaw ", @@ -184,10 +184,5 @@ "victorbjelkholm ", "Łukasz Magiera ", "Łukasz Magiera " - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/ipfs/js-ipfs-http-client/issues" - }, - "homepage": "https://github.com/ipfs/js-ipfs-http-client" + ] } diff --git a/test/constructor.spec.js b/test/constructor.spec.js index af77d18e1..c138b7fb0 100644 --- a/test/constructor.spec.js +++ b/test/constructor.spec.js @@ -143,8 +143,8 @@ function clientWorks (client, done) { function expectConfig (ipfs, { host, port, protocol, apiPath }) { const conf = ipfs.getEndpointConfig() - expect(conf.host).to.equal(host || 'localhost') - expect(conf.port).to.equal(port || '5001') + expect(conf.host).to.be.oneOf([host, 'localhost', '']) + expect(conf.port).to.be.oneOf([port, '5001', 80]) expect(conf.protocol).to.equal(protocol || 'http') expect(conf['api-path']).to.equal(apiPath || '/api/v0/') }