From d0722041949b89c646ee168f50d5fc1f672546f0 Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Tue, 25 Jul 2023 20:42:54 +0300 Subject: [PATCH] fix: bump git-url-parse to fix vuln issues closes #201 --- package.json | 6 ++-- src/main/ts/util.ts | 4 +-- src/test/ts/config.ts | 3 +- yarn.lock | 67 ++++++++++++++++++++----------------------- 4 files changed, 38 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index a60d202..2927454 100644 --- a/package.json +++ b/package.json @@ -62,12 +62,12 @@ "debug": "^4.3.4", "execa": "^5.1.1", "gh-pages": "^5.0.0", - "git-url-parse": "^12.0.0", + "git-url-parse": "^13.1.0", "lodash": "^4.17.21", "queuefy": "^1.2.1", "read-pkg": "^5.2.0", "then-request": "^6.0.2", - "tslib": "^2.6.0" + "tslib": "^2.6.1" }, "devDependencies": { "@qiwi/libdefkit": "5.0.0", @@ -79,7 +79,7 @@ "mkdirp": "^3.0.1", "rimraf": "^5.0.1", "ts-jest": "^29.1.1", - "eslint": "^8.44.0", + "eslint": "^8.45.0", "eslint-config-prettier": "^8.8.0", "eslint-config-qiwi": "^2.1.3", "typedoc": "^0.24.8", diff --git a/src/main/ts/util.ts b/src/main/ts/util.ts index 0356e9a..550a129 100644 --- a/src/main/ts/util.ts +++ b/src/main/ts/util.ts @@ -4,8 +4,8 @@ export const catchToSmth = (fn: ICallable, smth?: any) => { return (...args: any[]) => { try { return fn(...args) - } catch { - + } catch (e) { + console.warn(e) return smth } } diff --git a/src/test/ts/config.ts b/src/test/ts/config.ts index 67e744e..cdb1abb 100644 --- a/src/test/ts/config.ts +++ b/src/test/ts/config.ts @@ -316,7 +316,8 @@ describe('config', () => { ['https://github.com/foo/bar/baz.git', 'foo/bar/baz'], ['git+https://github.com/qiwi/uniconfig.git', 'qiwi/uniconfig'], ['git@github.com:qiwi/consul-service-discovery.git', 'qiwi/consul-service-discovery'], - ['ssh://git@github.com:qiwi/consul-service-discovery.git', 'qiwi/consul-service-discovery'], + ['ssh://git@github.com/qiwi/consul-service-discovery.git', 'qiwi/consul-service-discovery'], + ['git+ssh://git@github.com/qiwi/consul-service-discovery.git', 'qiwi/consul-service-discovery'], ['https://github.qiwi.com/qiwi/foo.git', 'qiwi/foo'], ['http://github.qiwi.com/qiwi/foo.git', 'qiwi/foo'], // ['http://github.qi&wi.com/qiwi/foo.git', undefined], diff --git a/yarn.lock b/yarn.lock index 1d08ef8..6f60c3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2078,10 +2078,10 @@ eslint-visitor-keys@^3.4.1: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== -eslint@^8.44.0: - version "8.44.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.44.0.tgz#51246e3889b259bbcd1d7d736a0c10add4f0e500" - integrity sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A== +eslint@^8.45.0: + version "8.45.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.45.0.tgz#bab660f90d18e1364352c0a6b7c6db8edb458b78" + integrity sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.4.0" @@ -2108,7 +2108,6 @@ eslint@^8.44.0: globals "^13.19.0" graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" @@ -2120,7 +2119,6 @@ eslint@^8.44.0: natural-compare "^1.4.0" optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" espree@^9.6.0: @@ -2505,20 +2503,20 @@ gh-pages@^5.0.0: fs-extra "^8.1.0" globby "^6.1.0" -git-up@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-6.0.0.tgz#dbd6e4eee270338be847a0601e6d0763c90b74db" - integrity sha512-6RUFSNd1c/D0xtGnyWN2sxza2bZtZ/EmI9448n6rCZruFwV/ezeEn2fJP7XnUQGwf0RAtd/mmUCbtH6JPYA2SA== +git-up@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/git-up/-/git-up-7.0.0.tgz#bace30786e36f56ea341b6f69adfd83286337467" + integrity sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ== dependencies: is-ssh "^1.4.0" - parse-url "^7.0.2" + parse-url "^8.1.0" -git-url-parse@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-12.0.0.tgz#4ba70bc1e99138321c57e3765aaf7428e5abb793" - integrity sha512-I6LMWsxV87vysX1WfsoglXsXg6GjQRKq7+Dgiseo+h0skmp5Hp2rzmcEIRQot9CPA+uzU7x1x7jZdqvTFGnB+Q== +git-url-parse@^13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.1.0.tgz#07e136b5baa08d59fabdf0e33170de425adf07b4" + integrity sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA== dependencies: - git-up "^6.0.0" + git-up "^7.0.0" glob-parent@^5.1.2, glob-parent@^6.0.2: version "6.0.2" @@ -2772,7 +2770,7 @@ ignore@^5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -3966,11 +3964,6 @@ normalize-path@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" - integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== - npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" @@ -4184,22 +4177,19 @@ parse-json@^5.0.0, parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-5.0.0.tgz#f933152f3c6d34f4cf36cfc3d07b138ac113649d" - integrity sha512-qOpH55/+ZJ4jUu/oLO+ifUKjFPNZGfnPJtzvGzKN/4oLMil5m9OH4VpOj6++9/ytJcfks4kzH2hhi87GL/OU9A== +parse-path@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-7.0.0.tgz#605a2d58d0a749c8594405d8cc3a2bf76d16099b" + integrity sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog== dependencies: protocols "^2.0.0" -parse-url@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-7.0.2.tgz#d21232417199b8d371c6aec0cedf1406fd6393f0" - integrity sha512-PqO4Z0eCiQ08Wj6QQmrmp5YTTxpYfONdOEamrtvK63AmzXpcavIVQubGHxOEwiIoDZFb8uDOoQFS0NCcjqIYQg== +parse-url@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-8.1.0.tgz#972e0827ed4b57fc85f0ea6b0d839f0d8a57a57d" + integrity sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w== dependencies: - is-ssh "^1.4.0" - normalize-url "^6.1.0" - parse-path "^5.0.0" - protocols "^2.0.1" + parse-path "^7.0.0" path-exists@^4.0.0: version "4.0.0" @@ -4946,7 +4936,7 @@ strip-indent@^4.0.0: dependencies: min-indent "^1.0.1" -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -5101,11 +5091,16 @@ tslib@^2.5.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== -tslib@^2.5.2, tslib@^2.6.0: +tslib@^2.5.2: version "2.6.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== +tslib@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410" + integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"