Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .renovaterc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"extends": [
":gitSignOff",
"group:monorepos",
"group:recommended",
":pinAllExceptPeerDependencies",

@b-admike b-admike May 8, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I was not able to find :pinAllExceptPeerDependencies preset...what does it do?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I explained this in #93 (comment).

See https://renovatebot.com/docs/presets-default/#pinallexceptpeerdependencies

{
  "packageRules": [
    {
      "packagePatterns": [
        "*"
      ],
      "rangeStrategy": "pin"
    },
    {
      "depTypeList": [
        "engines",
        "peerDependencies"
      ],
      "rangeStrategy": "auto"
    }
  ]
}

"helpers:disableTypesNodeMajor"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this helper makes sure renovatebot doesn't update @types/node to a new semver major release right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://renovatebot.com/docs/presets-helpers/#helpersdisabletypesnodemajor

{
  "packageRules": [
    {
      "packageNames": [
        "@types/node"
      ],
      "major": {
        "enabled": false
      }
    }
  ]
}

],

"ignorePaths": [
"**/node_modules/**",
"**/__tests__/**",
"**/test/**"
],

"automerge": false,
"branchPrefix": "renovate/",
"ignoreUnstable": true,
"statusCheckVerify": true,
"updateNotScheduled": true,

"lockFileMaintenance": {
"enabled": true,
"schedule": "before 5am on monday"
Comment thread
bajtos marked this conversation as resolved.
},

"prConcurrentLimit": 20,
"prCreation": "immediate",
"prHourlyLimit": 2,

"semanticCommits": true,
"semanticCommitType": "chore",
"semanticCommitScope": null,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use {{baseDir}} to signify PRs for shopping vs recommender packages?

By default you will see angular-style commit prefixes like "chore(deps):". If you wish to change it to something else like "package" then it will look like "chore(package):". You can also use parentDir or baseDir to namespace your commits for monorepos e.g. "{{parentDir}}".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure how well would {{baseDir}} work in practice, because often a single dependency is used by both shopping & recommender packages. I prefer keep no commit scope for now, we can always change this option later.


"separateMajorMinor": true,
"separateMinorPatch": false,

"packageRules": [{
"sourceUrlPrefixes": ["https://github.com/strongloop/loopback-next"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be https://github.com/strongloop/loopback4-example-shopping?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule is teaching RenovateBot about LB4 monorepo, we may want to contribute it to RenovateBot in the future. See existing monorepo definitions: https://renovatebot.com/docs/presets-monorepo/

With this rule enabled, RenovateBot will group updates of all packages published from loopback-next into a single commit/pull request. Without this rule, each @loopback/* package will be updated in a separate pull request.

If I changed the url prefix to loopback4-example-shopping as you suggested, then RenovateBot will group updates of packages from this monorepo. That does not make sense because these packages are local to this monorepo and dependency ranges are managed by lerna.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation, sounds good to me 👍

"groupName": "loopback packages"
}],

"masterIssue": true,
"masterIssueApproval": false,
"masterIssueAutoclose": true
}
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ branches:
only:
- master
- /^greenkeeper/.*$/
- /^renovate/.*$/