-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
@types grouping with sibling packages #4893
Comments
Synchronising It's actually a pretty challenging problem, although maybe one day we'll work out an elegant way to solve it. The second part is why these types aren't being grouped together with their parent package. In this case, it's because the react packages are being specifically grouped: https://github.com/renovatebot/presets/blob/72658888f765b52b8b314a7894a3655dccd85548/packages/renovate-config-monorepo/package.json#L344-L349 We ideally would have an automated way to group these types but right now it's another hard problem! |
Thanks for the info. I am familiar with the So there is nothing I/we can do to help for this? Do we just need to wait for the renovate team to work it out? |
Locally you could define your own package rule like this: {
"packageNames": ["@types/react", "@types/reactive-native"],
"groupName": "react monorepo"
} And this could put the types into the same group as the main packages. But it won't do anything about the "sync" problem with versions. |
If someone runs into the same problem and want a starting point for a scripted solution: I have this gist for updating the renovate.json with package rules: https://gist.github.com/DanielMSchmidt/a1a5e3f753a52e13f53efeac42579461 |
@rarkins wouldn't it be just enough for now if renovate treats |
No, it wouldn't work. #1368 makes it so that Meanwhile monorepo grouping is based on source URL and |
What Renovate type are you using?
Regular one on Github.
Describe the bug
Packages like
react
and types associated with them like@types/react
don't get updated in the same PR.By default, DefinitelyTyped is keeping the first 2 numbers of the versions in sync, so
react@1.2.x
will have@types/react@1.2.y
.When renovate tried to upgrade to
react@2.0.x
, it should also go to@types/react@2.0.y
.Did you see anything helpful in debug logs?
Not really.
To Reproduce
https://github.com/pvinis/bug-renovate-types-sync
Here I have
react
and@types/react
,react-native
and@types/react-native
. All of them are not in their latest version.I got the PR for pinning, merged it.
After that I got pvinis/bug-renovate-types-sync#3 and pvinis/bug-renovate-types-sync#4 to upgrade the
@types
deps, both are not pointing in versions that in theory are incompatible with the package version ofreact
andreact-native
.Soon I will get PRs for upgrading
react
andreact-native
.As I see it, there are 2 things here that should go differently.
@types/react
should be upgraded in the same PR asreact
. (same forreact-native
)@types/react
should not offer to upgrade to something that's later than thereact
version we have. (that one is not as important)Additional context
The text was updated successfully, but these errors were encountered: