Skip to content

refactor(manager/cargo): use zod to parse manifest/config#31260

Merged
rarkins merged 15 commits intorenovatebot:mainfrom
mkniewallner:refactor/use-zod-cargo
Oct 29, 2024
Merged

refactor(manager/cargo): use zod to parse manifest/config#31260
rarkins merged 15 commits intorenovatebot:mainfrom
mkniewallner:refactor/use-zod-cargo

Conversation

@mkniewallner
Copy link
Copy Markdown
Contributor

@mkniewallner mkniewallner commented Sep 6, 2024

Changes

Move parsing of cargo manifest and config to zod, as preliminary steps for adding new features.

Context

Wanted to add support for git dependencies in cargo, but it felt like we could benefit from moving the parsing of manifest and config to zod before adding new features. I'm not an expert in using zod so I hope the changes make sense.

I tried to split the commits in a meaningful way, since the changes are incremental. If you feel that the PR is too big, let me know, I'd be happy to split it.

There's a pretty strong test suite for the different features we support for the manager, so I trust that they show the refactoring does not break any existing feature, but if needed, I can test the changes on a real repository as well, just let me know.

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 select 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

@mkniewallner mkniewallner marked this pull request as ready for review September 6, 2024 20:33
@rarkins rarkins requested a review from zharinov September 7, 2024 05:45
Comment thread lib/modules/manager/cargo/schema.ts Outdated
Comment thread lib/modules/manager/cargo/schema.ts Outdated
Comment thread lib/modules/manager/cargo/types.ts
@mkniewallner mkniewallner requested a review from viceice September 7, 2024 12:01
Comment thread lib/modules/manager/cargo/extract.ts Outdated
Comment thread lib/modules/manager/cargo/extract.ts Outdated
Comment thread lib/modules/manager/cargo/schema.ts Outdated
mkniewallner and others added 3 commits September 30, 2024 13:49
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
rarkins
rarkins previously approved these changes Oct 1, 2024
Comment thread lib/modules/manager/cargo/schema.ts Outdated
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Comment thread lib/modules/manager/cargo/extract.ts Outdated
@rarkins rarkins enabled auto-merge October 29, 2024 06:15
@rarkins rarkins added this pull request to the merge queue Oct 29, 2024
Merged via the queue into renovatebot:main with commit fc697a3 Oct 29, 2024
@renovate-release
Copy link
Copy Markdown

🎉 This PR is included in version 38.134.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@viceice viceice added the regression Issue about a regression bug, or the PR caused it label Nov 14, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

regression Issue about a regression bug, or the PR caused it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants