Update ava to 4.3.3
The [release notes](https://github.com/avajs/ava/releases/tag/v4.3.3) mention compatibility with Node 18.8.
This commit is contained in:
parent
21530f507f
commit
bea5e4b220
160 changed files with 2647 additions and 2263 deletions
20
node_modules/del/index.js
generated
vendored
20
node_modules/del/index.js
generated
vendored
|
|
@ -52,7 +52,7 @@ function normalizePatterns(patterns) {
|
|||
return patterns;
|
||||
}
|
||||
|
||||
module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), ...options} = {}) => {
|
||||
module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), onProgress = () => {}, ...options} = {}) => {
|
||||
options = {
|
||||
expandDirectories: false,
|
||||
onlyFiles: false,
|
||||
|
|
@ -66,6 +66,16 @@ module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), ...option
|
|||
const files = (await globby(patterns, options))
|
||||
.sort((a, b) => b.localeCompare(a));
|
||||
|
||||
if (files.length === 0) {
|
||||
onProgress({
|
||||
totalCount: 0,
|
||||
deletedCount: 0,
|
||||
percent: 1
|
||||
});
|
||||
}
|
||||
|
||||
let deletedCount = 0;
|
||||
|
||||
const mapper = async file => {
|
||||
file = path.resolve(cwd, file);
|
||||
|
||||
|
|
@ -77,6 +87,14 @@ module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), ...option
|
|||
await rimrafP(file, rimrafOptions);
|
||||
}
|
||||
|
||||
deletedCount += 1;
|
||||
|
||||
onProgress({
|
||||
totalCount: files.length,
|
||||
deletedCount,
|
||||
percent: deletedCount / files.length
|
||||
});
|
||||
|
||||
return file;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue