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

changelogify

v1.2.1

Published

A basic changelog manager made to avoid conflicts at git merge

Downloads

1,469

Readme

Changelogify

A basic changelog manager made to avoid conflicts at git merge.

Install

Add the package to your project as a dev dependency:

npm install -D changelogify

Usage

changelogify [options]

Options:
    init          Copy default configuration file into package to be overwriten.
                        If the user configuration file is not found, default one will be used.
    add           Write/overwrite the current git branch changelog file 
                        into ./changelogs/unreleased/
    release       Concat changelogs file from ./changelogs/unreleased/,
                        add them into ./CHANGELOG.md and delete them.

If no option is specified, add is used. This can be changed or removed to display the helper above, see defaultCommand in configuration file.

Example

These three changelogs

{
  "message": "feature 1",
  "type": "Added",
  "branch": "7"
}
{
  "message": "feature 2",
  "type": "Added"
}
{
  "message": "lint",
  "type": "Meta",
  "branch": "8"
}

will be concatenated into CHANGELOG.md

# Changelog

All notable changes to this project will be 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).

## [v1.0.0] - 2020-1-29

### Added
- feature 1 - [7](www.example.com/issues/7)
- feature 2
### Meta
- lint - [8](www.example.com/issues/8)

Commands

Init

With init, the default configuration is copied in ./changelogs/config.json, where you can overwrite it.

{
    // changelog types
    "types": [
        "Added",
        "Changed",
        "Deprecated",
        "Removed",
        "Fixed",
        "Security",
        "Meta"
    ],
    // link to git issue. `NUMBER` is current branch number by default
    // if empty, no link will be provided
    "gitIssueTemplate": "[NUMBER](www.example.com/issues/NUMBER)",
    // automatic commit for `add` command
    "autoCommitAdd": true,
    // associated commit message. `NUMBER` is current branch number by default
    "changelogMessageAdd": "Add changelog entry for #NUMBER",
    // automatic commit for `release` command
    "autoCommitRelease": true,
    // associated commit message.
    "changelogMessageRelease": "changelog",
    // default command if none is passed ("", "add", "init" or "release")
    "defaultCommand": "add"
}

After updating the library, you should execute init. New settings will be appended, keeping the old ones.

It also creates the file ./EMPTY_CHANGELOG.md which you can custom. It will be copied to ./CHANGELOG.md the first time you use the release command.

Add

The add command ask you to write a changelog entry, choose an entry type and a branch number (optional).

It will write it in a unique file in ./changelogs/unreleased/.

$ npx changelogify add

> [email protected] changelog /home/robin/Documents/wanadev/test_changelog
> node node_modules/changelogify/index.js "add"

? What's your changelog entry? Feature 1
? Entry type? Added
? What's your git branch number? (Optional) 12
{
    "message": "Feature 1",
    "type": "Added",
    "branch": "12"
}
written in /changelogs/unreleased/12-test-changelogify_1.json

Changelog committed, use `git push` to write it remotely

You can also pass parameters to it.

$ npx changelogify add --message "Feature 1" --type Added --branch 12
# or
$ npx changelogify add -m "Feature 1" -t Added -b 12

And run it on silent mode.

$ npx changelogify add -m "Feature 1" -t Added -b 12 -s

> [email protected] changelog /home/robin/Documents/wanadev/test_changelog
> node node_modules/changelogify/index.js "add" "-m" "Feature 1" "-t" "Added" "-b" "12" "-s"

Release

The release command merge every changelog files from ./changelogs/unreleased/ and add the new content on ./CHANGELOG.md.

If ./CHANGELOG.md doesn't exist, it is created from ./EMPTY_CHANGELOG.md. Check init if you want to use a custom changelog format.

Changelogs

1.2.1

  • fix fs use of URL on Windows

1.2.0

  • better handling of branch number beginning by 0 or by letters
  • clarify how to link an issue from a branch number
  • cleanup:
    • divide into several files
    • make changelogify an ESM
    • lint
  • check for missing config before add and release commands

1.1.7

  • add default command option in config

1.1.6

  • fix error on release auto commit when unrealeased directory is missing

1.1.5

  • do not throw error at release when unrealeased directory is missing

1.1.3

  • process exits with non-zero code if an error occurs

1.1.2

  • synchronous writing in changelog file at release

1.1.1

  • fix urls in package.json for npm package

1.1.0

  • throw error when JSON changelog files have wrong format
  • remove changelog messages trailing spaces
  • display helper when wrong cli argument submitted

1.0.1

  • add license

1.0.0

  • initial release