Upgrade Ava to v4

This commit is contained in:
Henry Mercer 2022-02-01 18:01:11 +00:00
parent 9a40cc5274
commit ce89f1b611
1153 changed files with 27264 additions and 95308 deletions

14
node_modules/yargs/README.md generated vendored
View file

@ -1,5 +1,5 @@
<p align="center">
<img width="250" src="https://raw.githubusercontent.com/yargs/yargs/master/yargs-logo.png">
<img width="250" src="https://raw.githubusercontent.com/yargs/yargs/main/yargs-logo.png">
</p>
<h1 align="center"> Yargs </h1>
<p align="center">
@ -78,6 +78,8 @@ $ ./plunder.js --ships 12 --distance 98.7
Retreat from the xupptumblers!
```
> Note: `hideBin` is a shorthand for [`process.argv.slice(2)`](https://nodejs.org/en/knowledge/command-line/how-to-parse-command-line-arguments/). It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690).
### Complex Example
```javascript
@ -87,7 +89,7 @@ const { hideBin } = require('yargs/helpers')
yargs(hideBin(process.argv))
.command('serve [port]', 'start the server', (yargs) => {
yargs
return yargs
.positional('port', {
describe: 'port to bind on',
default: 5000
@ -101,7 +103,7 @@ yargs(hideBin(process.argv))
type: 'boolean',
description: 'Run with verbose logging'
})
.argv
.parse()
```
Run the example above with `--help` to see the help for the application.
@ -136,7 +138,7 @@ yargs(Deno.args)
})
.strictCommands()
.demandCommand(1)
.argv
.parse()
```
### ESM
@ -152,7 +154,7 @@ yargs(hideBin(process.argv))
console.info(argv)
})
.demandCommand(1)
.argv
.parse()
```
### Usage in Browser
@ -199,4 +201,4 @@ post on why we think this is important](https://medium.com/the-node-js-collectio
[slack-url]: http://devtoolscommunity.herokuapp.com
[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
[coverage-image]: https://img.shields.io/nycrc/yargs/yargs
[coverage-url]: https://github.com/yargs/yargs/blob/master/.nycrc
[coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc