mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-06 12:01:40 +08:00
This CL updates minimist to 1.2.6 to fix a critical security vulnerability: https://nvd.nist.gov/vuln/detail/CVE-2021-44906 The fix was made by running: `npm run install-deps audit fix --audit-level=critical` Bug: none Change-Id: I51103b525d9969e03000d55af86cebdabc7e0366 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3591079 Reviewed-by: Mathias Bynens <mathias@chromium.org> Commit-Queue: Brandon Walderman <brwalder@microsoft.com>
28 lines
545 B
JavaScript
28 lines
545 B
JavaScript
'use strict'
|
|
const fs = require('../fs')
|
|
const { checkPath } = require('./utils')
|
|
|
|
const getMode = options => {
|
|
const defaults = { mode: 0o777 }
|
|
if (typeof options === 'number') return options
|
|
return ({ ...defaults, ...options }).mode
|
|
}
|
|
|
|
module.exports.makeDir = async (dir, options) => {
|
|
checkPath(dir)
|
|
|
|
return fs.mkdir(dir, {
|
|
mode: getMode(options),
|
|
recursive: true
|
|
})
|
|
}
|
|
|
|
module.exports.makeDirSync = (dir, options) => {
|
|
checkPath(dir)
|
|
|
|
return fs.mkdirSync(dir, {
|
|
mode: getMode(options),
|
|
recursive: true
|
|
})
|
|
}
|