danger 10.8.0 → 11.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.js +66 -0
  3. package/.prettierignore +1 -0
  4. package/.release-it.json +1 -0
  5. package/CHANGELOG.md +104 -30
  6. package/README.md +1 -1
  7. package/SECURITY.md +9 -0
  8. package/distribution/api/fetch.d.ts +1 -1
  9. package/distribution/api/fetch.js +18 -18
  10. package/distribution/api/fetch.js.map +1 -1
  11. package/distribution/ci_source/ci_source_helpers.js +3 -3
  12. package/distribution/ci_source/ci_source_helpers.js.map +1 -1
  13. package/distribution/ci_source/get_ci_source.js +14 -11
  14. package/distribution/ci_source/get_ci_source.js.map +1 -1
  15. package/distribution/ci_source/providers/AppCenter.js +6 -6
  16. package/distribution/ci_source/providers/AppCenter.js.map +1 -1
  17. package/distribution/ci_source/providers/Bamboo.js +4 -4
  18. package/distribution/ci_source/providers/Bamboo.js.map +1 -1
  19. package/distribution/ci_source/providers/BitbucketPipelines.js +3 -3
  20. package/distribution/ci_source/providers/BitbucketPipelines.js.map +1 -1
  21. package/distribution/ci_source/providers/Bitrise.js +3 -3
  22. package/distribution/ci_source/providers/Bitrise.js.map +1 -1
  23. package/distribution/ci_source/providers/BuddyBuild.js +2 -2
  24. package/distribution/ci_source/providers/BuddyBuild.js.map +1 -1
  25. package/distribution/ci_source/providers/BuddyWorks.js +2 -2
  26. package/distribution/ci_source/providers/BuddyWorks.js.map +1 -1
  27. package/distribution/ci_source/providers/Buildkite.js +2 -2
  28. package/distribution/ci_source/providers/Buildkite.js.map +1 -1
  29. package/distribution/ci_source/providers/Circle.js +4 -4
  30. package/distribution/ci_source/providers/Circle.js.map +1 -1
  31. package/distribution/ci_source/providers/Cirrus.js +3 -3
  32. package/distribution/ci_source/providers/Cirrus.js.map +1 -1
  33. package/distribution/ci_source/providers/CodeBuild.js +3 -3
  34. package/distribution/ci_source/providers/CodeBuild.js.map +1 -1
  35. package/distribution/ci_source/providers/Codefresh.js +4 -4
  36. package/distribution/ci_source/providers/Codefresh.js.map +1 -1
  37. package/distribution/ci_source/providers/Codemagic.js +4 -4
  38. package/distribution/ci_source/providers/Codemagic.js.map +1 -1
  39. package/distribution/ci_source/providers/Codeship.js +3 -3
  40. package/distribution/ci_source/providers/Codeship.js.map +1 -1
  41. package/distribution/ci_source/providers/Concourse.js +2 -2
  42. package/distribution/ci_source/providers/Concourse.js.map +1 -1
  43. package/distribution/ci_source/providers/DockerCloud.js +4 -4
  44. package/distribution/ci_source/providers/DockerCloud.js.map +1 -1
  45. package/distribution/ci_source/providers/Drone.js +2 -2
  46. package/distribution/ci_source/providers/Drone.js.map +1 -1
  47. package/distribution/ci_source/providers/Fake.js +4 -4
  48. package/distribution/ci_source/providers/Fake.js.map +1 -1
  49. package/distribution/ci_source/providers/GitHubActions.js +3 -3
  50. package/distribution/ci_source/providers/GitHubActions.js.map +1 -1
  51. package/distribution/ci_source/providers/GitLabCI.js +2 -2
  52. package/distribution/ci_source/providers/GitLabCI.js.map +1 -1
  53. package/distribution/ci_source/providers/Jenkins.js +6 -6
  54. package/distribution/ci_source/providers/Jenkins.js.map +1 -1
  55. package/distribution/ci_source/providers/Netlify.js +2 -2
  56. package/distribution/ci_source/providers/Netlify.js.map +1 -1
  57. package/distribution/ci_source/providers/Nevercode.js +3 -3
  58. package/distribution/ci_source/providers/Nevercode.js.map +1 -1
  59. package/distribution/ci_source/providers/Screwdriver.js +2 -2
  60. package/distribution/ci_source/providers/Screwdriver.js.map +1 -1
  61. package/distribution/ci_source/providers/Semaphore.js +2 -2
  62. package/distribution/ci_source/providers/Semaphore.js.map +1 -1
  63. package/distribution/ci_source/providers/Surf.js +2 -2
  64. package/distribution/ci_source/providers/Surf.js.map +1 -1
  65. package/distribution/ci_source/providers/TeamCity.js +5 -5
  66. package/distribution/ci_source/providers/TeamCity.js.map +1 -1
  67. package/distribution/ci_source/providers/Travis.js +3 -3
  68. package/distribution/ci_source/providers/Travis.js.map +1 -1
  69. package/distribution/ci_source/providers/VSTS.js +2 -2
  70. package/distribution/ci_source/providers/VSTS.js.map +1 -1
  71. package/distribution/ci_source/providers/XcodeCloud.js +2 -2
  72. package/distribution/ci_source/providers/XcodeCloud.js.map +1 -1
  73. package/distribution/commands/ci/resetStatus.js +7 -6
  74. package/distribution/commands/ci/resetStatus.js.map +1 -1
  75. package/distribution/commands/ci/runner.js +13 -12
  76. package/distribution/commands/ci/runner.js.map +1 -1
  77. package/distribution/commands/danger-ci.js +2 -2
  78. package/distribution/commands/danger-ci.js.map +1 -1
  79. package/distribution/commands/danger-init.js +19 -19
  80. package/distribution/commands/danger-init.js.map +1 -1
  81. package/distribution/commands/danger-local.js +5 -5
  82. package/distribution/commands/danger-local.js.map +1 -1
  83. package/distribution/commands/danger-pr.js +12 -12
  84. package/distribution/commands/danger-pr.js.map +1 -1
  85. package/distribution/commands/danger-process.js +10 -10
  86. package/distribution/commands/danger-process.js.map +1 -1
  87. package/distribution/commands/danger-reset-status.js +2 -2
  88. package/distribution/commands/danger-reset-status.js.map +1 -1
  89. package/distribution/commands/danger-runner.js +15 -17
  90. package/distribution/commands/danger-runner.js.map +1 -1
  91. package/distribution/commands/init/add-to-ci.js +16 -13
  92. package/distribution/commands/init/add-to-ci.js.map +1 -1
  93. package/distribution/commands/init/default-dangerfile.js +13 -9
  94. package/distribution/commands/init/default-dangerfile.js.map +1 -1
  95. package/distribution/commands/init/get-repo-slug.js +3 -2
  96. package/distribution/commands/init/get-repo-slug.js.map +1 -1
  97. package/distribution/commands/init/interfaces.d.ts +3 -3
  98. package/distribution/commands/init/state-setup.js +9 -7
  99. package/distribution/commands/init/state-setup.js.map +1 -1
  100. package/distribution/commands/utils/chainsmoker.js +2 -2
  101. package/distribution/commands/utils/chainsmoker.js.map +1 -1
  102. package/distribution/commands/utils/dangerRunToRunnerCLI.js +1 -1
  103. package/distribution/commands/utils/dangerRunToRunnerCLI.js.map +1 -1
  104. package/distribution/commands/utils/fileUtils.js +5 -5
  105. package/distribution/commands/utils/fileUtils.js.map +1 -1
  106. package/distribution/commands/utils/getRuntimeCISource.js +2 -2
  107. package/distribution/commands/utils/getRuntimeCISource.js.map +1 -1
  108. package/distribution/commands/utils/reporting.js +18 -13
  109. package/distribution/commands/utils/reporting.js.map +1 -1
  110. package/distribution/commands/utils/runDangerSubprocess.d.ts +1 -0
  111. package/distribution/commands/utils/runDangerSubprocess.js +26 -20
  112. package/distribution/commands/utils/runDangerSubprocess.js.map +1 -1
  113. package/distribution/commands/utils/validateDangerfileExists.js +3 -3
  114. package/distribution/commands/utils/validateDangerfileExists.js.map +1 -1
  115. package/distribution/danger.d.ts +11 -4
  116. package/distribution/danger.js.flow +2 -2
  117. package/distribution/debug.js +3 -2
  118. package/distribution/debug.js.map +1 -1
  119. package/distribution/dsl/DangerResults.js +27 -22
  120. package/distribution/dsl/DangerResults.js.map +1 -1
  121. package/distribution/dsl/GitDSL.d.ts +2 -1
  122. package/distribution/dsl/Violation.js +2 -1
  123. package/distribution/dsl/Violation.js.map +1 -1
  124. package/distribution/platforms/BitBucketCloud.js +2 -2
  125. package/distribution/platforms/BitBucketCloud.js.map +1 -1
  126. package/distribution/platforms/BitBucketServer.js +6 -5
  127. package/distribution/platforms/BitBucketServer.js.map +1 -1
  128. package/distribution/platforms/FakePlatform.d.ts +5 -0
  129. package/distribution/platforms/FakePlatform.js +3 -2
  130. package/distribution/platforms/FakePlatform.js.map +1 -1
  131. package/distribution/platforms/GitHub.js +17 -16
  132. package/distribution/platforms/GitHub.js.map +1 -1
  133. package/distribution/platforms/GitLab.js +7 -6
  134. package/distribution/platforms/GitLab.js.map +1 -1
  135. package/distribution/platforms/LocalGit.js +5 -5
  136. package/distribution/platforms/LocalGit.js.map +1 -1
  137. package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.js +26 -26
  138. package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.js.map +1 -1
  139. package/distribution/platforms/bitbucket_cloud/BitBucketCloudGit.js +5 -4
  140. package/distribution/platforms/bitbucket_cloud/BitBucketCloudGit.js.map +1 -1
  141. package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_api.test.js +6 -6
  142. package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_api.test.js.map +1 -1
  143. package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js +37 -28
  144. package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js.map +1 -1
  145. package/distribution/platforms/bitbucket_server/BitBucketServerAPI.js +22 -22
  146. package/distribution/platforms/bitbucket_server/BitBucketServerAPI.js.map +1 -1
  147. package/distribution/platforms/bitbucket_server/BitBucketServerGit.js +58 -22
  148. package/distribution/platforms/bitbucket_server/BitBucketServerGit.js.map +1 -1
  149. package/distribution/platforms/git/diffToGitJSONDSL.js +4 -3
  150. package/distribution/platforms/git/diffToGitJSONDSL.js.map +1 -1
  151. package/distribution/platforms/git/gitJSONToGitDSL.d.ts +3 -12
  152. package/distribution/platforms/git/gitJSONToGitDSL.js +27 -20
  153. package/distribution/platforms/git/gitJSONToGitDSL.js.map +1 -1
  154. package/distribution/platforms/git/localGetCommits.js +4 -3
  155. package/distribution/platforms/git/localGetCommits.js.map +1 -1
  156. package/distribution/platforms/git/localGetDiff.js +6 -5
  157. package/distribution/platforms/git/localGetDiff.js.map +1 -1
  158. package/distribution/platforms/git/localGetFileAtSHA.js +6 -5
  159. package/distribution/platforms/git/localGetFileAtSHA.js.map +1 -1
  160. package/distribution/platforms/git/localLogGitCommits.d.ts +1 -1
  161. package/distribution/platforms/git/localLogGitCommits.js +4 -3
  162. package/distribution/platforms/git/localLogGitCommits.js.map +1 -1
  163. package/distribution/platforms/github/GitHubAPI.d.ts +5 -0
  164. package/distribution/platforms/github/GitHubAPI.js +67 -38
  165. package/distribution/platforms/github/GitHubAPI.js.map +1 -1
  166. package/distribution/platforms/github/GitHubGit.js +7 -5
  167. package/distribution/platforms/github/GitHubGit.js.map +1 -1
  168. package/distribution/platforms/github/GitHubUtils.d.ts +1108 -1
  169. package/distribution/platforms/github/GitHubUtils.js +47 -28
  170. package/distribution/platforms/github/GitHubUtils.js.map +1 -1
  171. package/distribution/platforms/github/comms/checks/githubAppSupport.js +8 -7
  172. package/distribution/platforms/github/comms/checks/githubAppSupport.js.map +1 -1
  173. package/distribution/platforms/github/comms/checks/resultsToCheck.js +20 -18
  174. package/distribution/platforms/github/comms/checks/resultsToCheck.js.map +1 -1
  175. package/distribution/platforms/github/comms/checksCommenter.js +20 -16
  176. package/distribution/platforms/github/comms/checksCommenter.js.map +1 -1
  177. package/distribution/platforms/github/comms/issueCommenter.d.ts +5 -0
  178. package/distribution/platforms/github/comms/issueCommenter.js +21 -8
  179. package/distribution/platforms/github/comms/issueCommenter.js.map +1 -1
  180. package/distribution/platforms/github/customGitHubRequire.js +33 -28
  181. package/distribution/platforms/github/customGitHubRequire.js.map +1 -1
  182. package/distribution/platforms/gitlab/GitLabAPI.d.ts +1 -1
  183. package/distribution/platforms/gitlab/GitLabAPI.js +10 -10
  184. package/distribution/platforms/gitlab/GitLabAPI.js.map +1 -1
  185. package/distribution/platforms/gitlab/GitLabGit.js +9 -7
  186. package/distribution/platforms/gitlab/GitLabGit.js.map +1 -1
  187. package/distribution/platforms/platform.d.ts +6 -0
  188. package/distribution/platforms/platform.js +6 -6
  189. package/distribution/platforms/platform.js.map +1 -1
  190. package/distribution/platforms/pullRequestParser.js +4 -4
  191. package/distribution/platforms/pullRequestParser.js.map +1 -1
  192. package/distribution/runner/DangerUtils.js +3 -2
  193. package/distribution/runner/DangerUtils.js.map +1 -1
  194. package/distribution/runner/Executor.d.ts +1 -0
  195. package/distribution/runner/Executor.js +79 -42
  196. package/distribution/runner/Executor.js.map +1 -1
  197. package/distribution/runner/dangerDSLJSON.js.map +1 -1
  198. package/distribution/runner/dslGenerator.js +3 -2
  199. package/distribution/runner/dslGenerator.js.map +1 -1
  200. package/distribution/runner/jsonToContext.js +2 -2
  201. package/distribution/runner/jsonToContext.js.map +1 -1
  202. package/distribution/runner/jsonToDSL.js +16 -15
  203. package/distribution/runner/jsonToDSL.js.map +1 -1
  204. package/distribution/runner/runners/inline.js +10 -9
  205. package/distribution/runner/runners/inline.js.map +1 -1
  206. package/distribution/runner/runners/utils/resultsForCaughtError.js +3 -3
  207. package/distribution/runner/runners/utils/resultsForCaughtError.js.map +1 -1
  208. package/distribution/runner/runners/utils/transpiler.js +36 -29
  209. package/distribution/runner/runners/utils/transpiler.js.map +1 -1
  210. package/distribution/runner/templates/bitbucketCloudTemplate.js +18 -14
  211. package/distribution/runner/templates/bitbucketCloudTemplate.js.map +1 -1
  212. package/distribution/runner/templates/bitbucketServerTemplate.js +17 -13
  213. package/distribution/runner/templates/bitbucketServerTemplate.js.map +1 -1
  214. package/distribution/runner/templates/exceptionRaisedTemplate.js +1 -1
  215. package/distribution/runner/templates/exceptionRaisedTemplate.js.map +1 -1
  216. package/distribution/runner/templates/githubIssueTemplate.js +23 -19
  217. package/distribution/runner/templates/githubIssueTemplate.js.map +1 -1
  218. package/distribution/runner/templates/markdownTableTemplate.js +3 -3
  219. package/distribution/runner/templates/markdownTableTemplate.js.map +1 -1
  220. package/package.json +38 -30
  221. package/tsconfig.spec.json +4 -0
