From 63f9e51b73a7716c7cadb9c87b1107b506b5f33a Mon Sep 17 00:00:00 2001
From: Feross Aboukhadijeh <feross@feross.org>
Date: Tue, 6 Aug 2019 17:55:07 -0700
Subject: [PATCH] BREAKING: Drop Node 8 support

Use the new fs.mkdir {recursive: true} option instead of the mkdirp dependency.

It might be too early to merge this, since Node 8 is still supported until the end of the 2019. But just sending this PR so we can merge it at some point in the future.

For: https://github.com/brave/brave-browser/issues/5490
---
 index.js     | 3 +--
 package.json | 1 -
 test.js      | 3 +--
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/index.js b/index.js
index 41d4ab6..0094f96 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,6 @@
 var inherits = require('util').inherits
 var RandomAccess = require('random-access-storage')
 var fs = require('fs')
-var mkdirp = require('mkdirp')
 var path = require('path')
 var constants = fs.constants || require('constants')
 
@@ -35,7 +34,7 @@ inherits(RandomAccessFile, RandomAccess)
 RandomAccessFile.prototype._open = function (req) {
   var self = this
 
-  mkdirp(path.dirname(this.filename), ondir)
+  fs.mkdir(path.dirname(this.filename), { recursive: true }, ondir)
 
   function ondir (err) {
     if (err) return req.callback(err)
diff --git a/package.json b/package.json
index e3edaaa..a419911 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,6 @@
   },
   "browser": "./browser.js",
   "dependencies": {
-    "mkdirp": "^0.5.1",
     "random-access-storage": "^1.1.1"
   },
   "devDependencies": {
diff --git a/test.js b/test.js
index a5d4be7..a6d7b69 100644
--- a/test.js
+++ b/test.js
@@ -3,13 +3,12 @@ var tape = require('tape')
 var os = require('os')
 var path = require('path')
 var fs = require('fs')
-var mkdirp = require('mkdirp')
 var isWin = process.platform === 'win32'
 
 var tmp = path.join(os.tmpdir(), 'random-access-file-' + process.pid + '-' + Date.now())
 var i = 0
 
-mkdirp.sync(tmp)
+fs.mkdirSync(tmp, { recursive: true })
 
 tape('write and read', function (t) {
   var file = raf(gen())