@cenk1cenk2/cz-cc

中文文档
3.0.12发布于 2026/11/04MITCommonJS近 30 天下载 3432

Commitizen adapter following the conventional-changelog format.

原始使用文档
文档目录8 节
  1. Description
  2. Usage
  3. Configuration
  4. package.json
  5. Environment Variables
  6. Breaking Changes
  7. Migration to v3
  8. Commitlint

@cenk1cenk2/cz-cc

pipeline status Version Downloads/week Dependencies semantic-release

Demo

Description

This is a direct fork of cz-conventional-changelog, while it swaps inquirer for enquirer for speed and adds autocomplete to commit types as well as reducing overall questions and making many optional.

Usage

  • Install commitizen. Either globally or in the project.
# yarn
yarn global add commitizen
# npm
npm install -g commitizen
  • Initiate this adapter in a project. If already initiated you can add the --force flag to swap this adapter with the older one.
    • Currently has a bit of problems with yarn workspaces do to commitizen.
# yarn
commitizen init @cenk1cenk2/cz-cc --yarn --dev
# npm
commitizen init @cenk1cenk2/cz-cc --dev
  • Add git-hooks with hk.
amends "package://github.com/jdx/hk/releases/download/v2.0.1/[email protected]#/Config.pkl"

hooks {
  ["prepare-commit-msg"] {
    steps {
      ["commitizen"] {
        fix = "git cz --hook"
        interactive = true
      }
    }
  }
}

Configuration

Install the adapter by utilizing global commitizen installation.

Configuration settings are down below.

package.json

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

{
// ...  default values
    "config": {
        "commitizen": {
            "path": "./node_modules/@cenk1cenk2/cz-cc",
            "preset": "conventionalcommits",
            "maxHeaderWidth": 100,
            "maxLineWidth": 100,
            "defaultType": "",
            "defaultScope": "",
            "defaultSubject": "",
            "defaultBody": "",
            "defaultIssues": "",
            "types": {
              ...
              "feat": {
                "description": "A new feature",
                "title": "Features"
              },
              ...
            }
        }
    }
// ...
}

preset selects how breaking changes are prompted for and rendered, either conventionalcommits (default) or angular. See Breaking Changes.

Environment Variables

The following environment varibles can be used to override any default configuration or package.json based configuration.

  • CZ_PRESET = preset
  • CZ_TYPE = defaultType
  • CZ_SCOPE = defaultScope
  • CZ_SUBJECT = defaultSubject
  • CZ_BODY = defaultBody
  • CZ_MAX_HEADER_WIDTH = maxHeaderWidth
  • CZ_MAX_LINE_WIDTH = maxLineWidth

Breaking Changes

Breaking changes are declared through the additional actions of the prompt, and the preset configuration decides which of the two mechanisms are offered there. It has to match the preset the release tooling analyzes commits with.

  • conventionalcommits (default) offers both. breaking-marker appends the ! marker after the type and the optional scope, as in feat(api)!: drop the legacy token endpoint, and breaking-changes appends a BREAKING CHANGE footer. The specification treats them as independent signals, so either one on its own marks the commit as breaking and selecting both is valid.
  • angular offers breaking-changes alone, since the ! marker is not part of its header pattern. This is the behaviour of every release before v3.

Selecting neither leaves the commit non-breaking, so an ordinary commit still skips the whole subject in one pass.

Migration to v3

conventionalcommits became the default in v3, so commits made through the adapter can now carry the ! marker in the header once breaking-marker is selected. Two things to check:

  • The release tooling has to analyze commits with the conventionalcommits preset, otherwise the ! marker is not read as a major bump. @semantic-release/commit-analyzer and commitlint both take a preset of their own.
  • header-max-length counts the extra character, and any tooling matching commit headers with a custom regular expression has to allow the ! before the colon.

To keep the previous behaviour, pin the preset back:

{
  config: {
    commitizen: {
      preset: 'angular'
    }
  }
}

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 100. This can be overwritten by setting the 'maxHeaderWidth' configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.

版本与发布记录

@cenk1cenk2/cz-cc 共发布 145 个版本,首次发布于 2020/07/26;过去 12 个月发布了 42 个版本。

版本发布日期距今
3.0.12latest2026/11/045 天前
3.0.112026/10/3010 天前
3.0.92026/10/2119 天前
3.0.102026/10/2119 天前
3.0.82026/10/1822 天前
3.0.72026/10/1822 天前

关于 @cenk1cenk2/cz-cc 的常见问题

@cenk1cenk2/cz-cc 是什么?

Commitizen adapter following the conventional-changelog format.

如何安装 @cenk1cenk2/cz-cc?

在项目目录运行 npm install @cenk1cenk2/cz-cc,或使用 pnpm add / yarn add / bun add。

@cenk1cenk2/cz-cc 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/cenk1cenk2__cz-cc 是否存在。

@cenk1cenk2/cz-cc 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@cenk1cenk2/cz-cc 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >= 24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@cenk1cenk2/cz-cc 可以商用吗?

@cenk1cenk2/cz-cc 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@cenk1cenk2/cz-cc 的下载量有多少?

根据 npm 官方下载统计,@cenk1cenk2/cz-cc 在 2026/10/10 – 2026/11/08 这 30 天内被下载 3,432 次,日均约 114 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cenk1cenk2/cz-cc 还在维护吗?

最新版本 3.0.12 发布于 2026/11/04(5 天前);至今共发布 145 个版本,其中过去 12 个月发布了 42 个;首次发布于 2020/07/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。