package/.eslintignore ADDED
@@ -0,0 +1,2 @@
1
+ source/danger.d.ts
2
+ source/runner/_tests/fixtures/*.ts
package/.eslintrc.js ADDED
@@ -0,0 +1,66 @@
1
+ module.exports = {
2
+ env: {
3
+ browser: true,
4
+ es6: true,
5
+ node: true,
6
+ },
7
+ extends: ["plugin:@typescript-eslint/recommended", "plugin:jest/recommended", "prettier"],
8
+ parser: "@typescript-eslint/parser",
9
+ parserOptions: {
10
+ project: "tsconfig.spec.json",
11
+ sourceType: "module",
12
+ },
13
+ plugins: ["eslint-plugin-jest", "eslint-plugin-jsdoc", "@typescript-eslint"],
14
+ rules: {
15
+ "@typescript-eslint/naming-convention": "error",
16
+ "@typescript-eslint/no-empty-function": "error",
17
+ "@typescript-eslint/no-unused-expressions": "error",
18
+
19
+ // Something is grumpy about these rules re: node imports - TODO
20
+ "@typescript-eslint/no-require-imports": "off",
21
+ "@typescript-eslint/no-var-requires": "off",
22
+
23
+ curly: "error",
24
+ "jsdoc/check-alignment": "error",
25
+ "jsdoc/check-indentation": "off",
26
+ "jsdoc/newline-after-description": "off",
27
+ "no-empty": "error",
28
+ // This is used intentionally in a bunch of ci_source/providers
29
+ "no-empty-function": "off",
30
+ "no-redeclare": "error",
31
+ "no-var": "error",
32
+ // There are a bunch of existing uses of 'let' where this rule would trigger
33
+ "prefer-const": "off",
34
+
35
+ // This project has a ton of interacting APIs, and sometimes it's helpful to be explicit, even if the type is trivial
36
+ "@typescript-eslint/no-inferrable-types": "off",
37
+
38
+ "no-unused-expressions": "off",
39
+ "@typescript-eslint/no-unused-expressions": "error",
40
+
41
+ "no-unused-vars": "off",
42
+ "@typescript-eslint/no-unused-vars": [
43
+ "warn",
44
+ {
45
+ // Allow function args to be unused
46
+ args: "none",
47
+ argsIgnorePattern: "^_",
48
+ varsIgnorePattern: "^_",
49
+ caughtErrorsIgnorePattern: "^_",
50
+ },
51
+ ],
52
+
53
+ "jest/no-disabled-tests": "warn",
54
+ "jest/no-focused-tests": "error",
55
+ "jest/no-identical-title": "error",
56
+ "jest/prefer-to-have-length": "off",
57
+ "jest/valid-expect": "error",
58
+ "@typescript-eslint/no-non-null-assertion": "off",
59
+ // Tons of violations in the codebase
60
+ "@typescript-eslint/naming-convention": "off",
61
+ // Used liberally in the codebase
62
+ "@typescript-eslint/no-explicit-any": "off",
63
+ // This has value in communicating with other Developers even if it has no functional effect.
64
+ "@typescript-eslint/no-empty-interface": "off",
65
+ },
66
+ }
package/.prettierignore CHANGED
@@ -2,3 +2,4 @@ source/danger-outgoing-process-schema.json
2
2
  source/danger-incoming-process-schema.json
3
3
  source/platforms/_tests/fixtures/bbs-dsl-input.json
4
4
  source/platforms/_tests/fixtures/bbc-dsl-input.json
5
+ CHANGELOG.md
package/.release-it.json CHANGED
@@ -6,6 +6,7 @@
6
6
  "buildCommand": "yarn package",
7
7
  "hooks": {
8
8
  "before:bump": "yarn declarations; yarn build:schemas",
9
+ "after:bump": "yarn package",
9
10
  "after:release": "VERSION=${version} scripts/create-homebrew-tap-pr.sh"
10
11
  }
11
12
  }
package/CHANGELOG.md CHANGED
@@ -6,8 +6,9 @@
6
6
  // These docs are aimed at users rather than danger developers, so please limit technical
7
7
  // terminology in here.
8
8
 
9
- // Note: if this is your first PR, you'll need to add your URL to the footnotes
10
- // see the bottom of this file. The list there is sorted, try to follow that.
9
+ // Note: if this is your first PR, you'll need to add your link to your
10
+ // username handle to the footnotes. see the bottom of this file.
11
+ // The list there is sorted, try to follow that.
11
12
 
12
13
  -->
13
14
 
@@ -17,6 +18,27 @@
17
18
 
18
19
  <!-- Your comment above this -->
19
20
 
21
+ # 11.0.3
22
+
23
+ - Bump up @babel/* plugins for Core-JS support. [@parvez]
24
+ - Replace deprecated @Babel/polyfill dependency with Core-JS + Regenerator-Runtime. [@gpetrioli]
25
+ - *Fix:* / *Improvement* Don't drop inline comments which fall outside of the diff in GitHub PRs - [#1272](https://github.com/danger/danger-js/pull/1272) [@rouby]
26
+
27
+ - *Chore:* Switch from tslint to eslint (tslint is end-of-life) - [#1205](https://github.com/danger/danger-js/pull/1205) [@fbartho]
28
+
29
+ # 11.0.0 -> 11.0.2
30
+
31
+ - *Breaking:* Upgrade @octokit/rest from ^16.43.1 to ^18.12.0 - [#1204](https://github.com/danger/danger-js/pull/1204) [@fbartho]
32
+
33
+ This is only likely to hit you if you use `danger.github.api` pretty extensively in your Dangerfiles, but better to keep an eye out.
34
+
35
+ # 10.8.1
36
+
37
+
38
+ - Fix: [Github] Multiple Inline Comments on the same file/line should all be posted [#1176](https://github.com/danger/danger-js/pull/1176) [@Rouby]
39
+ - Fix: [git] JSONDiffForFile when passed the path of a JSON File that was moved, crashes [#1193](https://github.com/danger/danger-js/pull/1193) [@fbartho]
40
+ - Resolve node-fetch dependency to 2.6.7 to resolve [GHSA-r683-j2x4-v87g](https://github.com/advisories/GHSA-r683-j2x4-v87g) [@jonny133]
41
+
20
42
  # 10.8.0
21
43
 
22
44
  - Feature: `danger local --outputJSON` for [#1177](https://github.com/danger/danger-js/pull/1177) [@orta]
@@ -89,13 +111,13 @@
89
111
 
90
112
  # 10.5.0
91
113
 
92
- - Handle deprecations for the APIs used with `--use-github-checks` #1073 [@wardpeet](https://github.com/wardpeet)
114
+ - Handle deprecations for the APIs used with `--use-github-checks` #1073 [@wardpeet]
93
115
 
94
116
  # 10.4.1
95
117
 
96
118
  - Improved `tsconfig.json` file lookup strategy: it now looks for it starting from the location of the danger file.
97
- #1068 [@igorbek](https://github.com/igorbek)
98
- - Upgrade node-fetch to 2.6.1 to fix GHSA-w7rc-rwvf-8q5r. #1071 [@hmcc](https://github.com/hmcc)
119
+ #1068 [@igorbek]
120
+ - Upgrade node-fetch to 2.6.1 to fix GHSA-w7rc-rwvf-8q5r. #1071 [@hmcc]
99
121
 
100
122
  # 10.4.0
101
123
 
@@ -108,7 +130,7 @@
108
130
  DANGER_MANUAL_GH_REPO: ${{ steps.pr_info.outputs.repo }}
109
131
  DANGER_MANUAL_PR: ${{ steps.pr_info.outputs.number }}
110
132
  ```
111
- Which looks more intentional instead of: `DANGER_FAKE_CI` etc. [@orta](https://github.com/orta)
133
+ Which looks more intentional instead of: `DANGER_FAKE_CI` etc. [@orta]
112
134
 
113
135
  # 10.3.1
114
136
 
@@ -121,7 +143,7 @@
121
143
 
122
144
  # 10.2.2
123
145
 
124
- - Add support for `danger local` on repos without a master branch - [@ahobson](https://github.com/ahobson)
146
+ - Add support for `danger local` on repos without a master branch - [@ahobson]
125
147
 
126
148
  # 10.2.1
127
149
 
@@ -161,7 +183,7 @@
161
183
  - Don't use hardcoded userId to update comments if using personal token in Github Actions - [@rohit-gohri]
162
184
  - Disable warning in Github Action if using DANGER_GITHUB_API_TOKEN - [@rohit-gohri]
163
185
  - Update `parse-diff` library - [@417-72KI]
164
- - Fix repository slug in Jenkins provider - [sandratatarevicova]
186
+ - Fix repository slug in Jenkins provider - [@sandratatarevicova]
165
187
  - Add Gitlab diff support - [@rohit-gohri]
166
188
  - Fix Typos across danger-js Repo - [@yohix]
167
189
  - Fix `@octokit/rest` deprecation warning when using `.issues.addLabels()` - [@sogame]
@@ -334,7 +356,7 @@
334
356
 
335
357
  # 7.0.19
336
358
 
337
- - Taken a stab at trying to make the commit status summary to feel better in both Danger & Peril [@orta][@dblandin]
359
+ - Taken a stab at trying to make the commit status summary to feel better in both Danger & Peril [@orta], [@dblandin]
338
360
 
339
361
  # 7.0.18
340
362
 
@@ -715,7 +737,7 @@ Also, `danger pr` now accepts a `--process` arg.
715
737
 
716
738
  # 3.7.17
717
739
 
718
- - Improvements to PR detection on Team City - @markelog
740
+ - Improvements to PR detection on Team City - [@markelog]
719
741
 
720
742
  # 3.7.16
721
743
 
@@ -1849,72 +1871,124 @@ That should do ya. I think. This doesn't support babel, and I haven't explored u
1849
1871
 
1850
1872
  Not usable for others, only stubs of classes etc. - [@orta]
1851
1873
 
1852
- [danger-swift]: https://github.com/danger/danger-swift#danger-swift
1853
- [danger-go]: https://github.com/bdotdub/danger-go
1874
+ [@417-72ki]: https://github.com/417-72KI
1875
+ [@HonzaMac]: https://github.com/HonzaMac
1876
+ [@JanStevens]: https://github.com/JanStevens
1877
+ [@RDIL]: https://github.com/RDIL
1878
+ [@Teamop]: https://github.com/Teamop
1879
+ [@adam-bratin]: https://github.com/adam-bratin
1854
1880
  [@adam-moss]: https://github.com/adam-moss
1855
1881
  [@adamnoakes]: https://github.com/adamnoakes
1856
1882
  [@aghassi]: https://github.com/aghassi
1883
+ [@ahobson]: https://github.com/ahobson
1884
+ [@alexandermendes]: https://github.com/alexandermendes
1885
+ [@andykenward]: https://github.com/andykenward
1857
1886
  [@ashfurrow]: https://github.com/ashfurrow
1887
+ [@awgeorge]: https://github.com/awgeorge
1858
1888
  [@azz]: https://github.com/azz
1889
+ [@bdotdub]: https://github.com/bdotdub
1890
+ [@bigkraig]: https://github.com/bigkraig
1859
1891
  [@caffodian]: https://github.com/caffodian
1860
1892
  [@codestergit]: https://github.com/codestergit
1861
1893
  [@cwright017]: https://github.com/Cwright017
1862
1894
  [@cysp]: https://github.com/cysp
1863
1895
  [@danielrosenwasser]: https://github.com/DanielRosenwasser
1864
1896
  [@davidbrunow]: https://github.com/davidbrunow
1897
+ [@davidhouweling]: https://github.com/davidhouweling
1898
+ [@dbgrandi]: https://github.com/dbgrandi
1899
+ [@dblandin]: https://github.com/dblandin
1900
+ [@denieler]: https://github.com/denieler
1865
1901
  [@dfalling]: https://github.com/dfalling
1866
1902
  [@dkundel]: https://github.com/dkundel
1903
+ [@doniyor2109]: https://github.com/doniyor2109
1904
+ [@ds300]: https://github.com/ds300
1867
1905
  [@f-meloni]: https://github.com/f-meloni
1868
1906
  [@fbartho]: https://github.com/fbartho
1907
+ [@flovilmart]: https://github.com/flovilmart
1908
+ [@friederbluemle]: https://github.com/friederbluemle
1869
1909
  [@fwal]: https://github.com/fwal
1910
+ [@g3offrey]: https://github.com/g3offrey
1911
+ [@gantman]: https://github.com/gantman
1912
+ [@gpetrioli]: https:/github.com/gpetrioli
1913
+ [@gzaripov]: https://github.com/gzaripov
1914
+ [@hanneskaeufler]: https://github.com/hanneskaeufler
1870
1915
  [@happylinks]: https://github.com/happylinks
1916
+ [@hellocore]: https://github.com/HelloCore
1917
+ [@hiroppy]: https://github.com/hiroppy
1871
1918
  [@hmcc]: https://github.com/hmcc
1919
+ [@hmschreiner]: https://github.com/hmschreiner
1872
1920
  [@hongrich]: https://github.com/hongrich
1873
- [@hellocore]: https://github.com/HelloCore
1921
+ [@igorbek]: https://github.com/igorbek
1922
+ [@iljadaderko]: https://github.com/IljaDaderko
1874
1923
  [@imorente]: https://github.com/imorente
1924
+ [@jamiebuilds]: https://github.com/jamiebuilds
1925
+ [@jamime]: https://github.com/jamime
1875
1926
  [@joarwilk]: https://github.com/joarwilk
1876
1927
  [@johansteffner]: https://github.com/johansteffner
1928
+ [@jonny133]: https://github.com/jonny133
1877
1929
  [@joshacheson]: https://github.com/joshacheson
1930
+ [@jtreanor]: https://github.com/jtreanor
1878
1931
  [@keplersj]: https://github.com/keplersj
1932
+ [@kesne]: https://github.com/kesne
1933
+ [@kristof0425]: https://github.com/kristof0425
1934
+ [@kwonoj]: https://github.com/kwonoj
1879
1935
  [@langovoi]: https://github.com/langovoi
1936
+ [@lucasmpaim]: https://github.com/lucasmpaim
1937
+ [@macklinu]: https://github.com/macklinu
1938
+ [@markelog]: https://github.com/markelog
1939
+ [@melvinvermeer]: https://github.com/melvinvermeer
1880
1940
  [@mifi]: https://github.com/ionutmiftode
1941
+ [@mlabrum]: https://github.com/mlabrum
1942
+ [@mmiszy]: https://github.com/mmiszy
1943
+ [@mrndjo]: https://github.com/mrndjo
1944
+ [@msteward]: https://github.com/msteward
1881
1945
  [@mxstbr]: https://github.com/mxstbr
1946
+ [@nguyenhuy]: https://github.com/nguyenhuy
1882
1947
  [@ninjaprox]: https://github.com/ninjaprox
1883
1948
  [@nminhnguyen]: https://github.com/NMinhNguyen
1884
1949
  [@nornagon]: https://github.com/nornagon
1950
+ [@notjosh]: https://github.com/notjosh
1885
1951
  [@notmoni]: https://github.com/NotMoni
1952
+ [@orieken]: https://github.com/orieken
1886
1953
  [@orta]: https://github.com/orta
1887
1954
  [@osmestad]: https://github.com/osmestad
1955
+ [@ozzieorca]: https://github.com/ozzieorca
1956
+ [@parvez]: https:/github.com/parvez
1888
1957
  [@patrickkempff]: https://github.com/patrickkempff
1958
+ [@paulmelnikow]: https://github.com/paulmelnikow
1889
1959
  [@peterjgrainger]: https://github.com/peterjgrainger
1960
+ [@pgoudreau]: https://github.com/@pgoudreau
1961
+ [@pinkasey]: https://github.com/pinkasey
1962
+ [@pveyes]: https://github.com/pveyes
1890
1963
  [@randak]: https://github.com/randak
1891
1964
  [@ravanscafi]: https://github.com/ravanscafi
1965
+ [@rogerluan]: https://github.com/rogerluan
1892
1966
  [@rohit-gohri]: https://github.com/rohit-gohri
1967
+ [@rouby]: https://github.com/rouby
1968
+ [@rzgry]: https://github.com/rzgry
1893
1969
  [@sajjadzamani]: https://github.com/sajjadzamani
1970
+ [@sandratatarevicova]: https://github.com/sandratatarevicova
1894
1971
  [@sebinsua]: https://github.com/sebinsua
1895
1972
  [@sgtcoolguy]: https://github.com/sgtcoolguy
1896
1973
  [@sharkysharks]: https://github.com/sharkysharks
1974
+ [@shyim]: https://github.com/shyim
1897
1975
  [@sogame]: https://github.com/sogame
1976
+ [@soyn]: https://github.com/Soyn
1977
+ [@stefanbuck]: https://github.com/stefanbuck
1978
+ [@steprescott]: https://github.com/steprescott
1898
1979
  [@stevemoser]: https://github.com/stevemoser
1899
1980
  [@stevenp]: https://github.com/stevenp
1900
1981
  [@sunshinejr]: https://github.com/sunshinejr
1982
+ [@thii]: https://github.com/thii
1983
+ [@tibdex]: https://github.com/tibdex
1984
+ [@tim3trick]: https://github.com/tim3trick
1901
1985
  [@tychota]: https://github.com/tychota
1902
1986
  [@urkle]: https://github.com/urkle
1987
+ [@valscion]: https://github.com/valscion
1988
+ [@wardpeet]: https://github.com/wardpeet
1989
+ [@watchinharrison]: https://github.com/watchinharrison
1903
1990
  [@wizardishungry]: https://github.com/wizardishungry
1904
- [@dblandin]: https://github.com/dblandin
1905
- [@paulmelnikow]: https://github.com/paulmelnikow
1906
- [@ds300]: https://github.com/ds300
1907
- [@jamime]: https://github.com/jamime
1908
- [@mrndjo]: https://github.com/mrndjo
1909
- [@bigkraig]: https://github.com/bigkraig
1910
- [@notjosh]: https://github.com/notjosh
1911
- [@iljadaderko]: https://github.com/IljaDaderko
1912
- [@417-72ki]: https://github.com/417-72KI
1913
- [@soyn]: https://github.com/Soyn
1914
- [@tim3trick]: https://github.com/tim3trick
1915
- [@doniyor2109]: https://github.com/doniyor2109
1916
- [@alexandermendes]: https://github.com/alexandermendes
1917
- [@jamiebuilds]: https://github.com/jamiebuilds
1918
- [@hmschreiner]: https://github.com/hmschreiner
1919
- [@g3offrey]: https://github.com/g3offrey
1920
- [@denieler]: https://github.com/denieler
1991
+ [@yohix]: https://github.com/yohix
1992
+ [@zdenektopic]: https://github.com/zdenektopic
1993
+ [danger-go]: https://github.com/bdotdub/danger-go
1994
+ [danger-swift]: https://github.com/danger/danger-swift#danger-swift
package/README.md CHANGED
@@ -112,7 +112,7 @@ an invite, ping [@Orta](https://twitter.com/orta/) a DM on Twitter with your ema
112
112
  to stay on top of Danger without all the emails from GitHub.
113
113
 
114
114
  > This project is open source under the MIT license, which means you have full access to the source code and can modify
115
- > it to fit your own needs.
115
+ > it to fit your own needs but don't have access to deploy.
116
116
  >
117
117
  > This project subscribes to the [Moya Contributors Guidelines](https://github.com/Moya/contributors) which TLDR: means
118
118
  > we give out push access easily and often.
package/SECURITY.md ADDED
@@ -0,0 +1,9 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ We only support the current SemVer major
6
+
7
+ ## Reporting a Vulnerability
8
+
9
+ Feel free to reach out to orta on Twitter (@orta) or via `[yourname]@orta.io`.
@@ -15,4 +15,4 @@ export declare function retryableFetch(url: string | node_fetch.Request, init: n
15
15
  * @param {fetch.RequestInit} [init] the usual options
16
16
  * @returns {Promise<fetch.Response>} network-y promise
17
17
  */
