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

chg

v0.4.0

Published

simple changelog/release history manager

Downloads

239

Readme

chg Build Status

unfancy release history tracking

blog post

functions:

  • init - create a CHANGELOG.md file
  • add - add new changes to the changelog under a 'HEAD (Unreleased)' heading
  • release - move all unreleased changes under a new release version

chg can be useful when built into a release/deploy script or paired with a pull request merging script like pulley.

It does not try to automatically generate changes from git commits or github pull requests, though you could build that on top of the chg functions.

Example

CHANGELOG
=========

## HEAD (Unreleased)
* Removed crusty semantic html, javascript app ftw

--------------------

## 2.0.0 (2007-3-13)
* Removed horrible tables, semantic html ftw
* Switched background to vertical gradient
* Added dropshadows to EVERYTHING

## 1.1.1 (2002-08-16)
* Added a dot.gif to 3,000 table cells to fix layout issues

## 1.1.0 (2002-05-17)
* Removed horrible Flash, table layout ftw
* Switched background to horizontal gray lines

## 1.0.1 (2000-07-01)
* Duplicated all Flash content in HTML so Yahoo can see it

## 1.0.0 (2000-04-14)
* Removed horrible frames, Flash ftw
* Switched background to fast moving clouds like 2advanced V3

## 0.1.0 (1997-01-26)
* Added a "GIF" of a construction worker. ha ha ha
* Navigation frame ftw
* Added repeating tanbark background to look more professional

Using globally

# install
[sudo] npm install -g chg

# create CHANGELOG.md
chg init

# add a change
chg add 'My first change'

# create a release
chg release '0.0.1'

Using as a node module

shell

# install
npm install chg --save

javascript

var chg = require('chg');

// create CHANGELOG.md
chg.init({}, callback);

// add a change
chg.add('My first change', {}, callback);

// create a release
chg.release('0.0.1', {}, callback);

// each command can take a callback, but each also returns synchronously
var changeData = chg.release('3.0.0', {});
// changeData = { title: '0.0.1', changes: '* Removed crusty semantic html, javascript app ftw', changeLog: '/* entire changelog */' }

chg.find('1.1.1');
// => { title: '## 1.1.1 (2002-08-16)', changes: ['* Added a dot.gif to 3,000 table cells to fix layout issues'], changesRaw: '* Added a dot.gif to 3,000 table cells to fix layout issues' }

Using as a grunt plugin

shell

# install
npm install chg --save-dev

Gruntfile.js

grunt.loadNpmTasks('chg');

shell

# create CHANGELOG.md
grunt chg-init

# add a change
grunt chg-add

# create a release
grunt chg-release

Using as a npm script (requires npm v2.13.0 or higher)

"scripts": {
  "version": "chg release -y && git add -A CHANGELOG.md"
}

The -y flag will use the current version in package.json

Functions

init()

Creates a CHANGELOG.md file in the current directory.

chg init
CHANGELOG
=========

## HEAD (Unreleased)
* _(none)_

--------------------

add(line:String)

Add a line to the change log. The first argument is the line to add.

chg add "My new change!"
CHANGELOG
=========

## HEAD (Unreleased)
* My new change!

--------------------

release(version:String)

Add a line to the change log. The first argument is the version to be used as the release version.

chg release "v0.1.0"
CHANGELOG
=========

## HEAD (Unreleased)
* _(none)_

--------------------

## 0.1.0 (2014-01-31)
* My new change!

find(version:String)

Finds a release given a version.

delete()

Delete the current changelog

Release History

See CHANGELOG.md :scream_cat:

License

Copyright (c) 2014 heff. Licensed under the Apache license.