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

semantic-release-git-branches

v1.2.1

Published

A fork of @semantic-release/git that uses a more gitflow approach for releases

Downloads

881

Readme

Git Branches - Semantic Release

Latest Release Build Status Codecov coverage Code Climate grade

A fork of @semantic-release/git which uses the git flow approach for releases.

verifyConditions

Verify the access to the remote Git repository, the commit message format and the assets option configuration.

prepare

Create a release commit, including configurable files.

Configuration

Environment variables

| Variable | Description | Default | |-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------| | GIT_AUTHOR_NAME | The author name associated with the release commit. See Git environment variables. | @semantic-release-bot. | | GIT_AUTHOR_EMAIL | The author email associated with the release commit. See Git environment variables. | @semantic-release-bot email address. | | GIT_COMMITTER_NAME | The committer name associated with the release commit. See Git environment variables. | @semantic-release-bot. | | GIT_COMMITTER_EMAIL | The committer email associated with the release commit. See Git environment variables. | @semantic-release-bot email address. |

Options

| Options | Description | Default | | -------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------| | message | The message for the release commit. See message. | chore: create new release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes} | | assets | Files to include in the release commit. See assets. | ['CHANGELOG.md', 'package.json', 'package-lock.json', 'npm-shrinkwrap.json'] | | branchName | The name of the release branch. | release/${nextRelease.version} | | branchPush | If the release branch should be pushed to remote. | false | | branchMerges | All branches that will receive a release branch merge. | [branch] |

message

The message for the release commit is generated with Lodash template. The following variables are available:

| Parameter | Description | |---------------|-------------------------------------------------------------------------------------| | branch | The branch from which the release is done. | | lastRelease | Object with version, gitTag and gitHead of the last release. | | nextRelease | Object with version, gitTag, gitHead and notes of the release being done. |

It is recommended to include [skip ci] in the commit message to not trigger a new build. Note: Some CI service support the [skip ci] keyword only in the subject of the message.

message examples

The message Release ${nextRelease.version} - ${new Date().toLocaleDateString('en-US', {year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' })} [skip ci]\n\n${nextRelease.notes} will generate the commit message:

Release v1.0.0 - Oct. 21, 2015 1:24 AM [skip ci]## 1.0.0### Features* Generate 1.21 gigawatts of electricity...

assets

Can be an Array or a single entry. Each entry can be either:

  • a glob
  • or an Object with a path property containing a glob.

Each entry in the assets Array is globbed individually. A glob can be a String ("dist/**/*.js" or "dist/mylib.js") or an Array of Strings that will be globbed together (["dist/**", "!**/*.css"]).

If a directory is configured, all the files under this directory and its children will be included.

If a file has a match in .gitignore it will always be excluded.

assets examples

'dist/*.js': include all js files in the dist directory, but not in its sub-directories.

'dist/**/*.js': include all js files in the dist directory and its sub-directories.

[['dist', '!**/*.css']]: include all files in the dist directory and its sub-directories excluding the css files.

[['dist', '!**/*.css'], 'package.json']: include package.json and all files in the dist directory and its sub-directories excluding the css files.

[['dist/**/*.{js,css}', '!**/*.min.*']]: include all js and css files in the dist directory and its sub-directories excluding the minified version.

Usage

Options can be set within the plugin definition in the Semantic-release configuration file:

{
  "release": {
    "prepare": [
      "@semantic-release/npm",
      {
        "path": "semantic-release-git-branches",
        "assets": ["package.json", "dist/**/*.{js|css}", "docs"],
        "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
      }
    ],
    "publish": ["@semantic-release/github"]
  }
}

When using with the changelog or npm plugins:

  • The changelog plugin must be called first in order to update the changelog file so the gitflow and npm plugin can include it in the release.
  • The npm plugin must be called second in order to update the package.json file so the gitflow plugin can include it in the release commit.

To use with the changelog and npm plugins:

{
  "release": {
    "verifyConditions": ["@semantic-release/changelog", "@semantic-release/npm", "semantic-release-git-branches"],
    "prepare": ["@semantic-release/changelog", "@semantic-release/npm", "semantic-release-git-branches"]
  }
}