From ffead50d0774ace5aeb9402297015f870c6b73ce Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Sun, 17 Dec 2017 14:45:10 -0500 Subject: [PATCH] Update github dep --- package.json | 4 +- source/platforms/github/GitHubAPI.ts | 7 +- source/runner/jsonToDSL.ts | 1 - yarn.lock | 99 +++++++++++++--------------- 4 files changed, 50 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index 8bb3bb0e9..cd410b332 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "commander": "^2.12.2", "debug": "^3.1.0", "get-stdin": "^5.0.1", - "github": "^11", + "github": "^13.0.1", "hyperlinker": "^1.0.0", "jsome": "^2.3.25", "jsonpointer": "^4.0.1", @@ -120,7 +120,7 @@ "pinpoint": "^1.1.0", "readline-sync": "^1.4.7", "require-from-string": "^2.0.1", - "rfc6902": "^2.0.0", + "rfc6902": "^2.2.2", "supports-hyperlinks": "^1.0.1", "vm2": "patriksimek/vm2#custom_files", "voca": "^1.3.1" diff --git a/source/platforms/github/GitHubAPI.ts b/source/platforms/github/GitHubAPI.ts index 47116900e..e7256337f 100644 --- a/source/platforms/github/GitHubAPI.ts +++ b/source/platforms/github/GitHubAPI.ts @@ -43,7 +43,6 @@ export class GitHubAPI { headers: { ...this.additionalHeaders, }, - Promise, }) if (this.token) { @@ -135,7 +134,7 @@ export class GitHubAPI { const prID = this.repoMetadata.pullRequestID const res = await this.get(`repos/${repo}/pulls/${prID}`) - return res.ok ? res.json() as Promise : {} as GitHubPRDSL + return res.ok ? (res.json() as Promise) : ({} as GitHubPRDSL) } /** @@ -184,7 +183,9 @@ export class GitHubAPI { page = getNextPageFromLinkHeader(response) } else { this.d( - `getPullRequestCommits:: Failed to get response while traverse page ${page} with ${response.status}, bailing rest of pages if exists` + `getPullRequestCommits:: Failed to get response while traverse page ${page} with ${ + response.status + }, bailing rest of pages if exists` ) page = -1 } diff --git a/source/runner/jsonToDSL.ts b/source/runner/jsonToDSL.ts index 1e30085d2..6f10c302a 100644 --- a/source/runner/jsonToDSL.ts +++ b/source/runner/jsonToDSL.ts @@ -25,7 +25,6 @@ const githubAPIForDSL = (dsl: DangerDSLJSONType) => { headers: { ...dsl.settings.github.additionalHeaders, }, - Promise, }) if (dsl.settings.github && dsl.settings.github.accessToken) { diff --git a/yarn.lock b/yarn.lock index 80a35cca1..0a2d9f1cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -95,12 +95,11 @@ address@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" -agent-base@2: - version "2.0.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.0.1.tgz#bd8f9e86a8eb221fffa07bd14befd55df142815e" +agent-base@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.1.2.tgz#80fa6cde440f4dcf9af2617cf246099b5d99f0c8" dependencies: - extend "~3.0.0" - semver "~5.0.1" + es6-promisify "^5.0.0" ajv@^4.9.1: version "4.11.8" @@ -1555,12 +1554,6 @@ date-fns@^1.28.3: version "1.28.3" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.3.tgz#145d87adc3f5a82c6bda668de97eee1132c97ea1" -debug@2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" - dependencies: - ms "0.7.2" - debug@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" @@ -1751,6 +1744,10 @@ dot-prop@^4.1.0: dependencies: is-obj "^1.0.0" +dotenv@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d" + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -1816,6 +1813,16 @@ es6-object-assign@^1.0.3: version "1.1.0" resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" +es6-promise@^4.0.3: + version "4.1.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + dependencies: + es6-promise "^4.0.3" + escape-html@1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -1980,10 +1987,6 @@ extend-shallow@^2.0.1: dependencies: is-extendable "^0.1.0" -extend@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" - extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" @@ -2100,13 +2103,6 @@ find@0.2.6: dependencies: traverse-chain "~0.1.0" -follow-redirects@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-0.0.7.tgz#34b90bab2a911aa347571da90f22bd36ecd8a919" - dependencies: - debug "^2.2.0" - stream-consume "^0.1.0" - for-in@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -2282,14 +2278,16 @@ git-config-path@^1.0.1: fs-exists-sync "^0.1.0" homedir-polyfill "^1.0.0" -github@^11: - version "11.0.0" - resolved "https://registry.yarnpkg.com/github/-/github-11.0.0.tgz#edb32df5efb33cad004ebf0bdd2a4b30bb63a854" +github@^13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/github/-/github-13.0.1.tgz#4ccf4a41df662f92367e77a474674eabb1b6c78d" dependencies: - follow-redirects "0.0.7" - https-proxy-agent "^1.0.0" - mime "^1.2.11" - netrc "^0.1.4" + debug "^3.1.0" + dotenv "^4.0.0" + https-proxy-agent "^2.1.0" + lodash "^4.17.4" + proxy-from-env "^1.0.0" + url-template "^2.0.8" glob-base@^0.3.0: version "0.3.0" @@ -2557,13 +2555,12 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-proxy-agent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6" +https-proxy-agent@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.1.1.tgz#a7ce4382a1ba8266ee848578778122d491260fd9" dependencies: - agent-base "2" - debug "2" - extend "3" + agent-base "^4.1.0" + debug "^3.1.0" husky@^0.14.0: version "0.14.3" @@ -3648,7 +3645,7 @@ mime-types@^2.1.12, mime-types@~2.1.16, mime-types@~2.1.17, mime-types@~2.1.7: dependencies: mime-db "~1.30.0" -mime@1.3.4, mime@^1.2.11: +mime@1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" @@ -3710,10 +3707,6 @@ ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" -ms@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -3742,10 +3735,6 @@ negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" -netrc@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/netrc/-/netrc-0.1.4.tgz#6be94fcaca8d77ade0a9670dc460914c94472444" - node-cleanup@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" @@ -4253,6 +4242,10 @@ progress@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" +proxy-from-env@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" + prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" @@ -4602,9 +4595,9 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" -rfc6902@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/rfc6902/-/rfc6902-2.2.1.tgz#28a7ffb8d1982ae1e49f682821e142d08a235a7b" +rfc6902@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/rfc6902/-/rfc6902-2.2.2.tgz#518a4e9caac1688f3d94c9df2fdcdb6ce21f29be" right-align@^0.1.1: version "0.1.3" @@ -4671,10 +4664,6 @@ semver-diff@^2.0.0: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" -semver@~5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" - send@0.15.3: version "0.15.3" resolved "https://registry.yarnpkg.com/send/-/send-0.15.3.tgz#5013f9f99023df50d1bd9892c19e3defd1d53309" @@ -4865,10 +4854,6 @@ staged-git-files@0.0.4: version "1.3.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" -stream-consume@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" - stream-to-observable@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10" @@ -5331,6 +5316,10 @@ url-parse-lax@^1.0.0: dependencies: prepend-http "^1.0.1" +url-template@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" + user-home@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"