Remove mkdirp

This commit is contained in:
Samuel Elliott
2023-07-13 00:12:21 +01:00
parent d147c2a5e8
commit 0a9e5d859d
17 changed files with 26 additions and 39 deletions

View File

@@ -2,7 +2,6 @@ import * as path from 'node:path';
import * as fs from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import { fetch } from 'undici';
import mkdirp from 'mkdirp';
import { ErrorResponse, ResponseSymbol } from '../api/util.js';
import createDebug from '../util/debug.js';
import { timeoutSignal } from '../util/misc.js';
@@ -29,7 +28,7 @@ const default_config: NxapiRemoteConfig = {
};
async function loadRemoteConfig() {
await mkdirp(paths.cache);
await fs.mkdir(paths.cache, {recursive: true});
const config_cache_path = path.resolve(paths.cache, 'config.json');
const url = process.env.NXAPI_CONFIG_URL ?? CONFIG_URL;

View File

@@ -1,7 +1,6 @@
import * as path from 'node:path';
import * as fs from 'node:fs/promises';
import persist from 'node-persist';
import mkdirp from 'mkdirp';
import SplatNet2Api, { SplatNet2ErrorResponse } from '../../api/splatnet2.js';
import { renewIksmToken } from '../auth/splatnet2.js';
import { Records, Stages } from '../../api/splatnet2-types.js';
@@ -41,7 +40,7 @@ export class SplatNet2RecordsMonitor extends Loop {
}
async init() {
await mkdirp(this.directory);
await fs.mkdir(this.directory, {recursive: true});
}
async hasChanged(records: Records) {

View File

@@ -1,7 +1,6 @@
import * as path from 'node:path';
import * as fs from 'node:fs/promises';
import { fetch } from 'undici';
import mkdirp from 'mkdirp';
import createDebug from '../util/debug.js';
import { dir, docker, version } from '../util/product.js';
import { paths } from '../util/storage.js';
@@ -26,7 +25,7 @@ export async function checkUpdates() {
}
} catch (err) {}
await mkdirp(paths.cache);
await fs.mkdir(paths.cache, {recursive: true});
const update_cache_path = path.resolve(paths.cache, 'update.json');
try {