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

standard-commit

v4.3.0

Published

conventional commit

Downloads

17,941

Readme

standard-commit

npm version

A zero-config opiniated, commitizen like command line utility to enforce the conventional commits and have a clean changelog with standard-version.

  • standard-commit: Same as git commit but with prompt and formating of the commit message.

  • standard-commitlint runs commitlint based on your standard-commit config.

  • standard-commithook is meant to be run as a commit-msg git hook to enforce the convention.

Usage

npm install -g standard-commit
standard-commit --help

git alias

# you can create an alias:
git config --global alias.cc '!standard-commit'
# then use:
git cc <option>

commitlint

# Usage: standard-commitlint [options...]
# Where <options> is one of:
#   -f --from  lower end of the commit range to lint.
#   -t --to    upper end of the commit range to lint.
standard-commitlint --help

ci checks

# CI check before merge request
npx -p standard-commit standard-commitlint --from origin/master

repo setup

install yorkie (or husky@next)

npm install --save-dev yorkie standard-commit standard-version

and setup the scripts and commit-msg hook in your package.json

{
  "scripts": {
    "commit": "standard-commit",
    "commitlint": "standard-commitlint",
    "release": "standard-version"
  },
  "gitHooks": {
    "commit-msg": "standard-commithook"
  }
}
# use commit script to commit
npm -s run commit

# use commitlint script to check commit history
npm -s run commitlint -- --from  origin/master

# use release script to create a version commit
npm -s run release

Configuration

standard-commit --init

you can configure standard-commit via:

  • A .standard-commitrc file, written in YAML or JSON, with optional extensions: .yaml/.yml/.json.
  • A standard-commit.config.js file that exports an object.
  • A standard-commit key in your package.json file.
{
  /**
   * Allowed types
   *
   * @default ['feat','fix','chore','docs','style','refactor','test']
   */
  types?: string[]

  /**
   * When set to 'staged', suggest from staged files (git).
   * When set to 'packages, suggest from package names (monorepo).
   * When set to an array, the list of scopes.
   *
   * @default 'staged'
   */
  scopes?: 'staged' | 'packages' | string[]

  /**
   * When set to 'suggest', scope is optional.
   * When set to 'enforce, scope can not be empty.
   * When set to false, scope prompt is skipped.
   * @default false
   */
  promptScope?: 'suggest' | 'enforce' | false

  /**
   * whether to strip the scope for scoped packages
   * @default true
   */
  stripPackageScope?: boolean

  /**
   * set to false to skip.
   *
   * @default true
   */
  promptBody?: boolean

  /**
   * set to false to skip.
   *
   * @default true
   */
  promptBreaking?: boolean

  /**
   * set to false to skip.
   *
   * @default true
   */
  promptIssues?: boolean

  /**
   * set to false to skip.
   *
   * @default true
   */
  promptConfirm?: boolean

  /**
   * set to true to enforce 'Signed-off-by:' in footer.
   *
   * @default false
   */
  enforceSignedOffBy?: boolean

  /**
   * enforce issue reference when true else for specified list of types.
   *
   * @default []
   */
  enforceIssueRefs?: boolean | string[]

  /**
   * enforce issue reference to match the given pattern
   *
   * @default ['#']
   */
  issuePrefixes?: string[]

  /**
   * extra commitlint rules
   *
   * see http://marionebl.github.io/commitlint/#/reference-rules
   */
  rules?: {}
}