Skip to content
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

Use the standard conventional-changelog-preset-loader to load presets #591

Open
1aron opened this issue Jan 27, 2024 · 1 comment
Open

Comments

@1aron
Copy link

1aron commented Jan 27, 2024

I think using conventional-changelog-preset-loader should be the best solution for #589 and reduce the burden on the @semantic-release/commit-analyzer maintainer.

Import loadPreset function from the package and use it to load the preset:

import { loadPreset } from 'conventional-changelog-preset-loader'

loadPreset('angular').then((config) => {
  // do something with config object
})

https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-preset-loader

@travi
Copy link
Member

travi commented Feb 2, 2024

i agree that there would be benefits to moving in this direction. i believe this package was not available when semantic-release originally implemented this functionality. however, the loader does not support all of the ways that semantic-release currently supports loading. we would need to decide if we want to continue to support those additional ways.

also, this behavior exists in the release-notes-generator, so we need to handle there in a consistent way. we've talked about extracting the duplicated behavior to another package to rely on in both places. depending on the scope of duplication, we've mentioned before that using the loader could be an alternative to that extraction

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