Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NPM] Bump yargs and @types/yargs #473

Merged
merged 2 commits into from
Jun 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'import/extensions': [
'error',
'always',
'ignorePackages',
{
ts: 'never',
js: 'ignorePackages',
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/docker.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ on:
default: false
secrets:
DOCKERHUB_USERNAME:
required: true
DOCKERHUB_TOKEN:
required: true
jobs:
docker:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"xterm-addon-fit": "^0.6.0",
"xterm-addon-image": "^0.2.0",
"xterm-addon-web-links": "^0.8.0",
"yargs": "^15.4.1"
"yargs": "^17.7.2"
},
"devDependencies": {
"@snowpack/plugin-run-script": "^2.3.0",
Expand All @@ -143,7 +143,7 @@
"@types/response-time": "^2",
"@types/sinon": "^10.0.13",
"@types/toastify-js": "^1.9.2",
"@types/yargs": "^15.0.5",
"@types/yargs": "^17.0.24",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"all-contributors-cli": "^6.17.2",
Expand Down
10 changes: 6 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/
import { createRequire } from 'module';
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import { start } from './server.js';
import { loadConfigFile, mergeCliConf } from './shared/config.js';
import { setLevel, logger } from './shared/logger.js';
Expand All @@ -16,7 +17,7 @@ import { setLevel, logger } from './shared/logger.js';
const require = createRequire(import.meta.url);
const packageJson = require('../package.json');

const opts = yargs
const opts = yargs(hideBin(process.argv))
.scriptName(packageJson.name)
.version(packageJson.version)
.options('conf', {
Expand Down Expand Up @@ -113,12 +114,13 @@ const opts = yargs
type: 'boolean',
description: 'Print help message',
})
.boolean('allow_discovery').argv;
.boolean('allow_discovery')
.parseSync();

if (!opts.help) {
loadConfigFile(opts.conf)
.then(config => mergeCliConf(opts, config))
.then(conf => {
.then((config) => mergeCliConf(opts, config))
.then((conf) => {
setLevel(conf.logLevel);
start(conf.ssh, conf.server, conf.command, conf.forceSSH, conf.ssl);
})
Expand Down
37 changes: 32 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -759,10 +759,10 @@
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"
integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==

"@types/yargs@^15.0.5":
version "15.0.15"
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.15.tgz#e609a2b1ef9e05d90489c2f5f45bbfb2be092158"
integrity sha512-IziEYMU9XoVj8hWg7k+UJrXALkGFjWJhn5QFEv9q4p+v40oZhSuC135M38st8XPjICL7Ey4TV64ferBGUoJhBg==
"@types/yargs@^17.0.24":
version "17.0.24"
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902"
integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==
dependencies:
"@types/yargs-parser" "*"

Expand Down Expand Up @@ -1595,6 +1595,15 @@ cliui@^7.0.2:
strip-ansi "^6.0.0"
wrap-ansi "^7.0.0"

cliui@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
dependencies:
string-width "^4.2.0"
strip-ansi "^6.0.1"
wrap-ansi "^7.0.0"

clone-response@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3"
Expand Down Expand Up @@ -7096,6 +7105,11 @@ yargs-parser@^20.0.0, yargs-parser@^20.2.2:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==

yargs-parser@^21.1.1:
version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==

[email protected]:
version "2.0.0"
resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb"
Expand Down Expand Up @@ -7135,7 +7149,7 @@ yargs@^13.3.0:
y18n "^4.0.0"
yargs-parser "^13.1.2"

yargs@^15.0.1, yargs@^15.4.1:
yargs@^15.0.1:
version "15.4.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
Expand All @@ -7152,6 +7166,19 @@ yargs@^15.0.1, yargs@^15.4.1:
y18n "^4.0.0"
yargs-parser "^18.1.2"

yargs@^17.7.2:
version "17.7.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
dependencies:
cliui "^8.0.1"
escalade "^3.1.1"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
string-width "^4.2.3"
y18n "^5.0.5"
yargs-parser "^21.1.1"

[email protected]:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
Expand Down