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 🙏

© 2026 – Pkg Stats / Ryan Hefner

release-task

v1.1.1

Published

Version bump, update changelog, commit changes, push and deploy GIT projects by running single task script

Readme

release-task

A package to automate releasing for git projects. Out of the box this package does the following:

  • bump: Increment the package.json file version property, to add more files see the options below.
  • changelog: Updates the changelog with the latest commits that has not been pushed to origin.
  • commit: Commit those files which had version constraint bumped i.e: package.json, changelog.md.
  • tag: Create a new annotated tag for the new release version.

Install

$ npm i release-task --save-dev

Usage

Create a script file that could be run via npm scripts like: ./scripts/release.js

const releaseTask = require('release-task');
tasks.init();

Add a new script within package.json

{
  "scripts": {
    "release": "node ./scripts/release.js"
  }
}
$ npm run release

To see how this package handle releasing commits, changelog and tags take a look in its own releasing commit and tag releases

Adding custom tasks

Tasks are functions that do something and return a Promise, by default there are four defined tasks already defined, but it's possible to create your own custom task to run after the default tasks gets completed.

Task queued, in order to get executed each step without missing something on the way, i.e commit a file without changelog content being updated. So because of this we run tasks as an array of functions in series using run-series.

Default Options

| option | type | description | | --------------------------------- | -------- | ---------------------------------------------------------------- | | currentVersion | string | the current project version defined in your package.json. | | bumpFiles | array | files that should have version property bumped. | | commitFiles | array | files that should be commit after changes. | | commitMessage | string | the format of the commit message for the release. | | changelog | object | default options for the changelog. | | changelog.gitChangeLog | string | the git command used to list and format the changelog. | | changelog.gitChangeLogArguments | array | list of arguments that git should run to generate the changelog. | | changelog.filename | string | the change log file name. | | changelog.header | string | the default header for changelog. | | changelog.template | string | the default format for the list of the latest commit. | | tagFormatCmd | string | the git command to format the tag message commit. | | tagName | string | the default tag format i.e: v1.2.3. | | tagMessage | string | the default title for the annotated tag message. | | config.indentSize | number | the default indent size for JSON files changes. |

Function Tasks

Every task receives two params, the incremented version string, and the configuration options:

const util = require('util');
const exec = util.promisify(require('child_process').exec);

const customTask = async (version, options) => {
  // Task body is basically:
  // do something with the already incremented version
  // access to the config options
  // onError throw any message string
  // onSuccess return a message string
  const { stdout, stderr } = await exec('ls -lah');
  if (stderr) {
    throw new Error('Error Message!');
  }
  return stdout;
}

When build a custom task the function will always receive the bumbed version and the options of the prompt.

Author

Adriano Rosa @adrianorosa
https://adrianorosa.com

Licence

Copyright © 2019, Adriano Rosa https://adrianorosa.com All rights reserved.

For the full copyright and license information, please view the LICENSE file that was distributed within the source root of this project.