Skip to content

Commit 95adda7

Browse files
renovate[bot]renovate-botgr2m
authored
fix(deps): update dependency yargs to v16 (#27)
* fix(deps): update dependency yargs to v16 * refactor: adapt for `yargs` v16 * build(package): lock file Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Gregor Martynus <[email protected]>
1 parent 51e30d1 commit 95adda7

File tree

4 files changed

+78
-267
lines changed

4 files changed

+78
-267
lines changed

bin/octoherd.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env node
22

33
import yargs from "yargs";
4+
import { hideBin } from "yargs/helpers";
45
import { resolve } from "path";
56
import { VERSION as OctokitVersion } from "@octoherd/octokit";
67
import chalk from "chalk";
@@ -9,7 +10,7 @@ import { octoherd } from "../index.js";
910
import { VERSION } from "../version.js";
1011
import { cliOptions } from "./cli-options.js";
1112

12-
const argv = yargs
13+
const argv = yargs(hideBin(process.argv))
1314
.usage("Usage: $0 [options] [script] [repos...]")
1415
.example(
1516
"$0 --token 0123456789012345678901234567890123456789 octokit/rest.js"

bin/run.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import yargs from "yargs";
2+
import { hideBin } from "yargs/helpers";
3+
24
import { VERSION as OctokitVersion } from "@octoherd/octokit";
35
import chalk from "chalk";
46

@@ -16,7 +18,7 @@ import { cliOptions } from "./cli-options.js";
1618
* @param {function} script Octoherd Script function
1719
*/
1820
export function run(script) {
19-
const argv = yargs
21+
const argv = yargs(hideBin(process.argv))
2022
.usage("Usage: $0 [options] [repos...]")
2123
.example(
2224
"$0 --token 0123456789012345678901234567890123456789 octokit/rest.js"

0 commit comments

Comments
 (0)