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

@wavevision/semantic-release

v2.0.2

Published

The Wavevision semantic release setup.

Downloads

546

Readme

QA Release Commitizen friendly semantic-release npm

Semantic Release setup for Wavevision apps to maintain conventional commits and releases using gitmoji. The package contains bootstrap and configs for:

Installation

yarn add --dev @wavevision/semantic-release

Usage

First, use setup scripts that come with this package.

  • yarn setup-commitizen – setup commitizen config
  • yarn setup-gitflow – setup gitflow-avh branches
  • yarn setup-husky – setup husky hooks for linting your commit messages

Then, create necessary configs in your project root.

release.config.js

This is the main config for semantic-release. Require makeConfig function from @wavevision/semantic-release/config to bootstrap your project config. The function accepts single options parameter which is an object with following shape:

type Options = {
  config: 'gitlab' | 'github'; // needed to setup correct release plugin
  branches: string[]; // list of branches on which releases should happen
  rules?: {
    // map gitmoji to specific release types
    major?: string[] | { exclude?: string[]; include?: string[] };
    minor?: string[] | { exclude?: string[]; include?: string[] };
    patch?: string[] | { exclude?: string[]; include?: string[] };
  };
  templates?: {
    notes?: string; // release notes .hbs template content
    commit?: string; // commit .hbs template content
  };
  git?: {
    enabled: boolean; // enable @semantic-release/git plugin
    assets?: string[]; // relative paths to assets to be commited with a release
  };
  npm?: {
    enabled: boolean; // enable @semantic-release/npm plugin
  };
};

Example

const makeConfig = require('@wavevision/semantic-release/config');
const {
  CONFIG_GITHUB,
} = require('@wavevision/semantic-release/config/constants');

module.exports = makeConfig({
  config: CONFIG_GITHUB,
  branches: ['master'],
  git: { enabled: true, assets: ['package.json'] },
  npm: { enabled: true },
});

This will bootstrap semantic-release for GitHub repository in which releases will happen on master branch. Each new release will change version property inside package.json which will be then committed to the repository. Also, if your package.json does not set private: true, an npm package will be published.

Note: See this FAQ to learn about setting npm published package access.

The gitmoji release rules are by default:

  • major = [:boom:]
  • minor = [:sparkles:]
  • patch = [:bug:, :ambulance:, :lock:]

Templates

The package contains a helper to stringify .hbs templates content from a folder you define. Use it as follows.

const { makeTemplate } = require('@wavevision/semantic-release/config/utils');

const template = makeTemplate('path', 'to', 'templates');
template('notes'); // will return content from path/to/templates/notes.hbs

Constants

As shown in the example @wavevision/semantic-release/config/constants exports set of useful constants to be used with the configuration. See all of them in that module.

commitlint.config.js

Simply use the config from this package.

module.exports = require('@wavevision/semantic-release/commitlint');

Commit CLI

The package also contains bootstrapped commitizen CLI which will help you assemble valid gitmoji commit messages through a simple prompt. Simply run yarn commit and follow the steps.

Note: Longer description, breaking change commit body and list of issues closed are not required.