npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@novemberfiveco/highvoltage-js

v1.0.2

Published

Highvoltage runs Danger.js for your N5 project

Downloads

1,761

Readme

Highvoltage JS

Danger High Voltage

Highvoltage JS is a thin wrapper around Danger. It allows to perform automated code review tasks on pull requests in Bitbucket. Highvoltage JS allows to have a central danger.js file.

Getting Started

Install Highvoltage by running:

npm install --save-dev @novemberfiveco/highvoltage-js

Batteries included

The following checks are performed in the following order

  1. ESLint: ESLint is run on the created / changed files only and will use the projects ESLint configuration
  2. Npm Audit: Npm Audit is run and a summary is printed as a warning
  3. Package Lock consistency: Displays a warning if package.json is updated but package-lock.json not
  4. Highvoltage version: Npm checks if highvoltage is running on the latest version
  5. Display a message when there are open TODOs found in your PR.
  6. ... your check here!

Running on CI

If you are following the bitrise default configuration template (you should) then you are all set. On your new PR Danger will automatically run and fail the build if needed.

If you are not on the default bitrise configuration you must add a NPM step containing


npm run highvoltage

Local Development

The easiest way for local development is creating a PR in bitbucket on a project to test out your code, then you can use the following command to run Highvoltage locally. This will perform the same checks as on CI but wont place any comments on the PR.

Inside the repo you want to test add the following script to your package.json

"highvoltage": "node_modules/.bin/highvoltage",

In order to run this, you'll need to add the following env variables DANGER_BITBUCKETCLOUD_USERNAME and DANGER_BITBUCKETCLOUD_PASSWORD, more info on what those are can be found here

Use NPM link to link your new local version to the repo that you want to test https://docs.npmjs.com/cli/v9/commands/npm-link

Inside your test repo go to node_modules/.bin/highvoltage and replace the node modules link so that it's correctly linked for local development

 $PWD/node_modules/@novemberfiveco/highvoltage-js/ $1 --dangerfile $PWD/node_modules/@novemberfiveco/highvoltage-js/dangerfile.js "${@:2}"

then you should be able to run


npm run highvoltage pr https://bitbucket.org/appstrakt/<PROJECT NAME>/pull-requests/<PR ID>

FAQ

Q: Why is this project written in Javascript?

A: A choice was made to use Javascript since this could run on anything that has node installed. This lowers the overall complexicy of the project and possible typescript version conflicts.

Q: I cannot believe you didn't add a check for insert awesome plugin here?!

A: Feel free to create a PR with the plugin

TODO

  • [ ] Enable commit lint, after verification which standard to follow
  • [ ] Add tests for the plugin