Skip to content

Commit

Permalink
update(yargs-parser): updates the yargs-parser dependency (#2326)
Browse files Browse the repository at this point in the history
As of `v19`, `yargs-parser` is now shipping its own types.

The types seem to be working fairly well in our codebase, with the hiccup that one type was corrected, `_` can be a number or string.

```
node example.mjs apple 99 batman
{ _: [ 'apple', 99, 'batman' ] }
```

FYI, `yargs-parser` now supports ESM:

```js
import parser from 'yargs-parser'

console.info(parser(process.argv.slice(2)))
```

**and Deno 😮**

```typescript
import parser from "https://deno.land/x/yargs_parser/deno.ts";

const argv = parser('--foo=99 --bar=9987930', {
  string: ['bar']
})
console.log(argv)
```
  • Loading branch information
bcoe committed Aug 11, 2020
1 parent 701edf3 commit ac1f487
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
},
"devDependencies": {
"@compodoc/compodoc": "^1.1.10",
"@microsoft/api-documenter": "^7.8.10",
"@microsoft/api-extractor": "^7.8.10",
"@types/execa": "^0.9.0",
"@types/mkdirp": "^1.0.0",
"@types/mocha": "^8.0.0",
Expand All @@ -67,7 +69,6 @@
"@types/sinon": "^9.0.0",
"@types/tmp": "^0.2.0",
"@types/url-template": "^2.0.28",
"@types/yargs-parser": "^15.0.0",
"c8": "^7.0.0",
"codecov": "^3.4.0",
"execa": "^4.0.0",
Expand All @@ -89,8 +90,6 @@
"sinon": "^9.0.2",
"tmp": "^0.2.0",
"typescript": "^3.8.3",
"yargs-parser": "^18.1.3",
"@microsoft/api-documenter": "^7.8.10",
"@microsoft/api-extractor": "^7.8.10"
"yargs-parser": "^19.0.1"
}
}
2 changes: 1 addition & 1 deletion src/generator/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async function main() {
if (!discoveryUrl && argv._.length > 0) {
argv._.forEach(async url => {
console.log(`Generating API for ${url}`);
await gen.generateAPI(url);
await gen.generateAPI('' + url);
console.log('Generated API for ' + url);
});
} else {
Expand Down

0 comments on commit ac1f487

Please sign in to comment.