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

Feature request: explain which package(s) contains the highest version #235

Open
stevebeauge opened this issue Jul 22, 2024 · 0 comments
Open

Comments

@stevebeauge
Copy link

stevebeauge commented Jul 22, 2024

Description

I'm working a in large monorepo. Sometimes I need to revert some package upgrade for various reasons.
When I run syncpack to find dependency mismatch, it shows outdated packages and the highest version found the package:

= Default Version Group ========================================================
✘ @pnp/queryable 3.13.0 → 4.3.0 packages\common\package.json > dependencies [HighestSemverMismatch]
✘ @pnp/sp ^3.24.0 → ^4.3.0 packages\common\package.json > dependencies [HighestSemverMismatch]
✘ @pnp/sp ^3.24.0 → ^4.3.0 apps\web\package.json > dependencies [HighestSemverMismatch]
   980 ✓ already valid
     3 ✓ can be auto-fixed

This is fine when I need to ensure consistency. But in my case, I want to cancel the 4.3.0 upgrade of the packages.

What I would like, is to have in the output which package contains the highest version.

Something like:

= Default Version Group ========================================================
✘ @pnp/queryable 3.13.0 → 4.3.0 packages\common\package.json > dependencies [HighestSemverMismatch], from packages/components/package.json
✘ @pnp/sp ^3.24.0 → ^4.3.0 packages\common\package.json > dependencies [HighestSemverMismatch], from packages/components/package.json
✘ @pnp/sp ^3.24.0 → ^4.3.0 apps\web\package.json > dependencies [HighestSemverMismatch], from packages/components/package.json, packages/another/package.json
   980 ✓ already valid
     3 ✓ can be auto-fixed

Or:

= Default Version Group ========================================================
✘ @pnp/queryable 3.13.0 → 4.3.0 packages\common\package.json > dependencies [HighestSemverMismatch]
✘ @pnp/sp ^3.24.0 → ^4.3.0 packages\common\package.json > dependencies [HighestSemverMismatch]
✘ @pnp/sp ^3.24.0 → ^4.3.0 apps\web\package.json > dependencies [HighestSemverMismatch]

=  Highest semver mismatch origins =================================================
✓ @pnp/sp@^4.3.0 : packages/components/package.json, packages/another/package.json
✓ @pnp/queryable @4.3.0 : packages/components/package.json


   980 ✓ already valid
     3 ✓ can be auto-fixed

Because it's not the most common use case, it couild be an opt-in flag.

One may argue that's source control should be able to handle the use case. It is more complex actually, since the update is part of a large dependency updates which highly coupled 3rd party packages.

Suggested Solution

Help Needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants