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

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

Merged
merged 15 commits into from
Oct 29, 2024

Conversation

mkniewallner
Copy link
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
lib/modules/manager/cargo/schema.ts Outdated Show resolved Hide resolved
lib/modules/manager/cargo/schema.ts Outdated Show resolved Hide resolved
lib/modules/manager/cargo/types.ts Show resolved Hide resolved
lib/modules/manager/cargo/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/cargo/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/cargo/schema.ts Outdated Show resolved Hide resolved
rarkins
rarkins previously approved these changes Oct 1, 2024
@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
39 checks passed
@renovate-release
Copy link
Collaborator

🎉 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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