del

Delete files and directories

MIT License

Downloads
52.2M
Stars
1.3K
Committers
23

Bot releases are hidden (Show)

del - Latest Release

Published by sindresorhus about 1 year ago

  • Add path to onProgress event (#155) f5d31e6

https://github.com/sindresorhus/del/compare/v7.0.0...v7.1.0

del -

Published by sindresorhus over 2 years ago

Breaking

  • Require Node.js 14 (#143) 106d7d8
  • This package is now pure ESM. Please read this.
  • Moved from a default export to named exports:
    • require('del')import {deleteAsync} from 'del'
    • require('del').syncimport {deleteSync} from 'del'

https://github.com/sindresorhus/del/compare/v6.1.1...v7.0.0

del -

Published by sindresorhus over 2 years ago

  • Fix ProgressData#deletedCount (#142) 7b4c881

https://github.com/sindresorhus/del/compare/v6.1.0...v6.1.1

del -

Published by sindresorhus over 2 years ago

del -

Published by sindresorhus about 4 years ago

Breaking

  • Require Node.js 10 6c99805

Improvements

  • Update dependencies 6c99805

https://github.com/sindresorhus/del/compare/v5.1.0...v6.0.0

del -

Published by sindresorhus about 5 years ago

Enhancements:

  • Allow non-glob patterns with backslash on Windows (like v4) (#100) 01da91f
  • Make deletion more reliable on Windows by retrying when Windows is being difficult (#108) 1299747
  • Sort removed files, so the returned array is always stable (#102) ca05c65

Fixes:

  • Fix the cwd option (#96) ffbf4c4
  • Prevent race condition on macOS when deleting files (#95) 8efdbcd

https://github.com/sindresorhus/del/compare/v5.0.0...v5.1.0


Shoutout to @chrisblossom for doing most of the work on this release 🙌

del -

Published by sindresorhus over 5 years ago

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:

  • Require Node.js 8 42e67a8
  • You can no longer pass in paths with backward-slashes. If you need to construct a glob pattern, use path.posix.join() instead of path.join(). You can use slash to transform backward-slash paths to forward-slash paths.
  • Update globby from version 6 to version 10 (#64) 6f96d2d
    Important: If you used any of the 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.

https://github.com/sindresorhus/del/compare/v4.1.1...v5.0.0

del -

Published by sindresorhus over 5 years ago

For TypeScript users only:

  • Fix missing TypeScript import 0361dcc

https://github.com/sindresorhus/del/compare/v4.1.0...v4.1.1

del -

Published by sindresorhus over 5 years ago

  • Refactor TypeScript definition to CommonJS compatible export (#82) 3f0d604

https://github.com/sindresorhus/del/compare/v4.0.0...v4.1.0

del -

Published by sindresorhus over 5 years ago

Breaking:

  • Require Node.js 6 434c9f6

Enhancements:

  • Add TypeScript definition (#81) 34c771e
  • Fix typo in error message (#80) e73cc8a

https://github.com/sindresorhus/del/compare/v3.0.0...v4.0.0

del - 3.0.0

Published by sindresorhus over 7 years ago

  • Drops support for Node.js 0.10 and 0.12.
  • Adds a concurrency option.

https://github.com/sindresorhus/del/compare/v2.2.2...v3.0.0

del - 2.0.0 - Promisification

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']);