diff --git a/lerna.json b/lerna.json index 3e70b26104..3312790f5a 100644 --- a/lerna.json +++ b/lerna.json @@ -8,6 +8,10 @@ "allowBranch": ["main", "dev"], "conventionalCommits": true, "message": "chore(release): publish [skip ci]" + }, + "version": { + "conventionalCommits": true, + "changelogPreset": "./release-rules.js" } }, "ignoreChanges": [ diff --git a/release-rules.js b/release-rules.js new file mode 100644 index 0000000000..fe84cf2430 --- /dev/null +++ b/release-rules.js @@ -0,0 +1,11 @@ +module.exports = { + preset: 'conventionalcommits', + releaseRules: [ + { breaking: true, release: 'minor' }, // Change breaking changes to minor + { type: 'feat', release: 'minor' }, // Features are treated as minor releases + { type: 'fix', release: 'patch' }, // Fixes are treated as patch releases + ], + parserOpts: { + noteKeywords: ['BREAKING CHANGE'], + }, +}