diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index a7da2e54f3..6f4483fb7c 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -1,2 +1,2 @@ // Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories. -javascript() +javascript(['nodejs_versions': ['8.11.1','9.2.0','10.0.0']]) diff --git a/package.json b/package.json index 3acb992e7c..5273356eb6 100644 --- a/package.json +++ b/package.json @@ -110,10 +110,10 @@ "ipfs-block": "~0.7.1", "ipfs-block-service": "~0.14.0", "ipfs-multipart": "~0.1.0", - "ipfs-repo": "~0.20.0", + "ipfs-repo": "~0.22.1", "ipfs-unixfs": "~0.1.14", "ipfs-unixfs-engine": "~0.29.0", - "ipld": "~0.17.0", + "ipld": "~0.17.1", "ipld-dag-cbor": "~0.12.0", "ipld-dag-pb": "~0.14.4", "is-ipfs": "~0.3.2", diff --git a/src/core/boot.js b/src/core/boot.js index cc7c14970e..113c9919bf 100644 --- a/src/core/boot.js +++ b/src/core/boot.js @@ -3,6 +3,7 @@ const waterfall = require('async/waterfall') const series = require('async/series') const extend = require('deep-extend') +const RepoErrors = require('ipfs-repo').errors // Boot an IPFS node depending on the options set module.exports = (self) => { @@ -40,7 +41,14 @@ module.exports = (self) => { // which happens when the version file is not found // we just want to signal that no repo exist, not // fail the whole process. - // TODO: improve datastore and ipfs-repo implemenations so this error is a bit more unified + + // Use standardized errors as much as possible + if (err.code === RepoErrors.ERR_REPO_NOT_INITIALIZED) { + return cb(null, false) + } + + // TODO: As error codes continue to be standardized, this logic can be phase out; + // it is here to maintain compatability if (err.message.match(/not found/) || // indexeddb err.message.match(/ENOENT/) || // fs err.message.match(/No value/) // memory