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

conventional-logs

v1.3.8

Published

A project designed to generate changelogs while following Conventional Commit Specifications to make version release and documentation easier.

Downloads

24

Readme

Conventional-Logs

This package is a CLI utility tool for generating a CHANGELOG using Conventional Commits specification as a basis. By writing clean commits, it allows smaller projects to document changes between versions and update the Semantic Version accordingly.

Installing Conventional-Logs

This package can be installed locally to devDependencies:

npm i -D conventional-logs

The package can be executed through an package.json script, or directly in the terminal:

"scripts": {
    "updateChangelog": "npx cologs"
}

How it Works

  1. A user performs a merge --squash on a branch into the master branch, followed by a commit that matches Conventional Commit specifications.
  2. Assuming the main branch is ready to be released, the user runs cologs to parse main branch commits to then add to the local CHANGELOG.md.
  3. cologs will automatically bump the package.json version appropriately and commit the changes to CHANGELOG.md.
  4. The CHANGELOG.md commit will be given a git tag of v<version_number> for future reference.

Initializing CHANGELOG.md and First Release

This will create the CHANGELOG.md file for the first release of the project. Conventional-Logs will use the package.json version declared by the user as the intial release.

npm cologs --first-release

Once the first git tag is created, subsequent calls to cologs will add all commit messages to CHANGELOG.md since the previous tag.

Specifying Additional Files for Version Updates with --bumpList

Some projects can have files that need to have an internal version number updated to match packge.json. An additional configuration file can be defined anywhere in the project to specify these files.

mkdir configDir # An exmaple directory where bumpList.json is stored

Create a file name bumpList.json and create a single property called files with a value containing an array of strings. Each string entry is the an name of the file that needs an internal version number updated.

{
  "files": ["fileToUpdateOne.json", "fileToUpdateTwo.json"]
}

Conventional Logs will do a recursive search to find the location of these files during runtime. Only the name of the file should be provided, and should not include the local or absolute path. Internally, regex is used to identify a SemVer pattern in the file to change the number to the updated package.json version number.

The --bumpList flag can then be used, followed by the absolute path to the bumpList.json. the forward slash must be ommited.

npx cologs --bumpList configDir/bumpList.json