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

shipitjs

v0.3.2

Published

npm package release management tool

Downloads

884

Readme

ShipIt.js

A release management tool for NPM packages.

Installation

Install latest version directly from NPM repository:

npm install shipitjs

or, clone and install from local copy (if you plan on hacking on it):

git clone git://github.com/hideo55/node-shipitjs.git
npm install ./shipitjs

Usage

Usage: shipitjs [options] [command]

Commands:

  init                   Write default configuration to `./.shipit.json`.
  release [release-type] Release the package to NPM, where `release-type`
                         is [major|minor|patch|premajor|preminor|prepatch|prerelease|custom].

Options:

  -h, --help     output usage information
  -V, --version  output the version number
  -x, --exec     Actually run commands (defaults to dry-run)

The release command is, by default, run in dry-run mode; so, it is easy and safe to confirm what will happen. You must specify the -x (or --exec) option explicitly in order to actually execute the steps.

Semantic Versioning

Semantic Versioning is used for version numbers. See the the spec for more detailed information.

Basically, version numbers follow these formats:

  • major "." minor "." patch
  • major "." minor "." patch "-" build

For example, 0.0.1 and 0.0.1-1 are valid version numbers; however, x0r3 is not.

If, say, the current version number is 0.0.1, then the next version numbers would be:

  • 1.0.0 for a major version bump
  • 0.1.0 for a minor version bump
  • 0.0.2 for a patch version bump
  • 0.0.2-0 for a prepatch version bump

Configuration

The config file is named .shipit.json. A default config file can be generated with the init command:

$ cd /path/to/module
$ shipitjs init

An example config file:

{
  "steps": ["FindVersion", "ChangeVersion", "CheckChangeLog", "Commit", "Tag", "Publish"],
  "CheckChangeLog": {
    "files": ["History.md"]
  }
}

Steps

FindVersion

Attempts to infer the current version number from VCS tag. If that fails, then the version number in package.json (or package.ls) is used. The next version number is then calculated (according to Semantic Versioning) and the user is prompted for confirmation.

Config

None.

ChangeVersion

Changes the version number specified in package.json (or package.ls). It attempts also to update exports.version if a main script has been defined.

Config

file (String)

If you manage your package.json with LiveScript, then specify package.ls. npm run prepublish will be executed for you automatically.

NOTE: You must also specify a truthy value for the global usePackageLS.

{
  "usePackageLS": true,
  "ChangeVersion": {
    "file": "package.ls"
  }
}

CheckChangeLog

Checks changelog(s) for entries for the new version number. Provides option to edit changelog (using the current user's $EDITOR, defaults to vim) if no entry was found.

Config

files (Array)

An array of changelog filenames to check.

{
  "CheckChangeLog": {
    "files": ["History.md"]
  }
}

Commit

Commits all local changes.

Config

message (String)

Template for commit message.

{
  "Commit": {
    "message": "Checking in changes prior to tagging version \"{{version}}\".\n\nChangelog diff:\n\n{{changelogDiff}}"
  }
}

Tag

Makes a tag for the new version.

Config

message (String)

Template for tag message.

{
  "Tag": {
    "message": "Tagging version \"{{version}}\" using shipitjs."
  }
}

Publish

Publishes module to the NPM registry, asking first for user confirmation.

Config

None.

Version Control Systems

Currently Git and Mercurial are the only VCS supported.

Git

An example git configuration:

{
  "vc": {
    "Git": {
      "PushTo": "origin",
      "SignTag": true,
      "TagPattern": "version-%v"
    }
  }
}

PushTo (String)

Where the new version should be pushed.

SignTag (Boolean)

Whether tags should be GPG/PGP signed.

TagPattern (String)

Custom pattern for tag names (%v is replaced by version number).

Mercurial

An example mercurial configuration:

{
  "vc": {
    "Hg": {
      "PushTo": "remote"
    }
  }
}

PushTo (String)

Where the new version should be pushed.

License

(The MIT License)

Copyright (c) 2011 Hideaki Ohno <hide.o.j55{at}gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.