File tree Expand file tree Collapse file tree 8 files changed +18
-12
lines changed Expand file tree Collapse file tree 8 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 4343 "npm" : " >=3.0.0"
4444 },
4545 "devDependencies" : {
46- "aegir" : " ^25.0 .0" ,
46+ "aegir" : " ^28.1 .0" ,
4747 "it-all" : " ^1.0.2" ,
4848 "it-drain" : " ^1.0.1" ,
4949 "it-first" : " ^1.0.2" ,
6565 "err-code" : " ^2.0.0" ,
6666 "interface-datastore" : " ^2.0.0" ,
6767 "ipfs-repo-migrations" : " ^5.0.3" ,
68- "ipfs-utils" : " ^2.3.1 " ,
69- "ipld-block" : " ^0.10 .0" ,
68+ "ipfs-utils" : " ^4.0.0 " ,
69+ "ipld-block" : " ^0.11 .0" ,
7070 "it-map" : " ^1.0.2" ,
7171 "it-pushable" : " ^1.4.0" ,
7272 "just-safe-get" : " ^2.0.0" ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module.exports = (store) => {
1010 /**
1111 * Get the current configuration from the repo.
1212 *
13- * @returns {Promise<String > }
13+ * @returns {Promise<string > }
1414 */
1515 async get ( ) {
1616 const value = await store . get ( apiFile )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ module.exports = (store) => {
2929 /**
3030 * Get the value for the passed configuration key from the repo.
3131 *
32- * @param {String } key - the config key to get
32+ * @param {string } key - the config key to get
3333 * @param {Object } options - options
3434 * @param {AbortSignal } options.signal - abort this config read
3535 * @returns {Promise<Object> }
@@ -57,7 +57,7 @@ module.exports = (store) => {
5757 /**
5858 * Set the current configuration for this repo.
5959 *
60- * @param {String } key - the config key to be written
60+ * @param {string } key - the config key to be written
6161 * @param {Object } value - the config value to be written
6262 * @param {Object } options - options
6363 * @param {AbortSignal } options.signal - abort this config write
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const lockers = {
3434 */
3535class IpfsRepo {
3636 /**
37- * @param {String } repoPath - path where the repo is stored
37+ * @param {string } repoPath - path where the repo is stored
3838 * @param {Object } options - Configuration
3939 */
4040 constructor ( repoPath , options ) {
@@ -71,7 +71,8 @@ class IpfsRepo {
7171
7272 /**
7373 * Check if the repo is already initialized.
74- * @returns {Promise<Boolean> }
74+ *
75+ * @returns {Promise<boolean> }
7576 */
7677 async isInitialized ( ) {
7778 if ( ! this . closed ) {
@@ -174,6 +175,7 @@ class IpfsRepo {
174175
175176 /**
176177 * Opens the root backend, catching and ignoring an 'Already open' error
178+ *
177179 * @returns {Promise }
178180 */
179181 async _openRoot ( ) {
@@ -190,7 +192,7 @@ class IpfsRepo {
190192 * Creates a lock on the repo if a locker is specified. The lockfile object will
191193 * be returned in the callback if one has been created.
192194 *
193- * @param {String } path
195+ * @param {string } path
194196 * @returns {Promise<lockfile> }
195197 */
196198 async _openLock ( path ) {
@@ -214,6 +216,7 @@ class IpfsRepo {
214216
215217 /**
216218 * Check if the repo is already initialized.
219+ *
217220 * @private
218221 * @returns {Promise }
219222 */
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const LOCKS = {}
1212/**
1313 * Lock the repo in the given dir.
1414 *
15- * @param {String } dir
15+ * @param {string } dir
1616 * @returns {Promise<Object> }
1717 */
1818exports . lock = async ( dir ) => { // eslint-disable-line require-await
@@ -37,7 +37,7 @@ exports.lock = async (dir) => { // eslint-disable-line require-await
3737/**
3838 * Check if the repo in the given directory is locked.
3939 *
40- * @param {String } dir
40+ * @param {string } dir
4141 * @returns {bool }
4242 */
4343exports . locked = async ( dir ) => { // eslint-disable-line require-await
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const lockFile = 'repo.lock'
1010
1111/**
1212 * Duration in milliseconds in which the lock is considered stale
13+ *
1314 * @see https://github.com/moxystudio/node-proper-lockfile#lockfile-options
1415 * The default value of 10000 was too low for ipfs and sometimes `proper-lockfile`
1516 * would throw an exception because it couldn't update the lock file mtime within
@@ -22,7 +23,7 @@ const STALE_TIME = 20000
2223/**
2324 * Lock the repo in the given dir.
2425 *
25- * @param {String } dir
26+ * @param {string } dir
2627 * @returns {Promise<Object> }
2728 */
2829exports . lock = async ( dir ) => {
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ module.exports = (store) => {
2929 /**
3030 * Set the datastore spec of the repo, writing it to the underlying store.
3131 * TODO unclear on what the type should be or if it's required
32+ *
3233 * @param {number } spec
3334 * @returns {Promise<void> }
3435 */
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ module.exports = (store) => {
3838 } ,
3939 /**
4040 * Check the current version, and returns true if versions matches
41+ *
4142 * @param {number } expected
4243 * @returns {boolean }
4344 */
You can’t perform that action at this time.
0 commit comments