renovatebot / config-help

Please use the Discussions feature of https://github.com/renovatebot/renovate instead
https://github.com/renovatebot/renovate/discussions
MIT License
27 stars 16 forks source link

How to group Docusaurus v2 packages together? #931

Closed HonkingGoose closed 4 years ago

HonkingGoose commented 4 years ago

Which Renovate are you using?

WhiteSource Renovate App

Which platform are you using?

GitHub.com

Have you checked the logs? Don't forget to include them if relevant

Yes, but I can''t find anything obviously wrong.

What would you like to do?

Group Docusaurus v2 dependencies together

I want Renovate to group @docusaurus/core and @docusaurus/preset-classic into one pull request (preferably without having to tinker with renovate.json. The upstream Docusaurus project updates all those dependencies in one go anyways.

What I got from Renovate:

I got 2 pull requests, one for the core https://github.com/RoostingGeese/git-gosling/pull/51 and one for the preset-classic https://github.com/RoostingGeese/git-gosling/pull/52.

The build for the preset-classic https://github.com/RoostingGeese/git-gosling/pull/52 was broken when Renovate first opened it, because you cannot use the preset with an "outdated" core, as the preset depends on a updated core package.

I don't know why they weren't bundled together by default. As a wild guess, it's because I'm using v2 of Docusaurus in my repository and not v1. Maybe the default Renovate monorepo config is only valid for Docusaurus v1?

Config I used:

This is the config that I used:

{
  "extends": ["config:base", ":label(dependencies)"],
  "lockFileMaintenance": {
    "enabled": true
  },
  "dependencyDashboard": true
}

I nudged Renovate with the Dependency dashboard

I also nudged Renovate in action by using the Dependency Dashboard to force a Renovate run. I don't know if that makes a difference?

How to configure Renovate to group Docusaurus updates?

Would this get me the desired behavior? Or do I need to be even more specific about the grouping because I'm using v2 of Docusaurus?

{
  "extends": ["config:base", ":label(dependencies)"],
  "lockFileMaintenance": {
    "enabled": true
  },
  "dependencyDashboard": true,
  "packageRules": [
    {
      "extends": "monorepo:docusaurus",
      "groupName": "docusaurus monorepo"
    }
  ]
}
rarkins commented 4 years ago

We identify the docusaurus monorepo packages based on source repo: https://github.com/renovatebot/renovate/blob/b1d474e033809f60f4271f2e988e0db836ae3ace/lib/config/presets/internal/monorepo.ts#L59

Unfortunately the authors of that package have forgotten to include the source repository in its package.json.

For now, you can overcome this with this config:

{
  "extends": ["config:base", ":label(dependencies)"],
  "lockFileMaintenance": {
    "enabled": true
  },
  "dependencyDashboard": true,
  "packageRules": [
    {
      "packagePatterns": ["^@docusaurus"],
      "groupName": "docusaurus monorepo"
    }
  ]
}

I also created https://github.com/facebook/docusaurus/issues/3612 to fix the problem at the source

HonkingGoose commented 4 years ago

Thank you @rarkins for the config file, I'll go add that to my repository then. :smile: And thank you for opening a bug report at the upstream project. :+1:

Does this mean that when facebook/docusaurus#3612 is fixed, I can revert to my old config?

viceice commented 4 years ago

Yes

HonkingGoose commented 4 years ago

Closing this issue, as it's resolved.

Thanks for the help! :smile: :+1: