This repository was archived by the owner on Apr 13, 2023. It is now read-only.
chore(deps): update dependency danger to v3.7.14 #2016
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull Request updates dependency danger from
v3.4.5tov3.7.14Note: This PR was created on a configured schedule ("after 10pm every weekday,before 5am every weekday" in timezone
America/Los_Angeles) and will not receive updates outside those times.Release Notes
v3.7.14Compare Source
v3.7.13Compare Source
danger.github.utils.createUpdatedIssueWithID- @ortav3.7.12Compare Source
v3.7.11Compare Source
v3.7.10Compare Source
v3.7.9Compare Source
v3.7.8Compare Source
v3.7.7Compare Source
v3.7.6Compare Source
v3.7.5Compare Source
v3.7.4Compare Source
v3.7.3Compare Source
v3.7.2Compare Source
Improved debugging when using the GitHub OctoKit - @orta
Added
danger.github.utils.createUpdatedIssueWithIDwhich can be used to have danger continually update a singleissue in a repo, for example:
Will first create, then update that issue with a new body. - @orta
v3.7.1Compare Source
v3.7.0Compare Source
Adds support for the GH Checks API.
This brings some interesting architectural changes inside Danger, but more important to you dear reader, is that using
the Checks API has some API restrictions. This makes in infeasible to re-use the user access token which we've
previously been recommending for setup.
Instead there are two options:
The security model of the GitHub app means it's totally safe to use our GitHub app, it can only read/write to checks
and has no access to code or organizational data. It's arguably safer than the previous issue-based comment.
To use it, you need to hit the above link, install the app on the org of your choice and then get the install ID from
the URL you're redirected to. Set that in your CI's ENV to be
DANGER_JS_APP_INSTALL_IDand you're good to go.If you want to run your own GitHub App, you'll need to set up a few ENV vars instead:
DANGER_GITHUB_APP_ID- The app id, you can get this from your app's overview page at the bottomDANGER_GITHUB_APP_PRIVATE_SIGNING_KEY- The whole of the private key as a string with\ninstead of newlinesDANGER_GITHUB_APP_INSTALL_ID- The installation id after you've installed your app on an orgChecks support is still a bit of a WIP, because it's a whole new type of thing. I don't forsee a need for Danger to be
deprecating the issue based commenting (we use that same infra with bitbucket).
So now there are three ways to set up communications with GitHub, I'm not looking forwards to documenting that.
@orta
JSON diffs use the JSON5 parser, so can now ignore comments in JSON etc @orta
Allows the synchronous execution of multiple dangerfiles in one single "danger run".
Not a particularly useful feature for Danger-JS, but it means Peril can combine many runs into a single execution
unit. This means people only get 1 message. @orta
v3.6.6Compare Source
v3.6.5Compare Source
danger process@ortav3.6.4Compare Source
v3.6.3Compare Source
v3.6.2Compare Source
v3.6.1Compare Source
v3.6.0Compare Source
3.5.0 - 3.5.1
3.4.7
3.4.6
3.4.5
3.4.4
@sunshinejr
3.4.3
3.4.2
3.4.1
3.4.0
Adds support for inline comments when using GitHub.
This is one of those "massive under the hood" changes, that has a tiny user DSL surface. From this point onwards
fail,warn,messageandmarkdownall take an extra two optional params:file?: stringandline?: number.Adding
fileandlineto the call of any exported communication function will trigger one of two things:Inline messages are edited/created/deleted with each subsequent run of
danger ciin the same way the main commentdoes. This is really useful for: linters, test runners and basically anything that relies on the contents of a file
itself.
If you're using
danger processto communicate with an external process, you can return JSON like:{ "markdowns": [ { "file": "package.swift", "line": 3, "message": "Needs more base" } ] // [...] }-- @sunshinejr
Adds a data validation step when Danger gets results back from a process . @orta
3.3.2
3.3.1
3.3.0
Fix
committerfield issue - missing in Stash API by using commit author instead. [@zdenektopic][]Adds a new command:
reset-statusThis command is for setting the CI build status in advance of running Danger. If your Danger build relies on running
tests/linters, then you might want to set the PR status (the red/green/yellow dots) to pending at the start of your
build. You can do this by running
yarn danger reset-status.@mxstbr
3.2.0
Add BitBucket Server support.
To use Danger JS with BitBucket Server: you'll need to create a new account for Danger to use, then set the following
environment variables on your CI:
DANGER_BITBUCKETSERVER_HOST= The root URL for your server, e.g.https://bitbucket.mycompany.com.DANGER_BITBUCKETSERVER_USERNAME= The username for the account used to comment.DANGER_BITBUCKETSERVER_PASSWORD= The password for the account used to comment.Then you will have a fully fleshed out
danger.bitbucket_serverobject in your Dangerfile to work with, for example:The DSL is fully fleshed out, you can see all the details inside the [Danger JS Reference][ref], but the summary is:
You can see more in the docs for Danger + BitBucket Server.
-- @azz
Don't check for same user ID on comment when running as a GitHub App. [@tibdex][]
3.1.8
3.1.7
3.1.6
3.1.5
danger localcrashing when comparing master to HEAD with no changes. @orta3.1.4
3.1.2-3.1.3
3.1.1
danger runner(the hidden command which runs the process) to accept unknown command flags (such as onespassed to it via
danger local.) - @adam-moss/@orta3.1.0
Adds a new command
danger local.This command will look between the current branch and master and use that to evaluate a dangerfile. This is aimed
specifically at tools like git commit hooks, and for people who don't do code review.
danger.githubwill be falsy in this context, so you could share a dangerfile betweendanger localanddanger ci.When I thought about how to use it on Danger JS, I opted to make another Dangerfile and import it at the end of the
main Dangerfile. This new Dangerfile only contains rules which can run with just
danger.git, e.g. CHANGELOG/READMEchecks. I called it
dangerfile.lite.ts.Our setup looks like:
You'll need to have husky installed for this to work. - @orta
system. It's used in
danger pr,danger ci --stdoutanddanger local. - @orta@orta
3.0.5
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
DEBUG="*" yarn danger [etc]and you'll get alot of output. This should make it much easier to understand what's going on. - @orta
3.0.0
Updates to the CLI user interface. Breaking changes for everyone.
TLDR - change
yarn dangertoyarn danger ci.Danger JS has been fighting an uphill battle for a while with respects to CLI naming, and duplication of work. So, now
it's been simplified. There are four user facing commands:
danger init- Helps you get started with Dangerdanger ci- Runs Danger on CIdanger process- Likecibut lets another process handle evaluating a Dangerfiledanger pr- Runs your local Dangerfile against an existing GitHub PR. Will not post on the PRThis release deprecates running
dangeron it's own, so if you haveyarn dangerthen move that beyarn danger ci.Each command name is now much more obvious in it intentions, I've heard many times that people aren't sure what
commands do and it's is still even worse in Danger ruby. I figure now is as good a time as any a good time to call
it a clean slate.
On a positive note, I gave all of the help screens an update and tried to improve language where I could.
2.1.9-10
danger pranddangerinfinite looping - @orta2.1.8
danger prif you don't have a token set up - @orta2.1.7
dangerwith params - @ortadanger prnot acting likedangerWRT async code - @ortatsconfig.jsonparse to be JSON5 friendly - [@gantman][]danger.github.thisPRto use the base metadata for a PR, I'm too used to branch workflows - @orta2.1.6
2.1.5
2.1.4
dangeranddanger process, so you can have multiple Dangercomments on the same PR. - @orta
2.1.1 - 2.1.2 - 2.1.3
danger init- @orta2.1.0
danger init- @ortagloaballytypo in documentation. @dfalling2.0.2 - 2.0.3
danger runsubprocess - @orta2.0.1
2.0.0
danger.js.flowfix to handle exports correctly, you probably need to add.*/node_modules/danger/distribution/danger.js.flowto the[libs]section of your settings for it to work though -@orta
2.0.0-beta.2
danger.github.utilsin that it didn't work as of b1, and now it does 👍 - @ortadanger.js.flowin the root of the project, this may be enough to support flow typing, thanks to@joarwilk and flowgen - @orta
2.0.0-beta.1
Converts the command
danger(anddanger run) to usedanger processunder the hood. What does this do?Dangerfile evaluation is in a separate process, run without a vm sandbox. This fixes the async problem which we
created
schedulefor. Previously, any async work in your Dangerfile needed to be declared to Danger so that itknew when all of the work had finished. Now that the running happens inside another process, we can use the
on_exitcalls of the process to know that all work is done. So, in Danger (not in Peril) async code will workjust like inside a traditional node app.
Makes
danger processa first class citizen. This is awesome because there will be reliable support for otherlanguages like danger-swift, danger-go and more to come.
The
danger processsystem is now codified in types, so it's really easy to document on the website.Adds a
--jsand--jsonoption todanger prwhich shows the output in a way that works withdanger process.This means you can preview the data for any pull request.
./@orta
2.0.0-alpha.20
Moves away from vm2 to a require-based Dangerfile runner. This removes the sandboxing aspect of the Dangerfile
completely, but the sandboxing was mainly for Peril and I have a plan for that.
https://github.com/danger/peril/issues/159I would like to move the main parts of Danger JS to also work like
danger process, so I'll be continuing to work as aalpha for a bit more. One interesting side-effect of this could be that I can remove
schedulefrom the DSL. I've nottested it yet though. Turns out this change is real hard to write tests for. I've made #394 for that.
./@orta
2.0.0-alpha.18 - 19
danger processruns - @ashfurrow2.0.0-alpha.17
2.0.0-alpha.16
Some UX fixes:
2.0.0-alpha.15
diffForFile,JSONPatchForFile, andJSONDiffForFileto include created and removed files - #368 - bdotdub2.0.0-alpha.14
danger processlogging, and build fails correctly #363 - @orta2.0.0-alpha.13
scheduleto be more accepting of what it actually takes - @orta2.0.0-alpha.12
2.0.0-alpha.11
danger processcommand actually available via the CLI - @orta2.0.0-alpha.10
Adds a
danger processcommand, this command takes amn argument of a process to run which expects the Danger DSL asJSON in STDIN, and will post a DangerResults object to it's STDOUT. This frees up another process to do whatever they
want. So, others can make their own Danger runner.
An example of this is Danger Swift. It takes a JSON document via STDIN,
compiles and evaluates a Swift file then passes the results back to
danger processvia STDOUT.
Another example is this simple Ruby script:
Which is basically Ruby Danger in ~10LOC. Lols.
This is the first release of the command, it's pretty untested, but it does work. - @orta
2.0.0-alpha.9
Uses the Babel 7 alpha for all source compilation with JS, Flow+JS and TS. This worked without any changes to our
internal infra which is pretty awesome. All TS tests passed. Babel 7 is still in alpha, but so is Danger 2.0 - so I'm
happy to keep Danger in a pretty long alpha, till at least Babel 7 is in beta.
It also still supports using TypeScript via the "
typescript"module, if you have that installed. - @ortadanger.github.thisPRnow uses the PR's head, not base - @orta2.0.0-alpha.8
diff_urlinstead of thediffversion header, as it conflicted with Peril - @orta2.0.0-alpha.6-7
2.0.0-alpha.4-5
ExecutorAPI - @orta2.0.0-alpha.2-3
jest-*dependencies - @orta2.0.0-alpha.1
Support a vm2 based Dangerfile runner as an alternative to the jest
infrastructure. There are a few main reasons for this:
I haven't been able to completely understand how Jest's internals work around all of the code-eval and pre-requisite
setup, which has made it hard to work on some more complex Peril features.
Jest releases are every few months, personally I love this as a user of Jest, as an API consumer it can be difficult
to get changes shipped.
The fact that both Danger/Jest make runtime changes means that you need to update them together
I have commit access to vm2, so getting changes done is easy
I like to think of it as having gone from Jest's runner which is a massive toolbox, to vm2 which is a tiny toolbox
where I'll have to add a bunch of new tools to get everything working.
The massive downside to this is that Danger now has to have support for transpiling via Babel, or from TypeScript
unlike before, where it was a freebie inside Jest. Jest handled this so well. This means that a Dangerfile which used
to "just work" with no config may not. Thus, IMO, this is a breaking major semver.
Is it likely that you need to make any changes? So far, it seems probably not. At least all of the tests with
Dangerfiles original from the older Jest runner pass with the new version.
This is an alpha release, because it's knowingly shipped with some breakages around babel support, specifically:
regeneratorRuntimeto be set up aren't working yetThose are blockers on a 2.0.0 release.
1.2.0
Exposes an internal API for reading a file from a GitHub repo as
danger.github.utils.fileContents- @ortaIdeally this is what you should be using in plugins to read files, it's what Danger uses throughout the codebase
internally. This means that your plugin/dangerfile doesn't need to rely on running on the CI when instead it could run
via the GitHub API.
Update prettier - @orta
Removes dtslint as a dependency - sapegin/orta
1.1.0
dangerexport, it wasn't needed or used. - @orta:from the filename to fix a checkout issue on windows - mlabrum1.0.0
Hello readers! This represents a general stability for Danger. It is mainly a documentation release, as it corresponds
to http://danger.systems/js/ being generally available. I made the initial commit back in 20 Aug 2016 and now it's
30th June 2017. It's awesome to look back through the CHANGELOG and see how things have changed.
You can find out a lot more about the 1.0, and Danger's history on my
Artsy blog post on the Danger 1.0.
0.21.1
0.21.0
danger-plugin-yarn - @orta
This is my first non-trivial plugin, based on infrastructure from @macklinu. Plugins are looking great, you can get some
info at https://github.com/macklinu/generator-danger-plugin.
0.20.0
danger prcommands are not running on windows - kwonojjestin getting started docs - palleas0.19.0
message(),warn(), andfail()messages. - macklinuAn example:
Will result in:
src/lib/components/artist/artworks/__tests__/index-tests.tsxsrc/lib/components/artwork_grids/__tests__/infinite_scroll_grid-tests.tsxsrc/lib/containers/__tests__/works_for_you-tests.tsxIf these files are supposed to not exist, please update your PR body to include "Skip New Tests".
Adds
github.api. This is a fully authenticated client from the github npmmodule. - @orta
An easy example of it's usage would be using Danger to add a label to your PR. Note that Danger will have the
permissions for your account, so for OSS repos - this won't work.
Yeah, that's a bit verbose, I agree. So, there's also
github.thisPRwhich should simplify that. It aims to provide alot of the values for the current PR to use with the API.
You could use this API for a bunch of things, here's some quick ideas:
api.pullRequests.createReviewRequest)api.issues.addLabels)api.orgs.checkMembership)api.projects.updateProject)0.17.0
Enhancements to
danger.git.diffForFile()- @namuoldiffTypessecond argument in favor ofresult.addedandresult.removedresult.beforeandresult.afterfor easy access to full contents of the original & updated filedanger.git.diffForFileis now anasyncfunctionTL;DR:
0.16.0
diffTypesoption todiffForFile- alex31650.15.0
0.14.2
Updated jest-* dependencies to 19.x - @orta
Updating the jest-* dependencies seems to be exhibiting strange behavior in tests for windows if you update, and use
windows, can you please confirm that everything is 👍
Added type shapings to
JSONPatchForFile- @ortaReplaced deprecated
lodash.isarraypackage withArray.isArray- damassi0.14.1
@types/chalkfrom dependencies to devDependencies - @orta0.14.0
TypeScript Dangerfiles are now support in Danger - @orta
We use TypeScript in Danger, and a lot of my work in Artsy now uses TypeScript (see:
JS2017 at Artsy), so I
wanted to explore using TypeScript in Dangerfiles.
This is built on top of Jest's custom transformers, so if you are already using Jest with TypeScript, then you can
change the
dangerfile.jstodangerfile.tsand nothing should need changing ( except that you might have newwarnings/errors ) (note: in changing this for Danger, I had to also add the
dangerfile.tsto the"exclude"section of the
tsconfig.jsonso that it didn't change the project's root folder.)This repo is now using both a babel Dangerfile (running on Circle CI) and a TypeScript one (running on Travis) to
ensure that we don't accidentally break either.
Created a new
danger.d.tsfor VS Code users to get auto-completion etc - @ortaAdded a two new
gitDSL functions:git.JSONDiffForFile(filename)andgit.JSONPatchForFile(filename).git.JSONPatchForFileThis will generate a rfc6902 JSON patch between two files inside your repo. These patch files are useful as a
standard, but are pretty tricky to work with in something like a Dangerfile, where rule terseness takes priority.
git.JSONDiffForFileThis uses
JSONPatchForFileto generate an object that represents all changes inside a Dangerfile as a singleobject, with keys for the changed paths. For example with a change like this:
{ "dependencies": { "babel-polyfill": "^6.20.0", + "chalk": "^1.1.1", "commander": "^2.9.0", "debug": "^2.6.0" }, }You could become aware of what has changed with a Dangerfile in a
schedule'd function like:The keys:
addedandremovedonly exist on the object if:beforeandafterare both objects - in which caseaddedandremovedare the added or removed keysbeforeandafterare both arrays - in which caseaddedandremovedare the added or removed valuesExposed all global functions ( like
warn,fail,git,schedule, ... ) on thedangerobject. - @ortaThis is specifically to simplify building library code. It should not affect end-users. If you want to look at making
a Danger JS Plugin, I'd recommend exposing a function which takes the
dangerobject and working from that. If you'reinterested, there is an active discussion on plugin support in the DangerJS issues.
Improves messaging to the terminal - @orta
Adds the ability to not have Danger post to GitHub via a flag:
danger run --text-only- @ortaFix a crasher with
prs.find#181 - @orta0.13.0
Add
danger.utilsDSL, which includesdanger.utils.href()anddanger.utils.sentence()- macklinuWe were finding that a lot of Dangerfiles needed similar functions, so we've added a
utilsobject to offer functionsthat are going to be used across the board. If you can think of more functions you use, we'd love to add them. Ideally
you shouldn't need to use anything but Danger + utils to write your Dangerfiles.
Adds
danger.github.utils- which currently has only one function:fileLinks- @ortaMost of the time people are working with a list of files (e.g. modified, or created) and then want to present
clickable links to those. As the logic to figure the URLs is very GitHub specific, we've moved that into it's own
object with space to grow.
0.12.1
0.12.0
Added support for handling async code in a Dangerfile - deecewan
This is still a bit of a work in progress, however, there is a new function added to the DSL:
schedule.A Dangerfile is evaluated as a script, and so async code has not worked out of the box. With the
schedulefunctionyou can now register a section of code to evaluate across multiple tick cycles.
schedulecurrently handles two types of arguments, either a promise or a function with a resolve arg. Assuming youhave a working Babel setup for this inside your project, you can run a Dangerfile like this:
Or if you wanted something simpler,
Adds new GitHub DSL elements - deecewan
danger.github.issue- As a PR is an issue in GitHub terminology, the issue contains a bit more metadata. Mainlylabels, so if you want to know what labels are applied to a PR, use
danger.github.issue.labelsdanger.github.reviews- Find out about your reviews in the new GitHub Reviewer systems,danger.github.requested_reviewers- Find out who has been requested to review a PR.0.11.3 - 0.11.5
Internal changes for usage with Peril - @orta
Add
danger pr --repl, which drops into a Node.js REPL after evaluating the dangerfile - macklinuAdd support for Codeship - deecewan
0.11.0 - 0.11.2
0.10.1
0.10.0
The workflow is that you find a PR that exhibits the behavior you'd like Danger to run against, then edit the local
Dangerfile.jsand runyarn run danger prhttps://github.com/facebook/jest/pull/2629``.This will post the results to your console, instead of on the PR itself.
jest-environment-nodeto the Package.json - @orta0.9.0
Adds support for
git.commitsandgithub.amrom.workers.devmits- @ortaWhy two? Well github.amrom.workers.devmits contains a bunch of github specific metadata ( e.g. GitHub user creds, commit comment
counts. ) Chances are, you're always going to use
git.commitshowever if you want more rich data, the GitHub one isavailable too. Here's an example:
-dcommandline arg - kwonojDEBUG=danger:*environment variable - kwonoj0.8.0
danger run -cito specify external CI provider - kwonoj--verbosetodanger, which for now will echo out all the URLs Danger has requested - @orta0.7.3-4-5
0.7.2
0.7.1
dangerthrows an error - macklinu0.7.0
You can build and run in vscode using your own custom
env/development.envfile. This is useful because you can usethe debugger against a real PR. See
env/development.env.examplefor syntax. - @ortaUses
jest-transformandjest-runtimeto eval and apply babel transforms.This does two things, makes it feasible to do hosted-danger and makes it possible
to write your Dangerfile in a way that's consistent with the rest of your JavaScript. - @orta
Add tests directory to .npmignore - macklinu
Update to Jest 18 - macklinu
0.6.10
danger- @orta0.6.9
babel-polyfilla direct dependency, this is because it is actually an implicit dependency in the app. I'm notsure how I feel about this, I guess if we use a part of it in the babel translation of a user's Dangerfile them I'm OK
with it. - @orta
0.6.6 - 0.6.7 - 0.6.8
0.6.5
0.6.4
DANGER_TEST_REPOandDANGER_TEST_PRwill allow you initialize the FakeCI with a repo of your choice.See README.md for more info
DANGER_GITHUB_API_TOKENin the ENV - nsfmc / orta0.6.3
0.5.0
danger.pr->danger.github.pr, I've also created interfaces for them - @ortawarn,message,markdownare all ported over to DangerJS - @ortanpm run export-flowtype- @orta0.0.5-0.0.10
@orta
0.0.4
0.0.3
0.0.2
OK, first usable for others version. Only supports GitHub and Travis CI.
You can run by doing:
Make sure you set a
DANGER_GITHUB_API_TOKENon your CI -see the Ruby guide for that.
Then you can make a
dangerfile.js(has to be lowercase, deal with it.) It has access to a whopping 2 DSL attributes.prprobably won't be sticking around for the long run, but if you're using a0.0.2release, you should be OK withthat. It's the full metadata of the PR, so
this JSON file.
gitcurrently has:which are string arrays of files.
fail(message: string)will let you raise an error, and will make the process return 1 after the parsing has finished.Overall: your Dangerfile should look something like:
That should do ya. I think. This doesn't support babel, and I haven't explored using other modules etc, so...
./@orta
0.0.1
Not usable for others, only stubs of classes etc. - @orta
v3.5.1Compare Source
v3.5.0Compare Source
v3.4.7Compare Source
v3.4.6Compare Source
This PR has been generated by Renovate Bot.