This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 110
110
"ipfs-block" : " ~0.7.1" ,
111
111
"ipfs-block-service" : " ~0.14.0" ,
112
112
"ipfs-multipart" : " ~0.1.0" ,
113
- "ipfs-repo" : " github:ipfs/js-ipfs-repo#fix/node10 " ,
113
+ "ipfs-repo" : " ~0.22.0 " ,
114
114
"ipfs-unixfs" : " ~0.1.14" ,
115
115
"ipfs-unixfs-engine" : " ~0.29.0" ,
116
- "ipld" : " github:ipld/js-ipld#fix/node10 " ,
116
+ "ipld" : " ~0.17.1 " ,
117
117
"ipld-dag-cbor" : " ~0.12.0" ,
118
118
"ipld-dag-pb" : " ~0.14.4" ,
119
119
"is-ipfs" : " ~0.3.2" ,
Original file line number Diff line number Diff line change 3
3
const waterfall = require ( 'async/waterfall' )
4
4
const series = require ( 'async/series' )
5
5
const extend = require ( 'deep-extend' )
6
+ const RepoErrors = require ( 'ipfs-repo/src/errors' )
6
7
7
8
// Boot an IPFS node depending on the options set
8
9
module . exports = ( self ) => {
@@ -40,7 +41,14 @@ module.exports = (self) => {
40
41
// which happens when the version file is not found
41
42
// we just want to signal that no repo exist, not
42
43
// fail the whole process.
43
- // TODO: improve datastore and ipfs-repo implemenations so this error is a bit more unified
44
+
45
+ // Use standardized errors as much as possible
46
+ if ( err . code === RepoErrors . ERR_REPO_NOT_INITIALIZED ) {
47
+ return cb ( null , false )
48
+ }
49
+
50
+ // TODO: As error codes continue to be standardized, this logic can be phase out;
51
+ // it is here to maintain compatability
44
52
if ( err . message . match ( / n o t f o u n d / ) || // indexeddb
45
53
err . message . match ( / E N O E N T / ) || // fs
46
54
err . message . match ( / N o v a l u e / ) // memory
You can’t perform that action at this time.
0 commit comments