New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

patroller

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

patroller

A CLI tool for removing unused dependencies, sorting the dependencies, locking the dependencies, and keeping a watch on the licenses.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Patroller

Version Downloads/week License

A CLI tool for removing unused dependencies, sorting the dependencies, locking the dependencies, and keeping a watch on the licenses.

Usage

$ npm install -g patroller
$ patroller COMMAND
running command...
$ patroller (-v|--version|version)
patroller/1.1.0 darwin-x64 node-v12.16.3
$ patroller --help [COMMAND]
USAGE
  $ patroller COMMAND
...

Options

  • -h | --help : shows the CLI help
  • -v | --version : shows the CLI version
  • -s | --sort : sorts the dependencies in package.json
  • -u | --unused : removes the unused dependencies from node_modules and the package.json
  • -l | --lock : locks the dependencies in package.json and removes the wildcard ( ^ )
  • --license : checks the dependencies for difference in license from the root repository
  • -a | --all : performs all the actions above (except help and version)
  • --yarn : uses yarn instead of npm
  • -f | --force : forcefully removes unused dependencies

Scripts

Use it in the package.json for the CI CD to keep your dependencies clean.

{
  ...
  "scripts": {
    "patroller": "patroller --all --force"
  }
}

Husky Hooks

Install husky

$ npm install husky --save-dev

Update the package.json

{
  "scripts": {
    "patroller": "patroller --all --force"
  },
  "husky": {
    "hooks": {
      "pre-commit" : "npm patroller"
    }
  }
}

Keywords

FAQs

Package last updated on 22 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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