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
Switch default preset from angular to conventionalcommits #1652
Comments
While we have this set specifically in all of our projects, I would think that switching the default would catch a LOT of people by surprise, right? |
It must be released as a breaking change, so no surprises. |
thank you for opening this discussion. apologies for the delayed response from our end. i think this is certainly worth considering and i would be probably be in favor of the change. as you mentioned, other tools (cz-cli, commitlint) that are often used with semantic-release are starting to change their defaults. it would be a more difficult switch to make, if that we're already true. the this would clearly be a breaking change, so would result in a new major version of semantic-release, if we were to move forward with it. it may also be worth considering this against #1260 since that discussion could potentially go in the direction of not defining defaults at all, which would also be a very breaking change. |
By the way, what's the right way to properly switch the presets without changing the rest of the configuration (such as the plugins list)? npm install --save-dev conventional-changelog-conventionalcommits {
"release": {
"preset": "conventionalcommits"
}
} This is what I do. |
without digging deep into the docs, what you mention here seems like it should work. have you confirmed with i would recommend using dry-run any time you change your configuration, regardless of what should happen. it just gives you the chance to be fully confident in the behavior before actually releasing. |
Ok, it seems that it works as expected: $ npx semantic-release --dry-run --debug
[5:35:19 PM] [semantic-release] › ℹ Running semantic-release version 15.14.0
semantic-release:config load config from: /home/codespace/workspace/cz-cli/package.json +0ms
semantic-release:config options values: {
semantic-release:config branch: 'master',
semantic-release:config repositoryUrl: 'https://github.com/commitizen/cz-cli.git',
semantic-release:config tagFormat: 'v${version}',
semantic-release:config plugins: [
semantic-release:config '@semantic-release/commit-analyzer',
semantic-release:config '@semantic-release/release-notes-generator',
semantic-release:config '@semantic-release/npm',
semantic-release:config '@semantic-release/github'
semantic-release:config ],
semantic-release:config preset: 'conventionalcommits',
semantic-release:config _: [],
semantic-release:config 'dry-run': true,
semantic-release:config d: true,
semantic-release:config dryRun: true,
semantic-release:config debug: true,
semantic-release:config '$0': 'node_modules/.bin/semantic-release'
semantic-release:config } +2ms
semantic-release:plugins options for @semantic-release/npm/verifyConditions: {} +0ms
[5:35:20 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
semantic-release:plugins options for @semantic-release/github/verifyConditions: {} +2ms
[5:35:20 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
semantic-release:plugins options for @semantic-release/commit-analyzer/analyzeCommits: {} +0ms
[5:35:20 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
semantic-release:plugins options for @semantic-release/release-notes-generator/generateNotes: {} +1ms
[5:35:20 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
semantic-release:plugins options for @semantic-release/npm/prepare: {} +0ms
[5:35:20 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
semantic-release:plugins options for @semantic-release/npm/publish: {} +0ms
[5:35:20 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
semantic-release:plugins options for @semantic-release/github/publish: {} +1ms
[5:35:20 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
semantic-release:plugins options for @semantic-release/github/success: {} +0ms
[5:35:20 PM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/github"
semantic-release:plugins options for @semantic-release/github/fail: {} +0ms
[5:35:20 PM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/github"
[5:35:20 PM] [semantic-release] › ℹ This test run was triggered on the branch felipecrs/use-cc-preset, while semantic-release is configured to only publish from master, therefore a new version won’t be published. |
You could also use dry-run in your release branch and it will tell you the version that would be produced. That way you could confirm that it is understanding the new commit convention the way you are expecting it to. |
Nowadays the `conventionalcommits` is the closest thing we have that looks like a standard and neutral. BREAKING CHANGE: Previously, the default preset was `angular`. Despite the similarities, the new one has some differences, such as accepting exclamation marks (e.g. `feat!:`) for identifying breaking changes. Closes semantic-release#1652
Nowadays the `conventionalcommits` is the closest thing we have that looks like a standard and neutral. BREAKING CHANGE: Previously, the default preset was `angular`. Despite the similarities, the new one has some differences, such as accepting exclamation marks (e.g. `feat!:`) for identifying breaking changes. To restore the previous behavior, use `preset: 'angular'` or the new cli option, `--preset angular`. Closes semantic-release#1652
Nowadays the `conventionalcommits` is the closest thing we have that looks like a standard and neutral. BREAKING CHANGE: Previously, the default preset was `angular`. Despite the similarities, the new one has some differences, such as accepting exclamation marks (e.g. `feat!:`) for identifying breaking changes. To restore the previous behavior, use `preset: 'angular'` or the new cli option, `--preset angular`. Closes semantic-release#1652
Nowadays the `conventionalcommits` is the closest thing we have that looks like a standard and neutral. Also, a new cli option was added: `--preset`. BREAKING CHANGE: Previously, the default preset was `angular`. Despite the similarities, the new one has some differences, such as accepting exclamation marks (e.g. `feat!:`) for identifying breaking changes. To restore the previous behavior, use `preset: 'angular'` or the new cli option, `--preset angular`. Closes semantic-release#1652
Nowadays the `conventionalcommits` is the closest thing we have that looks like a standard and neutral. Also, a new cli option was added: `--preset`. BREAKING CHANGE: Previously, the default preset was `angular`. Despite the similarities, the new one has some differences, such as accepting exclamation marks (e.g. `feat!:`) for identifying breaking changes. To restore the previous behavior, use `preset: 'angular'` or the new cli option, `--preset angular`. Closes semantic-release#1652
Nowadays the `conventionalcommits` is the closest thing we have that looks like a standard and neutral. Also, a new cli option was added: `--preset`. BREAKING CHANGE: Previously, the default preset was `angular`. Despite the similarities, the new one has some differences, such as accepting exclamation marks (e.g. `feat!:`) for identifying breaking changes. To restore the previous behavior, use `preset: 'angular'` or the new cli option, `--preset angular`. Closes semantic-release#1652
I believe Conventional Commits has grown as a more general pattern enough to now become the default preset for
semantic-release
plugins, overangular
.The text was updated successfully, but these errors were encountered: