Bot releases are hidden (Show)
path
to onProgress
event (#155) f5d31e6require('del')
→ import {deleteAsync} from 'del'
require('del').sync
→ import {deleteSync} from 'del'
ProgressData#deletedCount
(#142) 7b4c881onProgress
option (#141) 8742649Enhancements:
Fixes:
cwd
option (#96) ffbf4c4https://github.com/sindresorhus/del/compare/v5.0.0...v5.1.0
Shoutout to @chrisblossom for doing most of the work on this release 🙌
This release changes the underlying globbing engine, so you are strongly recommended to use the dryRun
option to ensure del
still does what you expect before you run it on the real files.
Breaking:
path.posix.join()
instead of path.join()
. You can use slash
to transform backward-slash paths to forward-slash paths.globby
options, please note that globby
switched from using the glob
package to fast-glob
, so almost all the option names changed. Here's how to migrate the options.
For TypeScript users only:
Breaking:
Enhancements:
Published by sindresorhus over 7 years ago
concurrency
option.Published by sindresorhus about 9 years ago
The API now returns a promise instead of accepting a callback function.
Update your code accordingly:
var del = require('del');
- del('unicorn.png', function (error, paths) {
+ del('unicorn.png').then(function (paths) {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
And with gulp:
var gulp = require('gulp');
var del = require('del');
- gulp.task('clean', function (cb) {
- del('unicorn.png', cb);
+ gulp.task('clean', function () {
+ return del('unicorn.png');
});
gulp.task('default', ['clean']);