Comparing version 16.0.0-beta.0 to 16.0.0-beta.1
@@ -258,3 +258,3 @@ import { assertNotStrictEqual } from './typings/common-types.js'; | ||
options.array = options.array.concat(parseOptions.array); | ||
delete options.config; | ||
options.config = {}; | ||
const unparsed = []; | ||
@@ -261,0 +261,0 @@ Object.keys(positionalMap).forEach((key) => { |
@@ -12,4 +12,4 @@ function getProcessArgvBinIndex() { | ||
} | ||
export function getProcessArgvWithoutBin() { | ||
return process.argv.slice(getProcessArgvBinIndex() + 1); | ||
export function hideBin(argv) { | ||
return argv.slice(getProcessArgvBinIndex() + 1); | ||
} | ||
@@ -16,0 +16,0 @@ export function getProcessArgvBin() { |
{ | ||
"name": "yargs", | ||
"version": "16.0.0-beta.0", | ||
"version": "16.0.0-beta.1", | ||
"description": "yargs the modern, pirate-themed, successor to optimist.", | ||
@@ -11,2 +11,5 @@ "main": "./index.cjs", | ||
}, | ||
"./helpers": { | ||
"import": "./helpers.mjs" | ||
}, | ||
"./yargs": { | ||
@@ -27,2 +30,3 @@ "require": "./build/index.cjs" | ||
"index.cjs", | ||
"helpers.mjs", | ||
"index.mjs", | ||
@@ -42,3 +46,3 @@ "build", | ||
"y18n": "^4.0.0", | ||
"yargs-parser": "^19.0.1" | ||
"yargs-parser": "^19.0.4" | ||
}, | ||
@@ -69,3 +73,3 @@ "devDependencies": { | ||
"standardx": "^5.0.0", | ||
"typescript": "^3.9.7", | ||
"typescript": "^4.0.2", | ||
"which": "^2.0.0", | ||
@@ -72,0 +76,0 @@ "yargs-test-extends": "^1.0.1" |
<p align="center"> | ||
<img width="250" src="/yargs-logo.png"> | ||
<img width="250" src="https://raw.githubusercontent.com/yargs/yargs/master/yargs-logo.png"> | ||
</p> | ||
@@ -26,3 +26,3 @@ <h1 align="center"> Yargs </h1> | ||
> <img width="400" src="/screen.png"> | ||
> <img width="400" src="https://raw.githubusercontent.com/yargs/yargs/master/screen.png"> | ||
@@ -109,5 +109,6 @@ * bash-completion shortcuts for commands and options. | ||
```typescript | ||
import { Yargs, YargsType, Arguments } from 'https://deno.land/x/yargs/deno.ts' | ||
import yargs from 'https://deno.land/x/yargs/deno.ts' | ||
import { Arguments, YargsType } from 'https://deno.land/x/yargs/types.ts' | ||
Yargs() | ||
yargs() | ||
.command('download <files...>', 'download a list of files', (yargs: YargsType) => { | ||
@@ -130,5 +131,6 @@ return yargs.positional('files', { | ||
```js | ||
import { Yargs, getProcessArgvWithoutBin } from 'yargs' | ||
import yargs from 'yargs' | ||
import { hideBin } from 'yargs/helpers' | ||
Yargs(getProcessArgvWithoutBin()) | ||
yargs(hideBin(process.argv)) | ||
.command('curl <url>', 'fetch the contents of the URL', () => {}, (argv) => { | ||
@@ -135,0 +137,0 @@ console.info(argv) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
290590
54
184
6728
Updatedyargs-parser@^19.0.4