danger 11.0.2 → 11.0.6
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.
- package/.eslintignore +2 -0
- package/.eslintrc.js +66 -0
- package/.release-it.json +2 -1
- package/CHANGELOG.md +100 -32
- package/Dockerfile +1 -1
- package/README.md +1 -1
- package/SECURITY.md +9 -0
- package/distribution/api/fetch.d.ts +1 -1
- package/distribution/api/fetch.js +6 -6
- package/distribution/api/fetch.js.map +1 -1
- package/distribution/ci_source/get_ci_source.js +2 -1
- package/distribution/ci_source/get_ci_source.js.map +1 -1
- package/distribution/commands/ci/runner.js +1 -1
- package/distribution/commands/ci/runner.js.map +1 -1
- package/distribution/commands/danger-local.js +2 -2
- package/distribution/commands/danger-local.js.map +1 -1
- package/distribution/commands/danger-runner.js +1 -3
- package/distribution/commands/danger-runner.js.map +1 -1
- package/distribution/commands/init/default-dangerfile.js +1 -1
- package/distribution/commands/init/default-dangerfile.js.map +1 -1
- package/distribution/commands/init/interfaces.d.ts +3 -3
- package/distribution/commands/utils/runDangerSubprocess.d.ts +1 -0
- package/distribution/commands/utils/runDangerSubprocess.js +6 -3
- package/distribution/commands/utils/runDangerSubprocess.js.map +1 -1
- package/distribution/danger.d.ts +9 -3
- package/distribution/danger.js.flow +1 -1
- package/distribution/platforms/BitBucketCloud.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_api.test.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js +18 -11
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js.map +1 -1
- package/distribution/platforms/git/localGetCommits.js.map +1 -1
- package/distribution/platforms/git/localLogGitCommits.d.ts +1 -1
- package/distribution/platforms/git/localLogGitCommits.js.map +1 -1
- package/distribution/platforms/gitlab/GitLabAPI.js +1 -1
- package/distribution/platforms/gitlab/GitLabAPI.js.map +1 -1
- package/distribution/runner/Executor.js +7 -3
- package/distribution/runner/Executor.js.map +1 -1
- package/distribution/runner/dangerDSLJSON.js.map +1 -1
- package/distribution/runner/runners/utils/transpiler.js +8 -8
- package/distribution/runner/runners/utils/transpiler.js.map +1 -1
- package/package.json +30 -24
- package/tsconfig.spec.json +4 -0
package/.eslintignore
ADDED
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/.release-it.json
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
},
|
|
6
6
|
"buildCommand": "yarn package",
|
|
7
7
|
"hooks": {
|
|
8
|
-
"before:bump": "yarn declarations; yarn build:schemas
|
|
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
|
|
10
|
-
// see the bottom of this file.
|
|
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
|
|
|
@@ -15,10 +16,26 @@
|
|
|
15
16
|
|
|
16
17
|
<!-- Your comment below this -->
|
|
17
18
|
|
|
18
|
-
|
|
19
19
|
<!-- Your comment above this -->
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
# 11.0.5
|
|
23
|
+
|
|
24
|
+
- Set the timeout for getting results from the Danger runner to be 10 seconds
|
|
25
|
+
|
|
26
|
+
# 11.0.4
|
|
27
|
+
|
|
28
|
+
- Deploying from my Mac to see if that's what's causing the build issues for homebrew. [@orta]
|
|
29
|
+
|
|
30
|
+
# 11.0.3
|
|
31
|
+
|
|
32
|
+
- Bump up @babel/* plugins for Core-JS support. [@parvez]
|
|
33
|
+
- Replace deprecated @Babel/polyfill dependency with Core-JS + Regenerator-Runtime. [@gpetrioli]
|
|
34
|
+
- *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]
|
|
35
|
+
|
|
36
|
+
- *Chore:* Switch from tslint to eslint (tslint is end-of-life) - [#1205](https://github.com/danger/danger-js/pull/1205) [@fbartho]
|
|
37
|
+
|
|
38
|
+
# 11.0.0 -> 11.0.2
|
|
22
39
|
|
|
23
40
|
- *Breaking:* Upgrade @octokit/rest from ^16.43.1 to ^18.12.0 - [#1204](https://github.com/danger/danger-js/pull/1204) [@fbartho]
|
|
24
41
|
|
|
@@ -103,13 +120,13 @@
|
|
|
103
120
|
|
|
104
121
|
# 10.5.0
|
|
105
122
|
|
|
106
|
-
- Handle deprecations for the APIs used with `--use-github-checks` #1073 [@wardpeet]
|
|
123
|
+
- Handle deprecations for the APIs used with `--use-github-checks` #1073 [@wardpeet]
|
|
107
124
|
|
|
108
125
|
# 10.4.1
|
|
109
126
|
|
|
110
127
|
- Improved `tsconfig.json` file lookup strategy: it now looks for it starting from the location of the danger file.
|
|
111
|
-
#1068 [@igorbek]
|
|
112
|
-
- Upgrade node-fetch to 2.6.1 to fix GHSA-w7rc-rwvf-8q5r. #1071 [@hmcc]
|
|
128
|
+
#1068 [@igorbek]
|
|
129
|
+
- Upgrade node-fetch to 2.6.1 to fix GHSA-w7rc-rwvf-8q5r. #1071 [@hmcc]
|
|
113
130
|
|
|
114
131
|
# 10.4.0
|
|
115
132
|
|
|
@@ -122,7 +139,7 @@
|
|
|
122
139
|
DANGER_MANUAL_GH_REPO: ${{ steps.pr_info.outputs.repo }}
|
|
123
140
|
DANGER_MANUAL_PR: ${{ steps.pr_info.outputs.number }}
|
|
124
141
|
```
|
|
125
|
-
Which looks more intentional instead of: `DANGER_FAKE_CI` etc. [@orta]
|
|
142
|
+
Which looks more intentional instead of: `DANGER_FAKE_CI` etc. [@orta]
|
|
126
143
|
|
|
127
144
|
# 10.3.1
|
|
128
145
|
|
|
@@ -135,7 +152,7 @@
|
|
|
135
152
|
|
|
136
153
|
# 10.2.2
|
|
137
154
|
|
|
138
|
-
- Add support for `danger local` on repos without a master branch - [@ahobson]
|
|
155
|
+
- Add support for `danger local` on repos without a master branch - [@ahobson]
|
|
139
156
|
|
|
140
157
|
# 10.2.1
|
|
141
158
|
|
|
@@ -175,7 +192,7 @@
|
|
|
175
192
|
- Don't use hardcoded userId to update comments if using personal token in Github Actions - [@rohit-gohri]
|
|
176
193
|
- Disable warning in Github Action if using DANGER_GITHUB_API_TOKEN - [@rohit-gohri]
|
|
177
194
|
- Update `parse-diff` library - [@417-72KI]
|
|
178
|
-
- Fix repository slug in Jenkins provider - [sandratatarevicova]
|
|
195
|
+
- Fix repository slug in Jenkins provider - [@sandratatarevicova]
|
|
179
196
|
- Add Gitlab diff support - [@rohit-gohri]
|
|
180
197
|
- Fix Typos across danger-js Repo - [@yohix]
|
|
181
198
|
- Fix `@octokit/rest` deprecation warning when using `.issues.addLabels()` - [@sogame]
|
|
@@ -348,7 +365,7 @@
|
|
|
348
365
|
|
|
349
366
|
# 7.0.19
|
|
350
367
|
|
|
351
|
-
- Taken a stab at trying to make the commit status summary to feel better in both Danger & Peril [@orta][@dblandin]
|
|
368
|
+
- Taken a stab at trying to make the commit status summary to feel better in both Danger & Peril [@orta], [@dblandin]
|
|
352
369
|
|
|
353
370
|
# 7.0.18
|
|
354
371
|
|
|
@@ -729,7 +746,7 @@ Also, `danger pr` now accepts a `--process` arg.
|
|
|
729
746
|
|
|
730
747
|
# 3.7.17
|
|
731
748
|
|
|
732
|
-
- Improvements to PR detection on Team City - @markelog
|
|
749
|
+
- Improvements to PR detection on Team City - [@markelog]
|
|
733
750
|
|
|
734
751
|
# 3.7.16
|
|
735
752
|
|
|
@@ -1863,73 +1880,124 @@ That should do ya. I think. This doesn't support babel, and I haven't explored u
|
|
|
1863
1880
|
|
|
1864
1881
|
Not usable for others, only stubs of classes etc. - [@orta]
|
|
1865
1882
|
|
|
1866
|
-
[
|
|
1867
|
-
[
|
|
1883
|
+
[@417-72ki]: https://github.com/417-72KI
|
|
1884
|
+
[@HonzaMac]: https://github.com/HonzaMac
|
|
1885
|
+
[@JanStevens]: https://github.com/JanStevens
|
|
1886
|
+
[@RDIL]: https://github.com/RDIL
|
|
1887
|
+
[@Teamop]: https://github.com/Teamop
|
|
1888
|
+
[@adam-bratin]: https://github.com/adam-bratin
|
|
1868
1889
|
[@adam-moss]: https://github.com/adam-moss
|
|
1869
1890
|
[@adamnoakes]: https://github.com/adamnoakes
|
|
1870
1891
|
[@aghassi]: https://github.com/aghassi
|
|
1892
|
+
[@ahobson]: https://github.com/ahobson
|
|
1893
|
+
[@alexandermendes]: https://github.com/alexandermendes
|
|
1894
|
+
[@andykenward]: https://github.com/andykenward
|
|
1871
1895
|
[@ashfurrow]: https://github.com/ashfurrow
|
|
1896
|
+
[@awgeorge]: https://github.com/awgeorge
|
|
1872
1897
|
[@azz]: https://github.com/azz
|
|
1898
|
+
[@bdotdub]: https://github.com/bdotdub
|
|
1899
|
+
[@bigkraig]: https://github.com/bigkraig
|
|
1873
1900
|
[@caffodian]: https://github.com/caffodian
|
|
1874
1901
|
[@codestergit]: https://github.com/codestergit
|
|
1875
1902
|
[@cwright017]: https://github.com/Cwright017
|
|
1876
1903
|
[@cysp]: https://github.com/cysp
|
|
1877
1904
|
[@danielrosenwasser]: https://github.com/DanielRosenwasser
|
|
1878
1905
|
[@davidbrunow]: https://github.com/davidbrunow
|
|
1906
|
+
[@davidhouweling]: https://github.com/davidhouweling
|
|
1907
|
+
[@dbgrandi]: https://github.com/dbgrandi
|
|
1908
|
+
[@dblandin]: https://github.com/dblandin
|
|
1909
|
+
[@denieler]: https://github.com/denieler
|
|
1879
1910
|
[@dfalling]: https://github.com/dfalling
|
|
1880
1911
|
[@dkundel]: https://github.com/dkundel
|
|
1912
|
+
[@doniyor2109]: https://github.com/doniyor2109
|
|
1913
|
+
[@ds300]: https://github.com/ds300
|
|
1881
1914
|
[@f-meloni]: https://github.com/f-meloni
|
|
1882
1915
|
[@fbartho]: https://github.com/fbartho
|
|
1916
|
+
[@flovilmart]: https://github.com/flovilmart
|
|
1917
|
+
[@friederbluemle]: https://github.com/friederbluemle
|
|
1883
1918
|
[@fwal]: https://github.com/fwal
|
|
1919
|
+
[@g3offrey]: https://github.com/g3offrey
|
|
1920
|
+
[@gantman]: https://github.com/gantman
|
|
1921
|
+
[@gpetrioli]: https:/github.com/gpetrioli
|
|
1922
|
+
[@gzaripov]: https://github.com/gzaripov
|
|
1923
|
+
[@hanneskaeufler]: https://github.com/hanneskaeufler
|
|
1884
1924
|
[@happylinks]: https://github.com/happylinks
|
|
1925
|
+
[@hellocore]: https://github.com/HelloCore
|
|
1926
|
+
[@hiroppy]: https://github.com/hiroppy
|
|
1885
1927
|
[@hmcc]: https://github.com/hmcc
|
|
1928
|
+
[@hmschreiner]: https://github.com/hmschreiner
|
|
1886
1929
|
[@hongrich]: https://github.com/hongrich
|
|
1887
|
-
[@
|
|
1930
|
+
[@igorbek]: https://github.com/igorbek
|
|
1931
|
+
[@iljadaderko]: https://github.com/IljaDaderko
|
|
1888
1932
|
[@imorente]: https://github.com/imorente
|
|
1933
|
+
[@jamiebuilds]: https://github.com/jamiebuilds
|
|
1934
|
+
[@jamime]: https://github.com/jamime
|
|
1889
1935
|
[@joarwilk]: https://github.com/joarwilk
|
|
1890
1936
|
[@johansteffner]: https://github.com/johansteffner
|
|
1891
1937
|
[@jonny133]: https://github.com/jonny133
|
|
1892
1938
|
[@joshacheson]: https://github.com/joshacheson
|
|
1939
|
+
[@jtreanor]: https://github.com/jtreanor
|
|
1893
1940
|
[@keplersj]: https://github.com/keplersj
|
|
1941
|
+
[@kesne]: https://github.com/kesne
|
|
1942
|
+
[@kristof0425]: https://github.com/kristof0425
|
|
1943
|
+
[@kwonoj]: https://github.com/kwonoj
|
|
1894
1944
|
[@langovoi]: https://github.com/langovoi
|
|
1945
|
+
[@lucasmpaim]: https://github.com/lucasmpaim
|
|
1946
|
+
[@macklinu]: https://github.com/macklinu
|
|
1947
|
+
[@markelog]: https://github.com/markelog
|
|
1948
|
+
[@melvinvermeer]: https://github.com/melvinvermeer
|
|
1895
1949
|
[@mifi]: https://github.com/ionutmiftode
|
|
1950
|
+
[@mlabrum]: https://github.com/mlabrum
|
|
1951
|
+
[@mmiszy]: https://github.com/mmiszy
|
|
1952
|
+
[@mrndjo]: https://github.com/mrndjo
|
|
1953
|
+
[@msteward]: https://github.com/msteward
|
|
1896
1954
|
[@mxstbr]: https://github.com/mxstbr
|
|
1955
|
+
[@nguyenhuy]: https://github.com/nguyenhuy
|
|
1897
1956
|
[@ninjaprox]: https://github.com/ninjaprox
|
|
1898
1957
|
[@nminhnguyen]: https://github.com/NMinhNguyen
|
|
1899
1958
|
[@nornagon]: https://github.com/nornagon
|
|
1959
|
+
[@notjosh]: https://github.com/notjosh
|
|
1900
1960
|
[@notmoni]: https://github.com/NotMoni
|
|
1961
|
+
[@orieken]: https://github.com/orieken
|
|
1901
1962
|
[@orta]: https://github.com/orta
|
|
1902
1963
|
[@osmestad]: https://github.com/osmestad
|
|
1964
|
+
[@ozzieorca]: https://github.com/ozzieorca
|
|
1965
|
+
[@parvez]: https:/github.com/parvez
|
|
1903
1966
|
[@patrickkempff]: https://github.com/patrickkempff
|
|
1967
|
+
[@paulmelnikow]: https://github.com/paulmelnikow
|
|
1904
1968
|
[@peterjgrainger]: https://github.com/peterjgrainger
|
|
1969
|
+
[@pgoudreau]: https://github.com/@pgoudreau
|
|
1970
|
+
[@pinkasey]: https://github.com/pinkasey
|
|
1971
|
+
[@pveyes]: https://github.com/pveyes
|
|
1905
1972
|
[@randak]: https://github.com/randak
|
|
1906
1973
|
[@ravanscafi]: https://github.com/ravanscafi
|
|
1974
|
+
[@rogerluan]: https://github.com/rogerluan
|
|
1907
1975
|
[@rohit-gohri]: https://github.com/rohit-gohri
|
|
1976
|
+
[@rouby]: https://github.com/rouby
|
|
1977
|
+
[@rzgry]: https://github.com/rzgry
|
|
1908
1978
|
[@sajjadzamani]: https://github.com/sajjadzamani
|
|
1979
|
+
[@sandratatarevicova]: https://github.com/sandratatarevicova
|
|
1909
1980
|
[@sebinsua]: https://github.com/sebinsua
|
|
1910
1981
|
[@sgtcoolguy]: https://github.com/sgtcoolguy
|
|
1911
1982
|
[@sharkysharks]: https://github.com/sharkysharks
|
|
1983
|
+
[@shyim]: https://github.com/shyim
|
|
1912
1984
|
[@sogame]: https://github.com/sogame
|
|
1985
|
+
[@soyn]: https://github.com/Soyn
|
|
1986
|
+
[@stefanbuck]: https://github.com/stefanbuck
|
|
1987
|
+
[@steprescott]: https://github.com/steprescott
|
|
1913
1988
|
[@stevemoser]: https://github.com/stevemoser
|
|
1914
1989
|
[@stevenp]: https://github.com/stevenp
|
|
1915
1990
|
[@sunshinejr]: https://github.com/sunshinejr
|
|
1991
|
+
[@thii]: https://github.com/thii
|
|
1992
|
+
[@tibdex]: https://github.com/tibdex
|
|
1993
|
+
[@tim3trick]: https://github.com/tim3trick
|
|
1916
1994
|
[@tychota]: https://github.com/tychota
|
|
1917
1995
|
[@urkle]: https://github.com/urkle
|
|
1996
|
+
[@valscion]: https://github.com/valscion
|
|
1997
|
+
[@wardpeet]: https://github.com/wardpeet
|
|
1998
|
+
[@watchinharrison]: https://github.com/watchinharrison
|
|
1918
1999
|
[@wizardishungry]: https://github.com/wizardishungry
|
|
1919
|
-
[@
|
|
1920
|
-
[@
|
|
1921
|
-
[
|
|
1922
|
-
[
|
|
1923
|
-
[@mrndjo]: https://github.com/mrndjo
|
|
1924
|
-
[@bigkraig]: https://github.com/bigkraig
|
|
1925
|
-
[@notjosh]: https://github.com/notjosh
|
|
1926
|
-
[@iljadaderko]: https://github.com/IljaDaderko
|
|
1927
|
-
[@417-72ki]: https://github.com/417-72KI
|
|
1928
|
-
[@soyn]: https://github.com/Soyn
|
|
1929
|
-
[@tim3trick]: https://github.com/tim3trick
|
|
1930
|
-
[@doniyor2109]: https://github.com/doniyor2109
|
|
1931
|
-
[@alexandermendes]: https://github.com/alexandermendes
|
|
1932
|
-
[@jamiebuilds]: https://github.com/jamiebuilds
|
|
1933
|
-
[@hmschreiner]: https://github.com/hmschreiner
|
|
1934
|
-
[@g3offrey]: https://github.com/g3offrey
|
|
1935
|
-
[@denieler]: https://github.com/denieler
|
|
2000
|
+
[@yohix]: https://github.com/yohix
|
|
2001
|
+
[@zdenektopic]: https://github.com/zdenektopic
|
|
2002
|
+
[danger-go]: https://github.com/bdotdub/danger-go
|
|
2003
|
+
[danger-swift]: https://github.com/danger/danger-swift#danger-swift
|
package/Dockerfile
CHANGED
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
|
@@ -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,
|
|
18
|
+
export declare function api(url: string | node_fetch.Request, init: node_fetch.RequestInit, suppressErrorReporting?: boolean, processEnv?: NodeJS.ProcessEnv): Promise<node_fetch.Response>;
|
|
@@ -121,13 +121,13 @@ 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,
|
|
124
|
+
function api(url, init, suppressErrorReporting, processEnv) {
|
|
125
125
|
var _this = this;
|
|
126
|
-
if (
|
|
126
|
+
if (processEnv === void 0) { processEnv = process.env; }
|
|
127
127
|
var isTests = typeof jest !== "undefined";
|
|
128
128
|
if (isTests && !url.toString().includes("localhost")) {
|
|
129
129
|
var message = "No API calls in tests please: ".concat(url);
|
|
130
|
-
debugger;
|
|
130
|
+
debugger;
|
|
131
131
|
throw new Error(message);
|
|
132
132
|
}
|
|
133
133
|
if (global.verbose && global.verbose === true) {
|
|
@@ -135,8 +135,8 @@ function api(url, init, suppressErrorReporting, provessEnv) {
|
|
|
135
135
|
if (init.method) {
|
|
136
136
|
output.push("-X ".concat(init.method));
|
|
137
137
|
}
|
|
138
|
-
var showToken =
|
|
139
|
-
var 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)) {
|
|
@@ -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 =
|
|
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);
|
|
@@ -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,IAAA,aAAK,EAAC,YAAY,CAAC,CAAA;AAG7B,IAAM,MAAM,GAAG,OAAO,IAAI,KAAK,WAAW,CAAA;AAC1C,IAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,cAAM,OAAA,EAAE,EAAF,CAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAA;AAE7C,IAAM,kBAAkB,GAAG,UAAC,GAAwB;IAClD,qFAAqF;IACrF,mFAAmF;IACnF,OAAO,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,I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,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"}
|
|
@@ -98,7 +98,8 @@ function getCISourceForExternal(env, modulePath) {
|
|
|
98
98
|
console.error("could not load CI provider at ".concat(modulePath, " due to ").concat(error));
|
|
99
99
|
}
|
|
100
100
|
if (stat && stat.isFile()) {
|
|
101
|
-
|
|
101
|
+
// eslint-disable-next-line
|
|
102
|
+
var externalModule = require(path); // @typescript-eslint/no-var-requires @typescript-eslint/no-require-imports
|
|
102
103
|
var moduleConstructor = externalModule.default || externalModule;
|
|
103
104
|
resolve(new moduleConstructor(env));
|
|
104
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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AAI,UAAQ,EAAE;wBACZ,sBAAO,UAAQ,EAAA;qBAChB;;wBAGH,sBAAO,iBAAiB,CAAC,GAAG,CAAC,EAAA;;;;CAC9B;AATD,kCASC"}
|
|
@@ -104,7 +104,7 @@ var runRunner = function (app, config) { return __awaiter(void 0, void 0, void 0
|
|
|
104
104
|
newComment: app.newComment || false,
|
|
105
105
|
removePreviousComments: app.removePreviousComments || false,
|
|
106
106
|
};
|
|
107
|
-
processName = (app.process && (0, runDangerSubprocess_1.
|
|
107
|
+
processName = (app.process && (0, runDangerSubprocess_1.addSubprocessCallArguments)(app.process.split(" "))) || undefined;
|
|
108
108
|
runnerCommand = processName || (0, dangerRunToRunnerCLI_1.default)(process.argv);
|
|
109
109
|
d("Preparing to run: ".concat(runnerCommand));
|
|
110
110
|
runConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../source/commands/ci/runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,qCAAmC;AAEnC,qDAAsE;AACtE,kDAAiE;AACjE,
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../source/commands/ci/runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,qCAAmC;AAEnC,qDAAsE;AACtE,kDAAiE;AACjE,oEAA8F;AAE9F,mFAA4D;AAE5D,uEAAsD;AACtD,0DAA4D;AAC5D,uFAAgE;AAEhE,yBAAiC;AACjC,6BAA2B;AAE3B,IAAM,CAAC,GAAG,IAAA,aAAK,EAAC,gBAAgB,CAAC,CAAA;AAW1B,IAAM,SAAS,GAAG,UAAO,GAAc,EAAE,MAA8B;;;;;gBACtE,iBAAiB,GAAG,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,uBAAuB,CAAC,EAAE,MAAM,C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AiErB"}
|
|
@@ -13,12 +13,12 @@ commander_1.default
|
|
|
13
13
|
.usage("[options]")
|
|
14
14
|
.description("Runs danger without PR metadata, useful for git hooks.")
|
|
15
15
|
.option("-s, --staging", "Just use staged changes.")
|
|
16
|
-
.option("-b, --base [branch_name]", "Use a different base branch")
|
|
16
|
+
.option("-b, --base [branch_name]", "Use a different base branch", "master")
|
|
17
17
|
.option("-j, --outputJSON", "Outputs the resulting JSON to STDOUT")
|
|
18
18
|
.allowUnknownOption(true);
|
|
19
19
|
(0, sharedDangerfileArgs_1.default)(commander_1.default).parse(process.argv);
|
|
20
20
|
var app = commander_1.default;
|
|
21
|
-
var base = app.base
|
|
21
|
+
var base = app.base;
|
|
22
22
|
var localPlatform = new LocalGit_1.LocalGit({ base: base, staging: app.staging });
|
|
23
23
|
localPlatform.validateThereAreChanges().then(function (changes) {
|
|
24
24
|
if (changes) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"danger-local.js","sourceRoot":"","sources":["../../source/commands/danger-local.ts"],"names":[],"mappings":";;;;;;AAEA,wDAA+B;AAE/B,sFAAuE;AACvE,sCAAuC;AACvC,kDAAgD;AAChD,oDAAoD;AASpD,mBAAO;KACJ,KAAK,CAAC,WAAW,CAAC;KAClB,WAAW,CAAC,wDAAwD,CAAC;KACrE,MAAM,CAAC,eAAe,EAAE,0BAA0B,CAAC;KACnD,MAAM,CAAC,0BAA0B,EAAE,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"danger-local.js","sourceRoot":"","sources":["../../source/commands/danger-local.ts"],"names":[],"mappings":";;;;;;AAEA,wDAA+B;AAE/B,sFAAuE;AACvE,sCAAuC;AACvC,kDAAgD;AAChD,oDAAoD;AASpD,mBAAO;KACJ,KAAK,CAAC,WAAW,CAAC;KAClB,WAAW,CAAC,wDAAwD,CAAC;KACrE,MAAM,CAAC,eAAe,EAAE,0BAA0B,CAAC;KACnD,MAAM,CAAC,0BAA0B,EAAE,6BAA6B,EAAE,QAAQ,CAAC;KAC3E,MAAM,CAAC,kBAAkB,EAAE,sCAAsC,CAAC;KAClE,kBAAkB,CAAC,IAAI,CAAC,CAAA;AAC3B,IAAA,8BAAa,EAAC,mBAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AAE1C,IAAM,GAAG,GAAI,mBAAsB,CAAA;AACnC,IAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;AAErB,IAAM,aAAa,GAAG,IAAI,mBAAQ,CAAC,EAAE,IAAI,MAAA,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAA;AAClE,aAAa,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,UAAA,OAAO;IAClD,IAAI,OAAO,EAAE;QACX,IAAM,UAAU,GAAG,IAAI,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAC1C,uEAAuE;QACvE,wDAAwD;QACxD,IAAA,kBAAS,EAAC,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;KAClH;SAAM;QACL,OAAO,CAAC,GAAG,CAAC,mDAA4C,IAAI,MAAG,CAAC,CAAA;KACjE;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -57,8 +57,6 @@ var path_1 = require("path");
|
|
|
57
57
|
var d = (0, debug_1.debug)("runner");
|
|
58
58
|
// Given the nature of this command, it can be tricky to test, so I use a command like this:
|
|
59
59
|
//
|
|
60
|
-
// tslint:disable-next-line:max-line-length
|
|
61
|
-
//
|
|
62
60
|
// yarn build; cat source/_tests/fixtures/danger-js-pr-395.json | env DANGER_FAKE_CI="YEP" DANGER_TEST_REPO='danger/danger-js' DANGER_TEST_PR='395' node distribution/commands/danger-runner.js --text-only
|
|
63
61
|
//
|
|
64
62
|
// Which will build danger, then run just the dangerfile runner with a fixtured version of the JSON
|
|
@@ -131,7 +129,7 @@ setTimeout(function () {
|
|
|
131
129
|
process.exitCode = 1;
|
|
132
130
|
process.exit(1);
|
|
133
131
|
}
|
|
134
|
-
},
|
|
132
|
+
}, 10000);
|
|
135
133
|
// Start waiting on STDIN for the DSL
|
|
136
134
|
(0, get_stdin_1.default)().then(run(commander_1.default));
|
|
137
135
|
//# sourceMappingURL=danger-runner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"danger-runner.js","sourceRoot":"","sources":["../../source/commands/danger-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sFAAuE;AACvE,8DAAsC;AAEtC,wDAA+B;AAC/B,kCAAgC;AAChC,wDAAgC;AAChC,gDAAyB;AAEzB,oEAA6C;AAC7C,+CAAkD;AAClD,yDAAuD;AAGvD,kFAA2D;AAC3D,kDAAyD;AACzD,yBAA2B;AAC3B,yBAAkC;AAClC,6BAA2B;AAE3B,IAAM,CAAC,GAAG,IAAA,aAAK,EAAC,QAAQ,CAAC,CAAA;AAEzB,4FAA4F;AAC5F,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"danger-runner.js","sourceRoot":"","sources":["../../source/commands/danger-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sFAAuE;AACvE,8DAAsC;AAEtC,wDAA+B;AAC/B,kCAAgC;AAChC,wDAAgC;AAChC,gDAAyB;AAEzB,oEAA6C;AAC7C,+CAAkD;AAClD,yDAAuD;AAGvD,kFAA2D;AAC3D,kDAAyD;AACzD,yBAA2B;AAC3B,yBAAkC;AAClC,6BAA2B;AAE3B,IAAM,CAAC,GAAG,IAAA,aAAK,EAAC,QAAQ,CAAC,CAAA;AAEzB,4FAA4F;AAC5F,EAAE;AACF,2MAA2M;AAC3M,EAAE;AACF,mGAAmG;AAEnG,mBAAO;KACJ,KAAK,CAAC,WAAW,CAAC;KAClB,WAA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AC,CAAC,CAAA;KAChB;AACH,CAAC,EAAE,KAAK,CAAC,CAAA;AAET,qCAAqC;AACrC,IAAA,mBAAQ,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAc,CAAC,CAAC,CAAA"}
|
|
@@ -61,7 +61,7 @@ var generateDefaultDangerfile = function (state) {
|
|
|
61
61
|
exports.generateDefaultDangerfile = generateDefaultDangerfile;
|
|
62
62
|
var formatDangerfile = function (dangerfile, dangerfileState) {
|
|
63
63
|
if (dangerfileState.hasPrettier) {
|
|
64
|
-
//
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
65
65
|
var format = require("prettier").format;
|
|
66
66
|
// Get package settings
|
|
67
67
|
var localPrettier = fs.existsSync("package.json") && JSON.parse(fs.readFileSync("package.json", "utf8")).prettier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-dangerfile.js","sourceRoot":"","sources":["../../../source/commands/init/default-dangerfile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAwB;AAGxB,IAAM,uBAAuB,GAAG,cAAM,OAAA,CAAC;IACrC,YAAY,EAAE,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC;IAC3C,qBAAqB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IACvE,WAAW,EAAE,EAAE,CAAC,UAAU,CAAC,4BAA4B,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,gCAAgC,CAAC;IAC3G,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,wBAAwB,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,4BAA4B,CAAC;CAChG,CAAC,EALoC,CAKpC,CAAA;AAEK,IAAM,yBAAyB,GAAG,UAAC,KAAgB;IACxD,IAAM,eAAe,GAAG,uBAAuB,EAAE,CAAA;IACjD,IAAI,KAAK,GAAa,EAAE,CAAA;IAExB,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,8BAA8B;AACvB,IAAM,wBAAwB,GAAG,UAAC,GAAW,EAAE,KAAa,IAAK,OAAA,kCAChD,GAAG,iLAE6B,GAAG,0EACF,KAAK,iJAK7D,EATuE,CASvE,CAAA;AATY,QAAA,wBAAwB,4BASpC"}
|
|
@@ -15,10 +15,10 @@ export interface InitState {
|
|
|
15
15
|
isGitHub: boolean;
|
|
16
16
|
}
|
|
17
17
|
export interface InitUI {
|
|
18
|
-
header: (msg:
|
|
18
|
+
header: (msg: string) => void;
|
|
19
19
|
command: (command: string) => void;
|
|
20
|
-
say: (msg:
|
|
21
|
-
pause: (secs: number) => Promise<
|
|
20
|
+
say: (msg: string) => void;
|
|
21
|
+
pause: (secs: number) => Promise<unknown>;
|
|
22
22
|
waitForReturn: () => void;
|
|
23
23
|
link: (name: string, href: string) => string;
|
|
24
24
|
askWithAnswers: (message: string, answers: string[]) => string;
|
|
@@ -2,6 +2,7 @@ import { DangerDSLJSONType } from "../../dsl/DangerDSL";
|
|
|
2
2
|
import { Executor } from "../../runner/Executor";
|
|
3
3
|
import { RunnerConfig } from "../ci/runner";
|
|
4
4
|
export declare const prepareDangerDSL: (dangerDSL: DangerDSLJSONType) => string;
|
|
5
|
+
export declare const addSubprocessCallArguments: (call: string[], args?: string[]) => string[];
|
|
5
6
|
export declare const addSubprocessCallAguments: (call: string[], args?: string[]) => string[];
|
|
6
7
|
export declare const runDangerSubprocess: (subprocessName: string[], dslJSON: DangerDSLJSONType, exec: Executor, config: RunnerConfig) => void;
|
|
7
8
|
export default runDangerSubprocess;
|
|
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.runDangerSubprocess = exports.addSubprocessCallAguments = exports.prepareDangerDSL = void 0;
|
|
50
|
+
exports.runDangerSubprocess = exports.addSubprocessCallAguments = exports.addSubprocessCallArguments = exports.prepareDangerDSL = void 0;
|
|
51
51
|
var debug_1 = require("../../debug");
|
|
52
52
|
var path_1 = require("path");
|
|
53
53
|
var child_process_1 = require("child_process");
|
|
@@ -62,6 +62,7 @@ var messageToSendDSL = "danger://send-dsl";
|
|
|
62
62
|
// Sanitizes the DSL so for sending via STDOUT
|
|
63
63
|
var prepareDangerDSL = function (dangerDSL) {
|
|
64
64
|
if (dangerDSL.github && dangerDSL.github.api) {
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
65
66
|
// @ts-ignore
|
|
66
67
|
delete dangerDSL.github.api;
|
|
67
68
|
}
|
|
@@ -69,11 +70,13 @@ var prepareDangerDSL = function (dangerDSL) {
|
|
|
69
70
|
return JSON.stringify(dangerJSONOutput, null, " ") + "\n";
|
|
70
71
|
};
|
|
71
72
|
exports.prepareDangerDSL = prepareDangerDSL;
|
|
72
|
-
var
|
|
73
|
+
var addSubprocessCallArguments = function (call, args) {
|
|
73
74
|
if (args === void 0) { args = process.argv; }
|
|
74
75
|
return call.concat(["runner"], args.slice(1, args.length));
|
|
75
76
|
};
|
|
76
|
-
exports.
|
|
77
|
+
exports.addSubprocessCallArguments = addSubprocessCallArguments;
|
|
78
|
+
// @deprecated
|
|
79
|
+
exports.addSubprocessCallAguments = exports.addSubprocessCallArguments;
|
|
77
80
|
// Runs the Danger process
|
|
78
81
|
var runDangerSubprocess = function (subprocessName, dslJSON, exec, config) {
|
|
79
82
|
var processName = subprocessName[0];
|