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

@nois/cz-conventional-changelog

v0.0.2

Published

Commitizen adapter following the conventional-changelog format and also asking for issue.

Downloads

14

Readme

cz-conventional-changelog

Part of the commitizen family. Prompts for conventional changelog standard and also prompts for a mandatory issue.

Features

  • Works seamlessly with semantic-release 🚀

Quickstart

Installation

npm install commitizen @nois/cz-conventional-changelog

and then add the following to package.json:

{
  "scripts": {
    "commit": "git-cz"
  },
  "config": {
    "commitizen": {
      "path": "./node_modules/@nois/cz-conventional-changelog"
    }
  }
}

Usage

[TBD]

Configuration

Like commitizen, you can specify the configuration of cz-conventional-changelog through the package.json's config.commitizen key, or with environment variables.

| Environment variable | package.json | Default | Description | |----------------------|-----------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | CZ_PROJECT_KEY | projectKey | undefined | A default project key for issue. | | CZ_MAX_HEADER_WIDTH | maxHeaderWidth | 72 | This limits how long a commit message head can be. | | CZ_MIN_HEADER_WIDTH | minHeaderWidth | 2 | This limits how short a commit message can be. | | CZ_MAX_LINE_WIDTH | maxLineWidth | 100 | Commit message bodies are automatically wrapped. This decides how long the lines will be. | | CZ_SKIP_SCOPE | skipScope | true | If scope should be used in commit messages. | | | scopes | undefined | A list (JS Array) of scopes that will be available for selection. Note that adding this will change the scope field from Inquirer 'input' to 'list'. | | CZ_TYPE | defaultType | undefined | The default type. | | CZ_SCOPE | defaultScope | undefined | The default scope. | | CZ_CUSTOM_SCOPE | customScope | false | Whether user can provide custom scope in addition to predefined ones | | CZ_SUBJECT | defaultSubject | undefined | A default subject. | | CZ_BODY | defaultBody | undefined | A default body. | | CZ_ISSUES | defaultIssues | undefined | A default issue. | | CZ_ISSUE_KEY_PREPEND | issueKeyPrepend | "" | Prepends ISSUE ID with an optional decorator. e.g.: [DAZ-1234 | | CZ_ISSUE_KEY_APPEND | issueKeyAppend | "" | Appends ISSUE ID with an optional decorator. e.g.: DAZ-1234] | | CZ_EXCLAMATION_MARK | exclamationMark | false | On breaking changes, adds an exclamation mark (!) after the scope, e.g.: type(scope)!: break stuff. When activated, reduces the effective allowed header length by 1. |

Dynamic Configuration

Alternatively, if you want to create your own profile, you can use the configurable approach. Here is an example: ./index.js

const custom = require('@nois/cz-conventional-changelog/configurable');
// You can do this optionally if you want to extend the commit types
const defaultTypes = require('@nois/cz-conventional-changelog/types');

module.exports = custom({
  types: {
    ...defaultTypes,
    perf: {
      description: 'Improvements that will make your code perform better',
      title: 'Performance'
    }
  },
  skipScope: false,
  scopes: ['myScope1', 'myScope2'],
  customScope: true
});

./package.json

{
  "config": {
    "commitizen": {
      "path": "./index.js"
    }
  }
}

This example would:

  • Display "perf" as an extra commit type
  • Ask you to add a commit scope
  • Limit the scope selection to either myScope or myScope2

List of all supported configurable options when using the configurable approach:

| Key | Default | Description | |-----------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | projectKey | true | A default project key for issue. | | maxHeaderWidth | 72 | This limits how long a commit message head can be. | | minHeaderWidth | 2 | This limits how short a commit message can be. | | maxLineWidth | 100 | Commit message bodies are automatically wrapped. This decides how long the lines will be. | | skipScope | true | If scope should be used in commit messages. | | defaultType | undefined | The default type. | | defaultScope | undefined | The default scope. | | defaultSubject | undefined | A default subject. | | defaultBody | undefined | A default body. | | defaultIssues | undefined | A default issue. | | types | ./types.js | A list (JS Object) of supported commit types. | | scopes | undefined | A list (JS Array) of scopes that will be available for selection. Note that adding this will change the scope field from Inquirer 'input' to 'list'. | | customScope | false | If this is set to true, users are given an option to provide custom scope aside the ones predefined in 'scopes' array. In this case a new option named 'custom' appears in the list and once chosen a prompt appears to provide custom scope | | issueKeyPrepend | "" | Prepends ISSUE ID with an optional decorator. e.g.: [DAZ-1234 | | issueKeyAppend | "" | Appends ISSUE ID with an optional decorator. e.g.: DAZ-1234] | | exclamationMark | false | On breaking changes, adds an exclamation mark (!) after the scope, e.g.: type(scope)!: break stuff. When activated, reduces the effective allowed header length by 1. |

Commitlint

If using the commitlint js library, the "maxHeaderWidth" configuration property will default to the configuration of the "header-max-length" rule instead of the hard coded value of 72. This can be ovewritten by setting the 'maxHeaderWidth' configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.

Reference

  • Fork of https://github.com/newoceaninfosys/cz-conventional-changelog