Tale of Two Dangers

Danger has been in the works since 2015, in that time there’s been two complete implementations of the idea. A a third semi-implementation Why? Well that’s a question answered in the blog post on the Artsy blog here.

It’s understandable if you are not in a Ruby or JavaScript context it can be a bit hard to decide which version of Danger you should use. Therefore this document is a high-level overview of the differences between them.

Danger on Ruby is more mature, has more features, a solid plugin eco-system and covers more platforms. It supports Ruby 2.0 and above, and will likely work on any CI setup without additional work. For a lot of projects this is the right option.

The project is on version 5.x with about a hundred releases, that’s a lot of battle testing. I consider it in a great place and is unlikely to have breaking changes from this point onwards. The GitHub issues to number of downloads is really healthy too.

I have no intention of ever deprecating Danger Ruby.

Get started with Danger on Ruby.

Danger JavaScript was built with a larger scale in mind. It is stable now, well, as much as you can be in the Node ecosystem.

It has it’s own plugin eco-system and is doing a bunch of things the Ruby version cannot. Danger JavaScript probably has everything you probably need right now, though it does not work with GitLab yet. If you’re working in a node environment this is definitely the right choice. FWIW, I find it easier to work with JavaScript Dangerfiles because they have TypeScript annotations.

Using Danger JS now will make it easier to move to Peril the server version of Danger, which gives you the ability to skip running Danger on CI, and instead have that feedback instantly.

Get started with Danger on JavaScript.

You may notice that there was a Swift logo in the index page, Swift is the first language supported by Danger JS’s process environment. Once a new language has been built out, and is stable, then I’ll be building out some documentation in this site.