Skip to content

Commit

Permalink
feat: semantic commit type fix for peerDeps (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
teppeis committed Feb 3, 2019
1 parent 8a68bcf commit aa661ae
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Renovate fetches it from npm registry automatically.
- Apply label `renovate` to PRs
- Limit to maximum 10 concurrent Renovate PRs at any time
- Wait until branch tests have passed or failed before creating the PR
- If semantic commits detected, use semantic commit type `fix` for dependencies and `chore` for all others
- If semantic commits detected, use semantic commit type `fix` for deps and peerDeps, `chore` for all others
- Use Asia/Tokyo timezone
- Group [preset monorepo packages](https://renovatebot.com/docs/presets-monorepo/) together

Expand Down Expand Up @@ -75,10 +75,10 @@ Renovate fetches it from npm registry automatically.
"extends": [
":automergePatch",
":noUnscheduledUpdates",
":semanticPrefixFixDepsChoreOthers",
":separatePatchReleases",
":unpublishSafe",
"helpers:disableTypesNodeMajor"
"helpers:disableTypesNodeMajor",
"@teppeis:semanticPrefixFixDepsPeerChoreOthers"
],
"schedule": ["after 9pm", "before 9am"],
"rangeStrategy": "bump",
Expand Down Expand Up @@ -149,6 +149,30 @@ Renovate fetches it from npm registry automatically.
}
```

### `@teppeis:semanticPrefixFixDepsPeerChoreOthers`

If semantic commits detected, use semantic commit type `fix` for `dependencies` and `peerDependencies`, `chore` for all others

```json
"semanticPrefixFixDepsPeerChoreOthers": {
"packageRules": [
{
"packagePatterns": [
"*"
],
"semanticCommitType": "chore"
},
{
"depTypeList": [
"dependencies",
"peerDependencies"
],
"semanticCommitType": "fix"
}
]
}
```

## References

- [Renovate Docs](https://renovatebot.com/docs/)
Expand Down
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"extends": [
":automergePatch",
":noUnscheduledUpdates",
":semanticPrefixFixDepsChoreOthers",
":separatePatchReleases",
":unpublishSafe",
"helpers:disableTypesNodeMajor"
"helpers:disableTypesNodeMajor",
"@teppeis:semanticPrefixFixDepsPeerChoreOthers"
],
"schedule": [
"after 9pm",
Expand Down Expand Up @@ -129,6 +129,23 @@
"circleci": {
"schedule": "at any time"
}
},
"semanticPrefixFixDepsPeerChoreOthers": {
"packageRules": [
{
"packagePatterns": [
"*"
],
"semanticCommitType": "chore"
},
{
"depTypeList": [
"dependencies",
"peerDependencies"
],
"semanticCommitType": "fix"
}
]
}
}
}

0 comments on commit aa661ae

Please sign in to comment.