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

@gkatsev/conventional-github-releaser

v3.2.0

Published

Make a new GitHub release from git metadata.

Downloads

8

Readme

conventional-github-releaser

CircleCI codecov.io

Make a new GitHub release from git metadata.

Note You don't have to use the angular commit convention. For the best result of the tool to tokenize your commit and produce flexible output, it's recommended to use a commit convention.

Quick start

Set up a token first.

$ npm install -g conventional-github-releaser
$ cd my-project
$ conventional-github-releaser -p angular

The above generates a GitHub Release based on commits since the last semver tag that match the pattern of a "Feature", "Fix", "Performance Improvement" or "Breaking Changes".

If you first time use this tool and want to generate all previous releases, you could do

$ conventional-github-releaser -p angular -r 0

This will not overwrite the releases you have already made. Read "Regenerate all the releases" section if you want to.

All available command line parameters can be listed using CLI : conventional-github-releaser --help.

Hint: You can alias your command or add it to your package.json. EG: "github-release": "conventional-github-releaser -p angular -r 0".

Or use one of the plugins if you are already using the tool: grunt/atom

Example output

  • https://github.com/conventional-changelog/conventional-github-releaser/releases
  • https://github.com/conventional-changelog/conventional-changelog/releases

Recommended workflow

  1. Make changes
  2. Commit those changes
  3. Make sure Travis CI turns green
  4. Bump version in package.json
  5. Commit package.json files
  6. Tag
  7. Push
  8. conventionalGithubReleaser

You have to have a tag on GitHub to make a release. hence gitRawCommitsOpts.to defaults to the latest semver tag.

Please use this gist to make a release or change it to your needs.

Why

  • Based on conventional-changelog but GitHub releases are more elegant.
  • Easy fully automate changelog generation. You could still add more points on top of it.
  • Detecting prerelease based on semver, ignoring reverted commits, templating with handlebars.js and links to references, etc. Open an issue if you want more reasonable features.
  • Intelligently setup defaults but yet fully configurable with presets of popular projects.
  • Everything internally or externally is pluggable.
  • A lot of tests and actively maintained.

Programmatic Usage

$ npm install --save conventional-github-releaser
var conventionalGithubReleaser = require('conventional-github-releaser');

var AUTH = {
  type: 'oauth',
  token: '0126af95c0e2d9b0a7c78738c4c00a860b04acc8' // change this to your own GitHub token or use an environment variable
};

conventionalGithubReleaser(AUTH, {
  preset: 'angular'
}, callback);

API

conventionalGithubReleaser(auth, [changelogOpts, [context, [gitRawCommitsOpts, [parserOpts, [writerOpts]]]]], callback)

auth

An object that may contain the following properties:

For example:

{
  token: '0126af95c0e2d9b0a7c78738c4c00a860b04acc8',
  url: 'https://api.github.com'
}

Please read gh-got for default behavior when token and/or url aren't provided.

callback

callback(err, responses)
responses

Type: array

An array of responses returned by github.releases.createRelease calls.

Please check conventional-changelog for other arguments.

There are some changes:

changelogOpts

transform

Default: grab the whole tag for the version (including a leading v) and format date.

releaseCount

Default: 1

How many releases of changelog you want to generate. It counts from the latest semver tag. Useful when you forgot to generate any previous releases. Set to 0 to regenerate all.

discussion

Default: unset

The discussion category name, which when given, will have GitHub automatically create a discussion in this category from the release.

name

Default: same as version tag

Name that should be applied to the release on GitHub.

targetCommitish

Default: undefined (uses the tag to determine commit)

Specific target_commitish in GitHub release

gitRawCommitsOpts

from

Default: based on options.releaseCount.

to

Default: latest semver tag

writerOpts

includeDetails

It is always true.

headerPartial

Default: ''

Default header contains the version and date which are already in the release.

CLI

$ npm install --global conventional-github-releaser
$ conventional-github-releaser --help # for more details

You can supply your auth token by a flag -t or --token. You can also set up an environment variable CONVENTIONAL_GITHUB_RELEASER_TOKEN to avoid typing your token every time.

You can also submit your release as a draft version via the '--draft' flag. This allows you to review the and edit the release notes before an official release.

Note: If all results error, it will print the error messages to stderr and exit with code 1.

Regenerate all the releases

Use github-remove-all-releases to remove all releases and set changelogOpts.releaseCount to 0 to regenerate.

Setup token for cli

Create a new token and set your environment variable CONVENTIONAL_GITHUB_RELEASER_TOKEN to the token you just created. You can google How to set environment variable. The scopes for the token you need is public_repo or repo (if you need to access private repos). More details.

Related

Debugging

To assist users of conventional-github-releaser with debugging the behavior of this module we use the debug utility package to print information about the release process to the console. To enable debug message printing, the environment variable DEBUG, which is the variable used by the debug package, must be set to a value configured by the package containing the debug messages to be printed.

To print debug messages on a unix system set the environment variable DEBUG with the name of this package prior to executing conventional-github-releaser:

DEBUG=conventional-github-releaser conventional-github-releaser

On the Windows command line you may do:

set DEBUG=conventional-github-releaser
conventional-github-releaser

Node Support Policy

We only support Long-Term Support versions of Node.

We specifically limit our support to LTS versions of Node, not because this package won't work on other versions, but because we have a limited amount of time, and supporting LTS offers the greatest return on that investment.

It's possible this package will work correctly on newer versions of Node. It may even be possible to use this package on older versions of Node, though that's more unlikely as we'll make every effort to take advantage of features available in the oldest LTS version we support.

As each Node LTS version reaches its end-of-life we will remove that version from the node engines property of our package's package.json file. Removing a Node version is considered a breaking change and will entail the publishing of a new major version of this package. We will not accept any requests to support an end-of-life version of Node. Any merge requests or issues supporting an end-of-life version of Node will be closed.

We will accept code that allows this package to run on newer, non-LTS, versions of Node. Furthermore, we will attempt to ensure our own changes work on the latest version of Node. To help in that commitment, our continuous integration setup runs against all LTS versions of Node in addition the most recent Node release; called current.

JavaScript package managers should allow you to install this package with any version of Node, with, at most, a warning if your version of Node does not fall within the range specified by our node engines property. If you encounter issues installing this package, please report the issue to your package manager.

Contributing

Please read our contributing guide to see how you may contribute to this project.

License

MIT © Steve Mao