From cd4524adf1bd83c1ac34ac20195d3d63c2d0d265 Mon Sep 17 00:00:00 2001 From: Cas <6506529+ThaUnknown@users.noreply.github.com> Date: Fri, 27 Jan 2023 18:19:55 +0100 Subject: [PATCH] fix: raf v4 (#47) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) }) }) })