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

feat(config): pass baseConfig to transitive presets #15537

Merged
merged 13 commits into from May 18, 2022

Conversation

hojerst
Copy link
Contributor

@hojerst hojerst commented May 10, 2022

Changes

Pass baseConfig to transitive dependencies fixing #14828

Context

Closes #14828

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@hojerst
Copy link
Contributor Author

hojerst commented May 10, 2022

I added a PR which seems to fix the issue. It seems that renovate always passes the previously loaded preset to the resolveConfigPresets function. However this drops the platform/endpoint properties from the baseConfig. The PR passes the inputConfig as baseConfig on the first recursion level. Which seems to fix the problem. (A pattern which was also used at getPreset.

However as no expert for the internal workings of renovate I hope this doesn't have any sideeffects. Expert review needed :)

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

needs tests

@hojerst
Copy link
Contributor Author

hojerst commented May 11, 2022

I added a unit test that checks for the changed behavior as requested.

rarkins
rarkins previously approved these changes May 12, 2022
@rarkins rarkins requested a review from viceice May 12, 2022 07:24
lib/config/presets/index.spec.ts Outdated Show resolved Hide resolved
lib/config/presets/index.spec.ts Outdated Show resolved Hide resolved
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

side-effect will be fixed in #15600

@viceice viceice changed the title pass baseConfig to transitive presets feat(config): pass baseConfig to transitive presets May 17, 2022
@rarkins rarkins requested a review from viceice May 17, 2022 06:13
rarkins
rarkins previously approved these changes May 17, 2022
@viceice viceice enabled auto-merge (squash) May 18, 2022 09:34
@viceice viceice merged commit e91ea81 into renovatebot:main May 18, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.61.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local subpresets don't see local platform config
4 participants