jscutlery / semver

Nx plugin to automate semantic versioning and CHANGELOG generation.
MIT License
727 stars 84 forks source link

Preset Schema doesn't match the DOCs #736

Closed viniciusLouzada closed 12 months ago

viniciusLouzada commented 12 months ago

Hello!

On the DOC it says that the preset option from the plugin executor can be of type string | object, but when I try to pass and object to specify some custom configs, I get the following error:

image

The specific custom config that I'm trying to pass is to add more commit types to my CHANGELOG, like refactor and chore. Is there another way that I can achieve this??

edbzn commented 12 months ago

Hi @viniciusLouzada, you can configure the preset this way:

  "version": {
    "executor": "@jscutlery/semver:version",
    "options": {
      "preset": {
        "name": "conventionalcommits",
        "types": [
          { "type": "feat", "section": "Features" },
          { "type": "fix", "section": "Bug Fixes" },
          { "type": "chore", "section": "Chores" },
          { "type": "build", "section": "Build System" },
          { "type": "ci", "section": "Continuous Integration" },
          { "type": "docs", "section": "Documentation" },
          { "type": "style", "section": "Styles" },
          { "type": "refactor", "section": "Code Refactoring" },
          { "type": "perf", "section": "Performance Improvements" },
          { "type": "test", "section": "Tests" }
        ]
      }
    }
  }

I just updated the documentation, thank you.

viniciusLouzada commented 12 months ago

Great, works perfectly!! Thank you very much, @edbzn!