rimraf 5.0.7 → 5.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Install with `npm install rimraf`.
|
|
|
8
8
|
### v4 to v5
|
|
9
9
|
|
|
10
10
|
- There is no default export anymore. Import the functions directly
|
|
11
|
-
using, e.g., `import { rimrafSync } from 'rimraf`.
|
|
11
|
+
using, e.g., `import { rimrafSync } from 'rimraf'`.
|
|
12
12
|
|
|
13
13
|
### v3 to v4
|
|
14
14
|
|
|
@@ -21,9 +21,9 @@ Install with `npm install rimraf`.
|
|
|
21
21
|
- New implementation on Windows, falling back to "move then
|
|
22
22
|
remove" strategy when exponential backoff for `EBUSY` fails to
|
|
23
23
|
resolve the situation.
|
|
24
|
-
- Simplified implementation on
|
|
24
|
+
- Simplified implementation on POSIX, since the Windows
|
|
25
25
|
affordances are not necessary there.
|
|
26
|
-
- As of 4.3, return/resolve value is boolean instead of undefined
|
|
26
|
+
- As of 4.3, return/resolve value is boolean instead of undefined.
|
|
27
27
|
|
|
28
28
|
## API
|
|
29
29
|
|
|
@@ -53,7 +53,7 @@ Options:
|
|
|
53
53
|
- `preserveRoot`: If set to boolean `false`, then allow the
|
|
54
54
|
recursive removal of the root directory. Otherwise, this is
|
|
55
55
|
not allowed.
|
|
56
|
-
- `tmp`: Windows only. Temp folder to
|
|
56
|
+
- `tmp`: Windows only. Temp folder to place files and
|
|
57
57
|
folders for the "move then remove" fallback. Must be on the
|
|
58
58
|
same physical device as the path being deleted. Defaults to
|
|
59
59
|
`os.tmpdir()` when that is on the same drive letter as the path
|
|
@@ -75,7 +75,7 @@ Options:
|
|
|
75
75
|
linear backoff. Default `100`.
|
|
76
76
|
- `signal` Pass in an AbortSignal to cancel the directory
|
|
77
77
|
removal. This is useful when removing large folder structures,
|
|
78
|
-
if you'd like to limit the
|
|
78
|
+
if you'd like to limit the time spent.
|
|
79
79
|
|
|
80
80
|
Using a `signal` option prevents the use of Node's built-in
|
|
81
81
|
`fs.rm` because that implementation does not support abort
|
|
@@ -84,7 +84,7 @@ Options:
|
|
|
84
84
|
- `glob` Boolean flag to treat path as glob pattern, or an object
|
|
85
85
|
specifying [`glob` options](https://github.com/isaacs/node-glob).
|
|
86
86
|
- `filter` Method that returns a boolean indicating whether that
|
|
87
|
-
path should be deleted. With async rimraf methods, this may
|
|
87
|
+
path should be deleted. With async `rimraf` methods, this may
|
|
88
88
|
return a Promise that resolves to a boolean. (Since Promises
|
|
89
89
|
are truthy, returning a Promise from a sync filter is the same
|
|
90
90
|
as just not filtering anything.)
|
|
@@ -98,7 +98,7 @@ Options:
|
|
|
98
98
|
if the filter returns (or resolves to) a truthy value. Omitting
|
|
99
99
|
a directory will still allow its children to be removed, unless
|
|
100
100
|
they are also filtered out, but any parents of a filtered entry
|
|
101
|
-
will not be removed, since the directory
|
|
101
|
+
will not be removed, since the directory will not be empty in
|
|
102
102
|
that case.
|
|
103
103
|
|
|
104
104
|
Using a filter method prevents the use of Node's built-in
|
|
@@ -107,7 +107,7 @@ Options:
|
|
|
107
107
|
Any other options are provided to the native Node.js `fs.rm` implementation
|
|
108
108
|
when that is used.
|
|
109
109
|
|
|
110
|
-
This will attempt to choose the best implementation, based on Node.js
|
|
110
|
+
This will attempt to choose the best implementation, based on the Node.js
|
|
111
111
|
version and `process.platform`. To force a specific implementation, use
|
|
112
112
|
one of the other functions provided.
|
|
113
113
|
|
|
@@ -161,7 +161,7 @@ Note that, in cases where the operation fails, this _may_ leave
|
|
|
161
161
|
files lying around in the parent directory with names like
|
|
162
162
|
`.file-basename.txt.0.123412341`. Until the Windows kernel
|
|
163
163
|
provides a way to perform atomic `unlink` and `rmdir` operations,
|
|
164
|
-
this is unfortunately unavoidable.
|
|
164
|
+
this is, unfortunately, unavoidable.
|
|
165
165
|
|
|
166
166
|
To move files to a different temporary directory other than the
|
|
167
167
|
parent, provide `opts.tmp`. Note that this _must_ be on the same
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rimraf",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"tshy": {
|
|
6
6
|
"main": true,
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@types/node": "^20.12.11",
|
|
62
62
|
"mkdirp": "^3.0.1",
|
|
63
63
|
"prettier": "^3.2.5",
|
|
64
|
-
"tap": "^
|
|
64
|
+
"tap": "^19.0.1",
|
|
65
65
|
"tshy": "^1.14.0",
|
|
66
66
|
"typedoc": "^0.25.13",
|
|
67
67
|
"typescript": "^5.4.5"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"url": "https://github.com/sponsors/isaacs"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
|
-
"node": ">=
|
|
73
|
+
"node": ">=18"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"glob": "^10.3.7"
|