Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

How to group Docusaurus v2 packages together? #931

Closed
HonkingGoose opened this issue Oct 19, 2020 · 4 comments
Closed

How to group Docusaurus v2 packages together? #931

HonkingGoose opened this issue Oct 19, 2020 · 4 comments

Comments

@HonkingGoose
Copy link

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 HonkingGoose/git-gosling#51 and one for the preset-classic HonkingGoose/git-gosling#52.

The build for the preset-classic HonkingGoose/git-gosling#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
Copy link
Collaborator

rarkins commented Oct 20, 2020

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 facebook/docusaurus#3612 to fix the problem at the source

@HonkingGoose
Copy link
Author

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

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

@viceice
Copy link
Member

viceice commented Oct 20, 2020

Yes

@HonkingGoose
Copy link
Author

Closing this issue, as it's resolved.

Thanks for the help! 😄 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants