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

chnglg

v0.5.3

Published

A maintainer and contributor-friendly tool for generating a human-readable CHANGELOG.md

Downloads

2

Readme

chnglg

A port of the work done in purescript/purescript#4392. Ports the update-changelog.hs script from Haskell to PureScript.

ci badge

Install

The first working release is v0.5.1.

npm i chnglg

Why

To make it easier to keep a good changelog that

  • follows the principles described in Keep a Changelog.
  • helps maintainers write an entry for a PR while they still remember what it does rather than weeks/months later when they've forgotten its context
  • avoids CHANGELOG.md merge conflicts when many PRs are being merged in a short time period
  • properly links to the PRs done in a new release
  • properly accredits the contributors behind those PRs
  • allows maintainers to edit the final changelog before it's finalized

How

Receiving PRs

Each PR will add a single file to the CHANGELOG.d/ directory. Each file will store content in one of two forms:

One where no description is provided, such as...

* A single-line summary of the change made

One where description is provided, such as...

* A single-line summary of the change made

  Here's a more in-depth explanation of the changes made.

  Notice how everything in this section is indented by two spaces.

  All markdown is supported:
  - a list item

  ```javascript
  console.log("code blocks are supported");
  ```

Since there are a variety of changes (e.g. breaking changes, new features, bug fixes, etc), these changes are grouped together in the final section for a given release in the CHANGELOG.md file. To indicate which kind of change a PR is, each file begins with a special prefix (e.g. breaking, feat, fix, etc.) that indicates where its corresponding group.

| Prefix | Group Title | Meaning | | ---------- | ------------------ | -------------------------------------------------- | | breaking | Breaking changes | self-explanatory | | feature | New features | self-explanatory | | fix | Bugfixes | self-explanatory | | misc | Other improvements | anything else that needs to be logged | | int | Internal | work that doesn't directly affect users of project |

The rest of the file's name is irrelevant for the script, but is often used to summarize things at a glance. For example:

  • breaking_add-new-function-arg.md
  • fix_fix-unclickable-login-button.md
  • int_update-ci-to-publish-releases.md
  • misc_update-react-dependency.md

If a PR needs multiple changelog entries for it, it can add multiple files, one for each documented change.

Making a Release

When the maintainer of the project wants to make a release, they update the CHANGELOG.md file by running this script (e.g. purs-changelog update --repo owner/repo). The script will automatically add the PR number and the GitHub username of the authors of the PR to each file's entry, merge all entries together, and then insert them below the preamble in the CHANGELOG.md file.

For example, given the following files

CHANGELOG.d/
  feat_new feature.md
  fix_bug-123.md
  breaking_add-new-function-arg.md
CHANGELOG.md

where the content of each file is

-- CHANGELOG.d/fix_new feature.md
* Added a new feature
-- CHANGELOG.d/fix_bug-123.md
* Fixed login issue due to unclickable button

  Due to changes to CSS, the login button became
  unclickable in a very rare situation.

  If the user moved their mouse over the image nearby,
  the image would resized improperly and cover
  the login button, preventing the user from clicking it.
CHANGELOG.d/breaking_add-new-function-arg.md
* Added a priority `Int` arg to `getUserNickname`

  The arg is used by the backend to determine which
  `GET_NICKNAME` requests to prioritize above others.
CHANGELOG.md
# Changelog

Notable changes to this project are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.0

Initial release

this script will modify CHANGELOG.md to the following

# Changelog

Notable changes to this project are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.0.0

Breaking changes:
* Added a priority `Int` arg to `getUserNickname` (#1 by @aRealGitHubUserName)

  The arg is used by the backend to determine which
  `GET_NICKNAME` requests to prioritize above others.

New features:
* Added a new feature (#2 and #3 by @aRealGitHubUserName, @aRealGitHubUserName2, and @aRealGitHubUserName3)

Bugfixes:
* Fixed login issue due to unclickable button (#4 by @aRealGitHubUserName)

  Due to changes to CSS, the login button became
  unclickable in a very rare situation.

  If the user moved their mouse over the image nearby,
  the image would resized improperly and cover
  the login button, preventing the user from clicking it.

## 1.0.0

Initial release

If prefixes aren't used (e.g. int for Internal), the group won't appear in the updated changelog.

The maintainer at this point can commit the updated CHANGELOG.md file or further edit it before making the new release.