JamieMason / syncpack

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

Assertions on transitive dependencies #203

Closed jfirebaugh closed 8 months ago

jfirebaugh commented 8 months ago

Thanks for making syncpack, it's been very useful for us at Figma!

Description

I often want to make assertions not just about what packages are directly depended on, but also about how transitive dependencies have been resolved.

Examples include:

Suggested Solution

It would be nice if syncpack supported this somehow. Perhaps there should be a special type of version group that applies to transitive dependencies, or it should be an additional property on existing version group types.

For my purposes, it's fine if this was a "check only" feature. That is, I would like syncpack lint to check this, but I don't necessary expect syncpack fix to be able to fix it (sometimes there's a package manager upgrade command that can fix it, but sometimes it requires types of manual intervention that can't be automated).

Help Needed

JamieMason commented 8 months ago

Thanks @jfirebaugh, I see the need for this but I think it's outside of the scope of syncpack – you'd have to go pretty deep on the various lockfile formats, package managers etc – even TypeScript config and bundler config can play a role. It would be a lot of work and best handled by a specialised tool and team focused on that problem on its own.

Thanks for raising, but it's not something I have bandwidth to take on.

jfirebaugh commented 8 months ago

Totally fair! Thanks again for what you have built!

JamieMason commented 8 months ago

You're welcome 👍