From d27f45af6057e6e1dbe015d32cec7d8918f8144e Mon Sep 17 00:00:00 2001 From: David Dias Date: Mon, 14 Sep 2015 12:20:30 +0100 Subject: [PATCH 1/2] fix missing codestyle issues --- .travis.yml | 3 +-- package.json | 12 ++++++++++-- src/request-api.js | 2 +- test/test.js | 1 - 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 125e04ac6..8790859a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ language: node_js node_js: - - "0.12" - - "0.10" + - "0.4" diff --git a/package.json b/package.json index beed899dd..cdd29eb48 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,9 @@ "brfs" ] }, + "engines": { + "node": "^4.0.0" + }, "repository": { "type": "git", "url": "https://github.com/ipfs/node-ipfs-api" @@ -26,14 +29,19 @@ "ipfsd-ctl": "^0.3.3", "mocha": "^2.2.5", "pre-commit": "^1.0.6", - "standard": "^3.3.2", + "standard": "^5.2.2", "uglify-js": "^2.4.24" }, "scripts": { "test": "./node_modules/.bin/mocha", - "lint": "./node_modules/.bin/standard --format", + "lint": "./node_modules/.bin/standard", "build": "./node_modules/.bin/browserify -t brfs -s ipfsAPI -e ./src/index.js | tee dist/ipfsapi.js | ./node_modules/.bin/uglifyjs -m > dist/ipfsapi.min.js" }, + "standard": { + "ignore": [ + "dist/*" + ] + }, "pre-commit": [ "lint" ], diff --git a/src/request-api.js b/src/request-api.js index 195fb2d9d..1a9db35aa 100644 --- a/src/request-api.js +++ b/src/request-api.js @@ -62,7 +62,7 @@ function requestAPI (path, args, opts, files, buffer, cb) { try { var obj = JSON.parse(chunk.toString()) objects.push(obj) - } catch(e) { + } catch (e) { chunkedObjects = false data += chunk } diff --git a/test/test.js b/test/test.js index b56f7af64..dba726f5d 100644 --- a/test/test.js +++ b/test/test.js @@ -300,5 +300,4 @@ describe('ipfs node api', function () { } }) }) - }) From 011be3553335cd545f45580c68d69a1e025778b0 Mon Sep 17 00:00:00 2001 From: David Dias Date: Mon, 14 Sep 2015 17:14:22 +0100 Subject: [PATCH 2/2] right node version (4.0 and not 0.4) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8790859a5..851a54a6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,3 @@ language: node_js node_js: - - "0.4" + - "4.0"