Upgrade Ava to v4

This commit is contained in:
Henry Mercer 2022-02-01 18:01:11 +00:00
parent 9a40cc5274
commit ce89f1b611
1153 changed files with 27264 additions and 95308 deletions

20
node_modules/path-exists/index.js generated vendored
View file

@ -1,23 +1,19 @@
'use strict';
const fs = require('fs');
const {promisify} = require('util');
import fs, {promises as fsPromises} from 'node:fs';
const pAccess = promisify(fs.access);
module.exports = async path => {
export async function pathExists(path) {
try {
await pAccess(path);
await fsPromises.access(path);
return true;
} catch (_) {
} catch {
return false;
}
};
}
module.exports.sync = path => {
export function pathExistsSync(path) {
try {
fs.accessSync(path);
return true;
} catch (_) {
} catch {
return false;
}
};
}