From a0dbe64d474456a99e688556a166a6ccf35bf8dc Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 27 Dec 2023 19:03:18 +0000 Subject: [PATCH 1/2] fix: package.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-AXIOS-6124857 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c2c656..193d90c 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "typescript": "^5.0.4" }, "dependencies": { - "axios": "^1.6.0", + "axios": "^1.6.3", "chalk": "4", "chance": "^1.1.11", "commander": "^11.0.0", From 4ae0e402369d959025ebaa319f720f0ca6c2c625 Mon Sep 17 00:00:00 2001 From: viqueen Date: Wed, 3 Jan 2024 16:38:20 +1100 Subject: [PATCH 2/2] fix formatting --- modules/commands/chance-command.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/commands/chance-command.ts b/modules/commands/chance-command.ts index bba3710..bf1017b 100644 --- a/modules/commands/chance-command.ts +++ b/modules/commands/chance-command.ts @@ -35,8 +35,10 @@ actions.forEach((action) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const doIt = (chance as any)[action]; const wordParam = opts.words ? { words: parseInt(opts.words) } : {}; - const versionParam = opts.version ? { version: parseInt(opts.version)} : {}; - const output = doIt.bind(chance)({...wordParam, ...versionParam}); + const versionParam = opts.version + ? { version: parseInt(opts.version) } + : {}; + const output = doIt.bind(chance)({ ...wordParam, ...versionParam }); console.info({ output, length: output.length