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

Override default config per module/package #111

Open
agaudreault opened this issue Aug 20, 2021 · 1 comment
Open

Override default config per module/package #111

agaudreault opened this issue Aug 20, 2021 · 1 comment

Comments

@agaudreault
Copy link

agaudreault commented Aug 20, 2021

Is there a way to define configurations in a .releaserc or package.json file in the module path that would override the config defined at the root level for that specific package?

This way, we could define different rules per package. We mostly want to configure different presetConfig and releaseRules for the commit-analyzer and release-notes-generator plugin. This could also allow to specific plugin to be added to some packages independently.

The question seems related to #95, but I think it lacks context and it should be documented as a feature of semantic-release-monorepo if it is possible to do in a non hack-ish way!

Looking at the code, that would require this module to check if there are config in the current packagePath, load them, and merge them with the pluginConfig received in the different method wrapped such as

const withOnlyPackageCommits = plugin => async (pluginConfig, config) => {

@pmowrer
Copy link
Owner

pmowrer commented Jan 29, 2024

Resolving the release configuration is strictly in semantic-release's domain.

I would think you should be able to achieve this using lerna exec and the extends option:

Something like:

lerna exec --concurrency 1 -- npx --no-install semantic-release -e semantic-release-monorepo, \$LERNA_ROOT_PATH/packages/$LERNA_PACKAGE_NAME/.releaserc

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