diff --git a/index.js b/index.js index 04fcec9..8519689 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ import os from 'os' import parallel from 'run-parallel' import path from 'path' import queueMicrotask from 'queue-microtask' -import raf from 'random-access-file' +import RAF from 'random-access-file' import randombytes from 'randombytes' import thunky from 'thunky' @@ -67,7 +67,7 @@ export default class Storage { fs.mkdir(path.dirname(file.path), { recursive: true }, err => { if (err) return cb(err) if (this.closed) return cb(new Error('Storage is closed')) - cb(null, raf(file.path)) + cb(null, new RAF(file.path)) }) }) }) diff --git a/package.json b/package.json index 8d93670..d92c8f6 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "type": "module", "dependencies": { "queue-microtask": "^1.2.2", - "random-access-file": "^2.0.1", + "random-access-file": "^4.0.0", "randombytes": "^2.0.3", "run-parallel": "^1.1.2", "thunky": "^1.0.1"