18
- export declare function api(url: string | node_fetch.Request, init: node_fetch.RequestInit, suppressErrorReporting?: boolean, provessEnv?: NodeJS.ProcessEnv): Promise<node_fetch.Response>;
18
+ export declare function api(url: string | node_fetch.Request, init: node_fetch.RequestInit, suppressErrorReporting?: boolean, processEnv?: NodeJS.ProcessEnv): Promise<node_fetch.Response>;
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
14
14
  var __importStar = (this && this.__importStar) || function (mod) {
15
15
  if (mod && mod.__esModule) return mod;
16
16
  var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
@@ -64,7 +64,7 @@ var node_fetch = __importStar(require("node-fetch"));
64
64
  var http_proxy_agent_1 = __importDefault(require("http-proxy-agent"));
65
65
  var https_proxy_agent_1 = __importDefault(require("https-proxy-agent"));
66
66
  var async_retry_1 = __importDefault(require("async-retry"));
67
- var d = debug_1.debug("networking");
67
+ var d = (0, debug_1.debug)("networking");
68
68
  var isJest = typeof jest !== "undefined";
69
69
  var warn = isJest ? function () { return ""; } : console.warn;
70
70
  var shouldRetryRequest = function (res) {
@@ -85,7 +85,7 @@ function retryableFetch(url, init) {
85
85
  var _this = this;
86
86
  return __generator(this, function (_a) {
87
87
  retries = isJest ? 1 : 3;
88
- return [2 /*return*/, async_retry_1.default(function (_, attempt) { return __awaiter(_this, void 0, void 0, function () {
88
+ return [2 /*return*/, (0, async_retry_1.default)(function (_, attempt) { return __awaiter(_this, void 0, void 0, function () {
89
89
  var originalFetch, res;
90
90
  return __generator(this, function (_a) {
91
91
  switch (_a.label) {
@@ -98,7 +98,7 @@ function retryableFetch(url, init) {
98
98
  res = _a.sent();
99
99
  // Throwing an error will trigger a retry
100
100
  if (attempt <= retries && shouldRetryRequest(res)) {
101
- throw new Error("Request failed [" + res.status + "]: " + res.url + ". Attempting retry.");
101
+ throw new Error("Request failed [".concat(res.status, "]: ").concat(res.url, ". Attempting retry."));
102
102
  }
103
103
  return [2 /*return*/, res];
104
104
  }
@@ -107,7 +107,7 @@ function retryableFetch(url, init) {
107
107
  retries: retries,
108
108
  onRetry: function (error, attempt) {
109
109
  warn(error.message);
110
- warn("Retry " + attempt + " of " + retries + ".");
110
+ warn("Retry ".concat(attempt, " of ").concat(retries, "."));
111
111
  },
112
112
  })];
113
113
  });
@@ -121,31 +121,31 @@ exports.retryableFetch = retryableFetch;
121
121
  * @param {fetch.RequestInit} [init] the usual options
122
122
  * @returns {Promise<fetch.Response>} network-y promise
123
123
  */
124
- function api(url, init, suppressErrorReporting, provessEnv) {
124
+ function api(url, init, suppressErrorReporting, processEnv) {
125
125
  var _this = this;
126
- if (provessEnv === void 0) { provessEnv = process.env; }
126
+ if (processEnv === void 0) { processEnv = process.env; }
127
127
  var isTests = typeof jest !== "undefined";
128
128
  if (isTests && !url.toString().includes("localhost")) {
129
- var message = "No API calls in tests please: " + url;
130
- debugger; // tslint:disable-line
129
+ var message = "No API calls in tests please: ".concat(url);
130
+ debugger;
131
131
  throw new Error(message);
132
132
  }
133
133
  if (global.verbose && global.verbose === true) {
134
134
  var output = ["curl", "-i"];
135
135
  if (init.method) {
136
- output.push("-X " + init.method);
136
+ output.push("-X ".concat(init.method));
137
137
  }
138
- var showToken = provessEnv["DANGER_VERBOSE_SHOW_TOKEN"];
139
- var token = provessEnv["DANGER_GITHUB_API_TOKEN"] || provessEnv["GITHUB_TOKEN"];
138
+ var showToken = processEnv["DANGER_VERBOSE_SHOW_TOKEN"];
139
+ var token = processEnv["DANGER_GITHUB_API_TOKEN"] || processEnv["GITHUB_TOKEN"];
140
140
  if (init.headers) {
141
141
  for (var prop in init.headers) {
142
142
  if (init.headers.hasOwnProperty(prop)) {
143
143
  // Don't show the token for normal verbose usage
144
144
  if (init.headers[prop].includes(token) && !showToken) {
145
- output.push("-H", "\"" + prop + ": [API TOKEN]\"");
145
+ output.push("-H", "\"".concat(prop, ": [API TOKEN]\""));
146
146
  continue;
147
147
  }
148
- output.push("-H", "\"" + prop + ": " + init.headers[prop] + "\"");
148
+ output.push("-H", "\"".concat(prop, ": ").concat(init.headers[prop], "\""));
149
149
  }
150
150
  }
151
151
  }
@@ -159,7 +159,7 @@ function api(url, init, suppressErrorReporting, provessEnv) {
159
159
  d(output.join(" "));
160
160
  }
161
161
  var agent = init.agent;
162
- var proxy = provessEnv["HTTPS_PROXY"] || provessEnv["https_proxy"] || provessEnv["HTTP_PROXY"] || provessEnv["http_proxy"];
162
+ var proxy = processEnv["HTTPS_PROXY"] || processEnv["https_proxy"] || processEnv["HTTP_PROXY"] || processEnv["http_proxy"];
163
163
  if (!agent && proxy) {
164
164
  var secure = url.toString().startsWith("https");
165
165
  init.agent = secure ? new https_proxy_agent_1.default(proxy) : new http_proxy_agent_1.default(proxy);
@@ -171,7 +171,7 @@ function api(url, init, suppressErrorReporting, provessEnv) {
171
171
  case 0:
172
172
  if (!(!suppressErrorReporting && !response.ok)) return [3 /*break*/, 5];
173
173
  clonedResponse = response.clone();
174
- warn("Request failed [" + clonedResponse.status + "]: " + clonedResponse.url);
174
+ warn("Request failed [".concat(clonedResponse.status, "]: ").concat(clonedResponse.url));
175
175
  return [4 /*yield*/, clonedResponse.text()];
176
176
  case 1:
177
177
  responseBody = _a.sent();
@@ -181,11 +181,11 @@ function api(url, init, suppressErrorReporting, provessEnv) {
181
181
  return [4 /*yield*/, JSON.parse(responseBody.toString())];
182
182
  case 3:
183
183
  responseJSON = _a.sent();
184
- warn("Response: " + JSON.stringify(responseJSON, null, " "));
184
+ warn("Response: ".concat(JSON.stringify(responseJSON, null, " ")));
185
185
  return [3 /*break*/, 5];
186
186
  case 4:
187
187
  e_1 = _a.sent();
188
- warn("Response: " + responseBody);
188
+ warn("Response: ".concat(responseBody));
189
189
  return [3 /*break*/, 5];
190
190
  case 5: return [2 /*return*/, response];
191
191
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../source/api/fetch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,qDAAwC;AAExC,sEAA6C;AAC7C,wEAA+C;AAE/C,4DAAoC;AAEpC,IAAM,CAAC,GAAG,aAAK,CAAC,YAAY,CAAC,CAAA;AAG7B,IAAM,MAAM,GAAG,OAAO,IAAI,KAAK,WAAW,CAAA;AAC1C,I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AAC,IAAI,0BAAc,CAAC,KAAK,CAAC,CAAA;KAC7E;IAED,OAAO,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,UAAO,QAA6B;;;;;yBAEpE,CAAA,CAAC,sBAAsB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA,EAAvC,wBAAuC;oBAErC,cAAc,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAA;oBACrC,IAAI,CAAC,0BAAmB,cAAc,CAAC,MAAM,gBAAM,cAAc,CAAC,GAAG,CAAE,CAAC,CAAA;oBACrD,qBAAM,cAAc,CAAC,IAAI,EAAE,EAAA;;oBAA1C,YAAY,GAAG,SAA2B;;;;oBAGvB,qBAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,EAAA;;oBAAxD,YAAY,GAAG,SAAyC;oBAC9D,IAAI,CAAC,oBAAa,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,CAAE,CAAC,CAAA;;;;oBAE7D,IAAI,CAAC,oBAAa,YAAY,CAAE,CAAC,CAAA;;wBAIrC,sBAAO,QAAQ,EAAA;;;SAChB,CAAC,CAAA;AACJ,CAAC;AA3ED,kBA2EC"}
@@ -78,7 +78,7 @@ function getPullRequestIDForBranch(metadata, env, branch) {
78
78
  switch (_a.label) {
79
79
  case 0:
80
80
  if (!process.env["DANGER_BITBUCKETSERVER_HOST"]) return [3 /*break*/, 2];
81
- api_1 = new BitBucketServerAPI_1.BitBucketServerAPI(metadata, BitBucketServerAPI_1.bitbucketServerRepoCredentialsFromEnv(env));
81
+ api_1 = new BitBucketServerAPI_1.BitBucketServerAPI(metadata, (0, BitBucketServerAPI_1.bitbucketServerRepoCredentialsFromEnv)(env));
82
82
  return [4 /*yield*/, api_1.getPullRequestsFromBranch(branch)];
83
83
  case 1:
84
84
  prs_1 = _a.sent();
@@ -88,7 +88,7 @@ function getPullRequestIDForBranch(metadata, env, branch) {
88
88
  return [2 /*return*/, 0];
89
89
  case 2:
90
90
  if (!(process.env["DANGER_BITBUCKETCLOUD_OAUTH_KEY"] || process.env["DANGER_BITBUCKETCLOUD_USERNAME"])) return [3 /*break*/, 4];
91
- api_2 = new BitBucketCloudAPI_1.BitBucketCloudAPI(metadata, BitBucketCloudAPI_1.bitbucketCloudCredentialsFromEnv(env));
91
+ api_2 = new BitBucketCloudAPI_1.BitBucketCloudAPI(metadata, (0, BitBucketCloudAPI_1.bitbucketCloudCredentialsFromEnv)(env));
92
92
  return [4 /*yield*/, api_2.getPullRequestsFromBranch(branch)];
93
93
  case 3:
94
94
  prs_2 = _a.sent();
@@ -105,7 +105,7 @@ function getPullRequestIDForBranch(metadata, env, branch) {
105
105
  return [4 /*yield*/, api.getPullRequests()];
106
106
  case 5:
107
107
  prs = (_a.sent());
108
- prForBranch = lodash_find_1.default(prs, function (pr) { return pr.head.ref === branch; });
108
+ prForBranch = (0, lodash_find_1.default)(prs, function (pr) { return pr.head.ref === branch; });
109
109
  if (prForBranch) {
110
110
  return [2 /*return*/, prForBranch.number];
111
111
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ci_source_helpers.js","sourceRoot":"","sources":["../../source/ci_source/ci_source_helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAyD;AAEzD,4DAA8B;AAC9B,uFAGyD;AAEzD,oFAAoH;AAEpH;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,GAAQ,EAAE,IAAc;IACzD,OAAO,IAAI,CAAC,KAAK,CAAC,UAAC,GAAW,IAAK,OAAA,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAlE,CAAkE,CAAC,CAAA;AACxG,CAAC;AAFD,gDAEC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,C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CAAC,IAAI,CAAC,GAAG,KAAK,MAAM,EAAtB,CAAsB,CAAC,CAAA;oBACvF,IAAI,WAAW,EAAE;wBACf,sBAAO,WAAW,CAAC,MAAM,EAAA;qBAC1B;oBACD,sBAAO,CAAC,EAAA;;;;CACT;AA7BD,8DA6BC"}
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
14
14
  var __importStar = (this && this.__importStar) || function (mod) {
15
15
  if (mod && mod.__esModule) return mod;
16
16
  var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
@@ -54,12 +54,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
54
54
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
55
55
  }
56
56
  };
57
- var __spreadArrays = (this && this.__spreadArrays) || function () {
58
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
59
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
60
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
61
- r[k] = a[j];
62
- return r;
57
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
58
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
59
+ if (ar || !(i in from)) {
60
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
61
+ ar[i] = from[i];
62
+ }
63
+ }
64
+ return to.concat(ar || Array.prototype.slice.call(from));
63
65
  };
64
66
  Object.defineProperty(exports, "__esModule", { value: true });
65
67
  exports.getCISource = exports.getCISourceForExternal = exports.getCISourceForEnv = void 0;
@@ -73,7 +75,7 @@ var path_1 = require("path");
73
75
  * @returns {?CISource} a CI source if it's OK, otherwise Danger can't run.
74
76
  */
75
77
  function getCISourceForEnv(env) {
76
- var availableProviders = __spreadArrays(providers_1.providers).map(function (Provider) { return new Provider(env); }).filter(function (x) { return x.isCI; });
78
+ var availableProviders = __spreadArray([], providers_1.providers, true).map(function (Provider) { return new Provider(env); }).filter(function (x) { return x.isCI; });
77
79
  return availableProviders && availableProviders.length > 0 ? availableProviders[0] : undefined;
78
80
  }
79
81
  exports.getCISourceForEnv = getCISourceForEnv;
@@ -89,14 +91,15 @@ function getCISourceForExternal(env, modulePath) {
89
91
  return __awaiter(this, void 0, void 0, function () {
90
92
  var path;
91
93
  return __generator(this, function (_a) {
92
- path = path_1.resolve(process.cwd(), modulePath);
94
+ path = (0, path_1.resolve)(process.cwd(), modulePath);
93
95
  return [2 /*return*/, new Promise(function (resolve) {
94
96
  fs.stat(path, function (error, stat) {
95
97
  if (error) {
96
- console.error("could not load CI provider at " + modulePath + " due to " + error);
98
+ console.error("could not load CI provider at ".concat(modulePath, " due to ").concat(error));
97
99
  }
98
100
  if (stat && stat.isFile()) {
99
- var externalModule = require(path); //tslint:disable-line:no-require-imports
101
+ // eslint-disable-next-line
102
+ var externalModule = require(path); // @typescript-eslint/no-var-requires @typescript-eslint/no-require-imports
100
103
  var moduleConstructor = externalModule.default || externalModule;
101
104
  resolve(new moduleConstructor(env));
102
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get_ci_source.js","sourceRoot":"","sources":["../../source/ci_source/get_ci_source.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAuC;AACvC,qCAAwB;AACxB,6BAA8B;AAG9B;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,GAAQ;IACxC,IAAM,kBAAkB,GAAG,eAAK,qBAAiB,EAAE,GAAG,CAAC,UAAA,QAAQ,IAAI,OAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAjB,CAAiB,CAAC,CAAC,MAAM,CAA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