From 3d157d587c368fc774e252f4aea9fd400083ad47 Mon Sep 17 00:00:00 2001 From: Gabriel Castro Date: Fri, 27 Mar 2020 17:02:28 -0400 Subject: [PATCH] fix(deps): upgrade jira-connector to 3.1.0 --- external-types/jira-connector.d.ts | 72 ----------------------- lib/success.ts | 7 +-- package.json | 6 +- yarn.lock | 92 ++++++++++++++++++++++++------ 4 files changed, 81 insertions(+), 96 deletions(-) delete mode 100644 external-types/jira-connector.d.ts diff --git a/external-types/jira-connector.d.ts b/external-types/jira-connector.d.ts deleted file mode 100644 index 91b81f6..0000000 --- a/external-types/jira-connector.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -declare module 'jira-connector' { - - class JiraClient { - public issue: JiraClient.IssueClient; - public version: JiraClient.VersionClient; - public project: JiraClient.ProjectClient; - - constructor (config: JiraClient.Config); - } - - namespace JiraClient { - interface Issue {} - - interface Project { - id: string; - key: string; - } - - interface Version { - self: string; - id: string; - name: string; - archived: boolean; - released: boolean; - projectId: number; - } - - interface IssueClient { - getIssue (opts: { - issueKey: string; - }): Promise; - - editIssue (opts: { - issueKey: string; - issue: { - update: { - fixVersions: { - add: { id: string }; - }[]; - }; - }; - }): Promise; - } - - interface VersionClient { - createVersion (opts: { - version: { - name: string; - projectId: number | string; - description?: string; - }; - }): Promise; - - getVersion (opts: { versionId: string | number }): Promise; - } - - interface ProjectClient { - getProject (opts: { projectIdOrKey: string | string }): Promise; - - getVersions (opts: { projectIdOrKey: string | string }): Promise; - } - - interface Config { - host: string; - basic_auth?: { - base64: string; - }; - } - } - - export = JiraClient; -} diff --git a/lib/success.ts b/lib/success.ts index 4824628..edbaf1b 100644 --- a/lib/success.ts +++ b/lib/success.ts @@ -52,10 +52,8 @@ async function findOrCreateVersion(config: PluginConfig, context: GenerateNotesC } as any; } else { newVersion = await jira.version.createVersion({ - version: { - name, - projectId: projectIdOrKey, - }, + name, + projectId: projectIdOrKey as any, }); } @@ -75,6 +73,7 @@ async function editIssueFixVersions(config: PluginConfig, context: GenerateNotes add: { id: releaseVersionId }, }], }, + properties: undefined as any, }, }); } diff --git a/package.json b/package.json index 04769ea..a565844 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ }, "dependencies": { "@semantic-release/error": "^2.2.0", - "jira-connector": "^2.16.0", + "@types/request": "^2.48.4", + "jira-connector": "^3.1.0", "lodash": "^4.17.11", "p-limit": "^2.2.2", "tslib": "^1.11.1" @@ -34,7 +35,6 @@ "resolutions": { "**/gonzales-pe/minimist": "^1.2.5", "typescript": "^3.8.3", - "**/typescript": "^3.8.3", - "**/mkdirp/minimist": "^0.2.1" + "**/typescript": "^3.8.3" } } diff --git a/yarn.lock b/yarn.lock index 87a55f0..630d97f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1034,6 +1034,11 @@ dependencies: "@babel/types" "^7.3.0" +"@types/caseless@*": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" + integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== + "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" @@ -1082,6 +1087,16 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== +"@types/request@^2.48.4": + version "2.48.4" + resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.4.tgz#df3d43d7b9ed3550feaa1286c6eabf0738e6cf7e" + integrity sha512-W1t1MTKYR8PxICH+A4HgEIPuAC3sbljoEVfyZbeFJJDbr30guDspJri2XOaM2E+Un7ZjrihaDi7cf6fPa2tbgw== + dependencies: + "@types/caseless" "*" + "@types/node" "*" + "@types/tough-cookie" "*" + form-data "^2.5.0" + "@types/signale@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@types/signale/-/signale-1.4.0.tgz#2d461d51a91eee0fc9de8398f0f2cda7cd1333bb" @@ -1094,6 +1109,11 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== +"@types/tough-cookie@*": + version "2.3.6" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.6.tgz#c880579e087d7a0db13777ff8af689f4ffc7b0d5" + integrity sha512-wHNBMnkoEBiRAd3s8KTKwIuO9biFtTf0LehITzBhSco+HQI0xkXZbLOD55SW3Aqw3oUkHstkm5SPv58yaAdFPQ== + "@types/yargs-parser@*": version "15.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" @@ -1274,6 +1294,14 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +atlassian-jwt@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/atlassian-jwt/-/atlassian-jwt-1.0.2.tgz#9dd335e15049aaef63556b15c0e484b1b5f91adf" + integrity sha512-OjruBzloZLQFDsBfOsseSCm1O7iEJIWt2t9GhKER4ar+Si7m7DOK4Tz24GdDmwGRhrsfb6KyUST/i0/luvT3TA== + dependencies: + jsuri "^1.3.1" + lodash "^4.12.0" + atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -2179,6 +2207,15 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +form-data@^2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -3035,14 +3072,16 @@ jest@^25.2.3: import-local "^3.0.2" jest-cli "^25.2.3" -jira-connector@^2.16.0: - version "2.16.1" - resolved "https://registry.yarnpkg.com/jira-connector/-/jira-connector-2.16.1.tgz#999dad1d8a9264150cfa8c281e19544c6dd2cc27" - integrity sha512-5XOfkLN2ceg0JVtFnCXJmkNSR9vleWHsVQOd/okQzi3y4cvJu+vhhSW4e1OpQP9advsbW+uhHZFy9rfLn2aT+A== +jira-connector@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jira-connector/-/jira-connector-3.1.0.tgz#90cb6e6861f8c1c9070da96e8c1f0913ea259502" + integrity sha512-eMpkYx/s+XREWC/d/dP9lXLbYQh43C0i8q+RJJFP3sMPq/Dq2NLHrymgCIb2tFrxxwvfZ/yHBBv+rU3MD66OrQ== dependencies: - mime-types "^2.1.24" - oauth "^0.9.12" - request "^2.83.0" + atlassian-jwt "^1.0.2" + mime-types "^2.1.25" + oauth "^0.9.15" + query-string "^6.9.0" + request "^2.88.0" "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" @@ -3136,6 +3175,11 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" +jsuri@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsuri/-/jsuri-1.3.1.tgz#cd93fc6a87b255142cb7b0f479f00517ab9395ed" + integrity sha1-zZP8aoeyVRQst7D0efAFF6uTle0= + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -3205,7 +3249,7 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= -lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.15: +lodash@^4.12.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.15: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -3337,7 +3381,7 @@ mime-db@1.43.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== -mime-types@^2.1.12, mime-types@^2.1.24, mime-types@~2.1.19: +mime-types@^2.1.12, mime-types@^2.1.25, mime-types@~2.1.19: version "2.1.26" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== @@ -3356,16 +3400,11 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@1.1.x, minimist@^1.1.1, minimist@^1.2.0: +minimist@1.1.x, minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minimist@^0.2.1, minimist@^1.2.5: - version "0.2.1" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.2.1.tgz#827ba4e7593464e7c221e8c5bed930904ee2c455" - integrity sha512-GY8fANSrTMfBVfInqJAY41QkOM+upUTytK1jZ0c8+3HdHrJxBJ3rF5i9moClXTE8uUSnUo8cAsCoxDXvSY4DHg== - mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -3514,7 +3553,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -oauth@^0.9.12: +oauth@^0.9.15: version "0.9.15" resolved "https://registry.yarnpkg.com/oauth/-/oauth-0.9.15.tgz#bd1fefaf686c96b75475aed5196412ff60cfb9c1" integrity sha1-vR/vr2hslrdUda7VGWQS/2DPucE= @@ -3839,6 +3878,15 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +query-string@^6.9.0: + version "6.11.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.11.1.tgz#ab021f275d463ce1b61e88f0ce6988b3e8fe7c2c" + integrity sha512-1ZvJOUl8ifkkBxu2ByVM/8GijMIPx+cef7u3yroO3Ogm4DOdZcF5dcrWTIlSHe3Pg/mtlt6/eFjObDfJureZZA== + dependencies: + decode-uri-component "^0.2.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -3965,7 +4013,7 @@ request-promise-native@^1.0.7: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@^2.83.0, request@^2.88.0: +request@^2.88.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -4268,6 +4316,11 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -4313,6 +4366,11 @@ stealthy-require@^1.1.1: resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + string-length@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-3.1.0.tgz#107ef8c23456e187a8abd4a61162ff4ac6e25837"