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 🙏

© 2025 – Pkg Stats / Ryan Hefner

commit-context

v0.2.2

Published

adds context in commit messages based in the branch name

Downloads

0

Readme

commit-context

Gives context to commit messages from branch name

  • Supports Git flow branch naming conventions
  • Builds commit message based on conventional commits

How it works?

After properly configured with git hooks, your commit messages will be concatenated with informations based in your branch name. The default configuration is set to expect a branch naming with type/ticket (example: feature/ID-1249), and have the following template message: {{type}}: [{{ticket}}] {{message}}.

So, from this branch, when you commit with the message:

"My awesome commits"

The final commit message will be:

"feat: [ID-1249] My awesome commits"

Note that "feature" was converted to "feat" to match the conventional commits specifications.

You can customize these options to follow any pattern.

Setup with Husky

  1. Install commit-context and husky
npm install husky commit-context
  1. Init husky
npx husky-init && npm install 

Note: This step will create a pre-commit git hook. You can remove it from .husky/pre-commit.

  1. Add a commit-msg git hook
npx husky add .husky/commit-msg 'npx commit-context $1' 

Customization

You can add custom configurations in your package.json:

{
  "commitContext": {
     "branchVars": ["type", "ticketId"],
     "messageTemplate": "{{type}}: [{{ticketId}}] {{message}}",
     "separator": "/",
     "useConventionalTypes": true,
  }
}

Options

prop | type | descrption | default value :-- | :-- | :-- | :-- branchVars | array | set the name of each item in your branch name (split by the separator) | ["type", "ticketId"] messageTemplate | string | set the template for the commit messages (gets variables from branchVars) | "{{type}}: [{{ticketId}}] {{message}}" separator | string | separator to split values from branch name | "/" useConventionalTypes | boolean | converts types from branch name to match conventional commits | true