JamieMason / JamieMason/syncpack
feat(groups): add target property to highest/lowest version groups
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
### Description
In our monorepo, we use Zod v3 for many packages because we use an extension which doesn't yet support v4. Other packages which do not need that extension are free to use Zod v4. I would like to use the highest semver behavior, but not have major upgrades considered a mismatch. This results in all v3 usages being aligned and all v4 usages being aligned, almost as if they were different libs.
It would also cover the case where a major version upgrade migration effort is non-trivial and executed on different monorepo packages over time, possibly by different teams.
### Suggested Solution
Two options come to mind:
1. add explicit `preferVersion` values of e.g. `highestSemverPerMajor`/`lowestSemverPerMajor`
2. an additional version group property along the lines of `paritionBy:"major"` which could be paired with `preferVersion:"highestSemver"` and might be more composable to cover further use cases
### Optional comments
_No response_
### Code of Conduct
- [x] I agree to follow the [Code of Conduct](https://github.com/JamieMason/syncpack/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing highest/lowest version group handling and its configuration entry points; no file or test is named in the issue. Compare the proposed preferVersion and partitionBy approaches, then define behavior for major-separated groups and add coverage showing v3 and v4 align independently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100