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

releaseme

v0.1.14

Published

A tool inspired by SBT Release for releasing node applications.

Downloads

149

Readme

Releaseme

A release tool inspired by sbt-release for node projects.

How it works

A typical release process involves running tests, updating project version, tagging the release and publishing the artifact. Although some steps in this process are common amongst projects, some projects may require a custom release process.

With releaseme you are able to set up a custom release process for your project using a combination of built-in steps and custom step definitions.

The steps will execute in serial and if any step fails, the release process fails.

Installation

$ npm install -g releaseme

Usage

In the root of your project run releaseme. By default, releaseme will increment the current project version with a patch increment using the Default Release Process.

You can specify the type of increment via the type argument with one of the following values: [major, minor, patch]

If you wish to specify the exact release version you can do so via the --release-version arg.

 Usage: releaseme [options] [type]

  Releases your node module. Use [type] to specify: [major, minor, patch]

  Options:

    -h, --help                       output usage information
    -V, --version                    output the version number
    -c, --release-version <version>  The version to release
    -n, --next-version <version>     The next version for release (snapshot)

Default Release Process

The default release process involves the following steps:

  1. checkStatus - Check if the git working directory is clean. If there are any unstaged/staged changes the process will fail.
  2. test - Runs npm test on your project
  3. setReleaseVersion - Updates the package.json with the release version
  4. commitReleaseVersion - Commits the release version (package.json)
  5. tagRelease - Creates a git annotated tag with the release version
  6. publish - Runs npm publish on your project to publish your artifact to npm.
  7. setNextVersion - Sets the next development version in package.json for your project with a SNAPSHOT suffix.
  8. commitNextVersion - Commits this new snapshot version
  9. pushChanges - Pushes all changes git remote origin.

Custom Release Process

To set up a custom release process, you can define an array of steps in your package.json via the releaseme.steps field.

You can use built-in steps listed in Default Release or use custom steps.

Custom Step

To set up custom steps you must define the step as a script in your package.json. You can then use the name of the script as a step in your release.

Example package.json with custom release with linting

{
"name": "my-module",
...
"scripts": {
        "lint": "gulp lint",
        "test": "gulp test"
    },
"releaseme": {
        "steps": [
            "checkStatus",
            "lint",
            "test",
            "setReleaseVersion",
            "commitReleaseVersion",
            "tagRelease",
            "publish",
            "setNextVersion",
            "commitNextVersion",
            "pushChanges"
        ]
},
...
}

The example above adds a script called lint which runs gulp lint. We then use this script as a step in our release steps after checkStatus

Custom tag prefix

If you have a convention for prefixing your release tags such as v0.1.0 you can set a prefix via the tagPrefix property on releaseme:

Example package.json with custom tag prefix

{
"name": "my-module",
...
"scripts": {
        "lint": "gulp lint",
        "test": "gulp test"
    },
"releaseme": {
        "tagPrefix": "v"
        "steps": [
            ...
        ]
},
...
}