Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

How do I add a releaseRule that also respects the `!` for a breaking change? (conventionalcommits preset)

オープン
#413 コメント 5 件 リアクション 12 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js
領域
release

調査の方向性

conventionalcommits プリセットと、issue に示されているカスタム releaseRules を使用する @semantic-release/commit-analyzer の設定から始めます。報告されている semantic-release 19.0.5、commit-analyzer 9.0.2、Node 16.19.0 のバージョンで動作を再現し、その後、デフォルトルールとカスタムルールの処理を比較します。完了条件は、refactor が patch release を生成し、refactor! は引き続き major release を生成するようにリファクタリングすることです。

索引モデルが issue の本文から書いたものです。

説明

We’re using the conventionalcommits preset. In this preset, adding an exclamation after the type triggers a breaking change/major version bump.

Using the default releaseRules this works. feat!:, fix!: and perf!: are recognized as major/breaking changes.

In fact, anything with an exclamation triggers a major/breaking change, such as docs!: or even allGloryToTheHypnoToad!:

Now we want to add refactor as a type.

plugins: [
    [
      '@semantic-release/commit-analyzer',
      {
        preset: 'conventionalcommits'
        releaseRules: [{ type: 'refactor', release: 'patch' }]
      }
    ],

After adding this, refactor: triggers a patch change, as expected.

But refactor!: no longer triggers a major version bump.

How do we get this to work?

Edit to add version info: semantic-release 19.0.5, @semantic-release/commit-analyzer 9.0.2, Node 16.19.0

主要言語
JavaScript
スター
448
フォーク
82
平均マージ
6日 22時間
マージ済み PR(30日)
8

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

semantic-release/commit-analyzer のほかの issue

semantic-release/commit-analyzer の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。