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

@qoollo/changelog

v1.4.0

Published

Утилита для обновления CHANGELOG.md на основе нескольких YAML файлов с изменениями

Downloads

4

Readme

@qoollo/changelog

This npm package provides two CLI tools for managing changes and updating changelogs.

Installation

Install the package globally using npm:

npm install -g @qoollo/changelog

or locally, in which case use it in npm scripts or with npx:

npm install @qoollo/changelog

CLI Tools

generate-changes-file

The generate-changes-file script generates a new YAML file from a template. It accepts the path to the new YAML file, the base URL for the user page and the username of the contributor.

Usage:

generate-changes-file <path-to-new-yaml-file> <base-user-url> <username>

update-changelog

The update-changelog tool writes a new record in a changelog file based on multiple YAML files describing changes and updates package.json version if necessary. It accepts the path to the directory with YAML files containing changes and the path to the markdown changelog file.

Usage:

update-changelog <changes-dir> <changelog-path> [options]

Options:

  • -nv, --new-version <string>: Specify the version; the script will prompt the user if not provided. Use major, minor, patch or current to automatically resolve the new version number.
  • --date <string>: Specify the release date (use current for the current date); the script will prompt the user if not provided.
  • --version-update [boolean]: Automatically update the version in package.json. Default is true. Use --no-version-update or --version-update false to skip version update. Will prompt user if not specified.
  • --clean-up [boolean]: Automatically remove processed YAML files. Default is true. Use --no-clean-up or --clean-up false to keep processed YAML files. Will prompt user if not specified.
  • -y, --skip-confirmation: Automatically proceed with changelog update without confirmation.
  • -n, --check-validity: List valid files without proceeding after parsing changes.

Example

Generate Changes:

generate-changes-file path/to/new-changes.yaml https://git.qoollo.com john_doe

This command generates a new changes file named new-changes.yaml in the specified path with the contributor link based on provided base url and username.

Usage in husky post-checkout hook:

You can call generate-changes-file in husky's post-checkout hook to create a new changes file for every new branch. In the following example, the changes file is generated only if the branch name starts with numbers indicating the issue number.

# .husky/post-checkout

#!/bin/sh
[ -n "$CI" ] && exit 0

. "$(dirname "$0")/_/husky.sh"

ISSUE=$(git rev-parse --abbrev-ref HEAD | grep -m 1 -E '^[0-9]+' | head -n1)

USER_URL_BASE=https://git.qoollo.com

USERNAME=$(git config user.name)

if [ -n "$ISSUE" ]; then
    changesFile="changes/${ISSUE}.yaml"
    npx generate-changes-file ${changesFile} ${USER_URL_BASE} ${USERNAME}
fi

YAML changes example

Refer to example.yaml for guidance on how to fill the change entries.

Update Changelog:

update-changelog path/to/changes path/to/changelog.md --new-version minor --date 21.02.2024 --version-update --clean-up -y

This command updates the changelog file based on the changes in the specified directory. It automatically updates the version in package.json to the next minor version, marks the release date as "21.02.2024", removes processed YAML files, and proceeds without confirmation.

License

This project is licensed under the MIT License - see the LICENSE file for details.