JamieMason / syncpack

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

Syncpack wants to upgrade to a version that doesn't exist #224

Closed crfrolik closed 1 month ago

crfrolik commented 1 month ago

Description

If I have a semver group like this:

    {
      "range": "~",
      "dependencyTypes": ["dev"],
      "dependencies": ["**"],
      "packages": ["**"]
    }

And I have a dev package like this:

"foo": "~10.0.0-beta.6"

syncpack fix-mismatches wants to change that from ~10.0.0-beta.6 to ~10.0.0. The problem is that this version (10.0.0 without the tag) does not exist.

This isn't a huge deal; a much bigger issue is the fact that syncpack lint reports an error when I use a prerelease.

Am I missing something in my config that would prevent this?

crfrolik commented 1 month ago

I discovered this was happening because I had a peerDependency for the package that was ^10.0.0. It was no longer an issue once I removed that.