Fix dependency incompatibilities

This commit is contained in:
Henry Mercer 2023-07-13 11:17:33 +01:00
parent 40a500c743
commit c1f49580cf
749 changed files with 372856 additions and 91172 deletions

40
node_modules/del/readme.md generated vendored
View file

@ -6,21 +6,23 @@ Similar to [rimraf](https://github.com/isaacs/rimraf), but with a Promise API an
## Install
```sh
npm install del
```
$ npm install del
```
## Usage
```js
import {deleteAsync} from 'del';
const del = require('del');
const deletedFilePaths = await deleteAsync(['temp/*.js', '!temp/unicorn.js']);
const deletedDirectoryPaths = await deleteAsync(['temp', 'public']);
(async () => {
const deletedFilePaths = await del(['temp/*.js', '!temp/unicorn.js']);
const deletedDirectoryPaths = await del(['temp', 'public']);
console.log('Deleted files:\n', deletedFilePaths.join('\n'));
console.log('\n\n');
console.log('Deleted directories:\n', deletedDirectoryPaths.join('\n'));
console.log('Deleted files:\n', deletedFilePaths.join('\n'));
console.log('\n\n');
console.log('Deleted directories:\n', deletedDirectoryPaths.join('\n'));
})();
```
## Beware
@ -30,19 +32,19 @@ The glob pattern `**` matches all children and *the parent*.
So this won't work:
```js
deleteSync(['public/assets/**', '!public/assets/goat.png']);
del.sync(['public/assets/**', '!public/assets/goat.png']);
```
You have to explicitly ignore the parent directories too:
```js
deleteSync(['public/assets/**', '!public/assets', '!public/assets/goat.png']);
del.sync(['public/assets/**', '!public/assets', '!public/assets/goat.png']);
```
To delete all subdirectories inside `public/`, you can do:
```js
deleteSync(['public/*/']);
del.sync(['public/*/']);
```
Suggestions on how to improve this welcome!
@ -51,11 +53,11 @@ Suggestions on how to improve this welcome!
Note that glob patterns can only contain forward-slashes, not backward-slashes. Windows file paths can use backward-slashes as long as the path does not contain any glob-like characters, otherwise use `path.posix.join()` instead of `path.join()`.
### deleteAsync(patterns, options?)
### del(patterns, options?)
Returns `Promise<string[]>` with the deleted paths.
### deleteSync(patterns, options?)
### del.sync(patterns, options?)
Returns `string[]` with the deleted paths.
@ -89,11 +91,13 @@ Default: `false`
See what would be deleted.
```js
import {deleteAsync} from 'del';
const del = require('del');
const deletedPaths = await deleteAsync(['temp/*.js'], {dryRun: true});
(async () => {
const deletedPaths = await del(['temp/*.js'], {dryRun: true});
console.log('Files and directories that would be deleted:\n', deletedPaths.join('\n'));
console.log('Files and directories that would be deleted:\n', deletedPaths.join('\n'));
})();
```
##### concurrency
@ -111,9 +115,9 @@ Type: `(progress: ProgressData) => void`
Called after each file or directory is deleted.
```js
import {deleteAsync} from 'del';
import del from 'del';
await deleteAsync(patterns, {
await del(patterns, {
onProgress: progress => {
// …
}});