Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

danger

Package Overview
Dependencies
Maintainers
3
Versions
320
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

danger - npm Package Versions

1
3031

0.0.10

Diff

Changelog

Source

0.0.5-0.0.10

  • Changes some files cashing, added some logs, a bit of error reporting, and verifying everything works through npm - [@orta]
orta
published 0.0.9 •

orta
published 0.0.8 •

orta
published 0.0.7 •

orta
published 0.0.6 •

orta
published 0.0.5 •

Changelog

Source

0.0.5-0.0.10

  • Changes some files cashing, added some logs, a bit of error reporting, and verifying everything works through npm - [@orta]
orta
published 0.0.4 •

Changelog

Source

0.0.4

  • Danger edit an existing post, and delete it when it's not relevant - [@orta]
orta
published 0.0.3 •

Changelog

Source

0.0.3

  • Danger will post a comment on a GitHub PR with any Fails - [@orta]
orta
published 0.0.2 •

Changelog

Source

0.0.2

OK, first usable for others version. Only supports GitHub and Travis CI.

You can run by doing:

danger

Make sure you set a DANGER_GITHUB_API_TOKEN on 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.

pr
git
fail(message: string)

pr probably won't be sticking around for the long run, but if you're using a 0.0.2 release, you should be OK with that. It's the full metadata of the PR, so this JSON file. git currently has:

git.modified_file
git.created_files
git.deleted_files

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:

import { danger } from "danger"

const hasChangelog = danger.git.modified_files.includes("changelog.md")
if (!hasChangelog) {
  fail("No Changelog changes!")
}

That should do ya. I think. This doesn't support babel, and I haven't explored using other modules etc, so...

./[@orta]

orta
published 0.0.1 •

Changelog

Source

0.0.1

Not usable for others, only stubs of classes etc. - [@orta]

1
3031
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc