JamieMason / syncpack

Consistent dependency versions in large JavaScript Monorepos.
https://jamiemason.github.io/syncpack/
MIT License
1.34k stars 44 forks source link

question:(groups): How to ignore minor version mismatches? #193

Closed 10thfloor closed 1 month ago

10thfloor commented 6 months ago

Description

When I run syncpack, this should be acceptable: ^4.11.7 → ^4.12.0

ie Where one package lists ^4.11.7, while the highest available version is ^4.12.0 Since the ^ specifies 4.12 (or highest minor version) will be installed in the package that specifies ^4.11. (At least this is my understanding)

I'm trying to lint my old monrepo for major version mismatches only, and not having much luck.

Suggested Solution

Provide an option to output only major version mismatches when running syncpack list-mismatches

Help Needed

I need to know if this option already exists, or if it is possible to configure syncpack to output what i need! (Major version mismatches only)

Thank you!

JamieMason commented 2 months ago

Really slow reply here @10thfloor – the closest thing to what you're describing is a Same Range Version Group:

Relax syncpack to ensure that all versions have semver ranges which all satisfy each other, instead of having to be identical.

Let me know if that isn't a fit for this use case.