Skip to content
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

Setting :preserveSemverRanges or rangeStrategy together with config:js-app or config:js-lib has no effect and is not user-friendly. #13111

Closed
ishowta opened this issue Dec 14, 2021 · 8 comments · Fixed by #13137
Labels
auto:reproduction A minimal reproduction is necessary to proceed core:config Related to config capabilities and presets priority-4-low Low priority, unlikely to be done unless it becomes important to more people status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)

Comments

@ishowta
Copy link

ishowta commented Dec 14, 2021

What would you like Renovate to be able to do?

Problem

config:js-app and config:js-lib set :pinAllExceptPeerDependencies and :pinOnlyDevDependencies respectively, both of which use packageRules - matchPackagePatterns.
https://docs.renovatebot.com/presets-default/#pinallexceptpeerdependencies

And these will probably override rangeStrategy.

Thus, if a user (like me) tries to write the configuration they are looking for in a straightforward way, the rangeStrategy will not be set as expected.

// https://github.com/ishowta/my-test-repo-of-renovate/blob/main/renovate.json
// https://github.com/ishowta/my-test-repo-of-renovate/pull/7
{
  "extends": [
    "config:js-app",
    ":preserveSemverRanges"
  ]
}

Hope

It would be nice if an explanation were added, or if the packageRules written in extends were overridden by the user-written settings.

Remarks

I thought I did a quick test to make sure, but I'm a newbie so I might be doing something wrong. Sorry.

If you have any ideas on how this should be implemented, please tell us here.

It seems that config:js-* currently only adds pin settings, so why don't you rename it to something like config:pin-js-*?

Is this a feature you are interested in implementing yourself?

No

@ishowta ishowta added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) labels Dec 14, 2021
@ishowta ishowta changed the title Setting :preserveSemverRanges or rangeStrategy together with config:js-app or config:js-app has no effect and is not user-friendly. Setting :preserveSemverRanges or rangeStrategy together with config:js-app or config:js-lib has no effect and is not user-friendly. Dec 14, 2021
@rarkins rarkins added the auto:reproduction A minimal reproduction is necessary to proceed label Dec 15, 2021
@github-actions
Copy link
Contributor

Hi there,

Help us by making a minimal reproduction repository.

Before we can start work on your issue we first need to know exactly what's causing the current behavior. A minimal reproduction helps us with this.

To get started, please read our guide on creating a minimal reproduction to understand what is needed.

We may close the issue if you (or someone else) have not provided a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment.

Good luck,

The Renovate team

@rarkins rarkins added priority-4-low Low priority, unlikely to be done unless it becomes important to more people and removed priority-5-triage labels Dec 15, 2021
@HonkingGoose HonkingGoose added the core:config Related to config capabilities and presets label Dec 15, 2021
@ishowta
Copy link
Author

ishowta commented Dec 15, 2021

this is minimal reproduction repository.

@rarkins
Copy link
Collaborator

rarkins commented Dec 15, 2021

repositories is not a valid field in renovate.json

@ishowta
Copy link
Author

ishowta commented Dec 16, 2021

I was confusing the repository configuration with the BOT configuration. Created config.js. I have updated it, can you please check it?

@rarkins
Copy link
Collaborator

rarkins commented Dec 16, 2021

If you specify printConfig=true in your config.js then it should print out the full config after all presets are resolved. This will probably give us an indication of why the ordering is not happening why you expect.

@ishowta
Copy link
Author

ishowta commented Dec 16, 2021

@ishowta
Copy link
Author

ishowta commented Dec 16, 2021

This is a feature request, and I don't consider it a bug. Just for the record.

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 31.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto:reproduction A minimal reproduction is necessary to proceed core:config Related to config capabilities and presets priority-4-low Low priority, unlikely to be done unless it becomes important to more people status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants