Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #268

Merged
merged 1 commit into from
Apr 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@ The [UNIX command](<http://en.wikipedia.org/wiki/Rm_(Unix)>) `rm -rf` for node.

Install with `npm install rimraf`.

## Major Changes from v3 to v4
## Major Changes

### v4 to v5

- There is no default export anymore. Import the functions directly
using, e.g., `import { rimrafSync } from 'rimraf`.

### v3 to v4

- The function returns a `Promise` instead of taking a callback.
- Globbing requires the `--glob` option to be set. (Removed in
4.0 and 4.1, opt-in support added in 4.2.)
- Globbing requires the `--glob` CLI option or `glob` option property
to be set. (Removed in 4.0 and 4.1, opt-in support added in 4.2.)
- Functions take arrays of paths, as well as a single path.
- Native implementation used by default when available, except on
Windows, where this implementation is faster and more reliable.
Expand Down Expand Up @@ -73,6 +80,8 @@ Options:
`fs.rm` because that implementation does not support abort
signals.

- `glob` Boolean flag to treat path as glob pattern, or an object
specifying [`glob` options](https://github.com/isaacs/node-glob).
- `filter` Method that returns a boolean indicating whether that
path should be deleted. With async rimraf methods, this may
return a Promise that resolves to a boolean. (Since Promises
Expand Down