Skip to content

Use @commitlint/config-conventional with the new preset format #544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicolas-goudry opened this issue Oct 21, 2023 · 3 comments
Closed

Comments

@nicolas-goudry
Copy link

Hello, I have an issue using the @commitlint/config-conventional config with semantic-release v22.

With v21, I was using the following configuration :

{
  "branches": [
    "master",
    {
      "name": "develop",
      "prerelease": "beta"
    }
  ],
  "plugins": [
    [
      "@semantic-release/commit-analyzer",
      {
        "config": "@commitlint/config-conventional",
        "releaseRules": [
          {
            "breaking": true,
            "release": "major"
          },
          {
            "type": "feat",
            "release": "minor"
          },
          {
            "type": "fix",
            "release": "patch"
          },
          {
            "type": "perf",
            "release": "patch"
          },
          {
            "type": "refactor",
            "release": "patch"
          },
          {
            "type": "revert",
            "release": "patch"
          },
          {
            "type": "style",
            "release": "patch"
          },
          {
            "type": "test",
            "release": false
          },
          {
            "type": "build",
            "release": false
          },
          {
            "type": "chore",
            "release": "patch"
          },
          {
            "type": "ci",
            "release": false
          },
          {
            "type": "docs",
            "release": false
          }
        ]
      }
    ],
    "@semantic-release/release-notes-generator",
    "@semantic-release/changelog",
    [
      "@semantic-release/git",
      {
        "assets": [
          "package.json",
          "package-lock.json",
          "CHANGELOG.md"
        ]
      }
    ]
  ]
}

This was working fine until I updated to v22. I read the changelog and saw that the preset is using a new format, which is incompatible with the previous format used in v21.

However, I can’t find any documentation or guide on how I could keep using semantic-release with commitlint’s conventional config.

Could anyone please point me in the right direction ?

Thanks !

@travi
Copy link
Member

travi commented Oct 25, 2023

in short, the preset needs to be updated to support the new format. it looks like this might be a start of that: conventional-changelog/commitlint#3698

until the preset is updated, you will need to avoid updating to v22 of semantic-release

@nicolas-goudry
Copy link
Author

Thanks for your answer, I’ll track the issue on commitlint repo and update to v22 when the preset gets updated then.

@travi
Copy link
Member

travi commented Oct 26, 2023

sounds good. i'll close this issue at this point then, but feel free to comment here if anything more is needed from the semantic-release side

@travi travi closed this as completed Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants