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

Monorepo packages that depend on other monorepo packages are not compatible with the carot operator #242

Open
Zamiell opened this issue Sep 5, 2024 · 2 comments

Comments

@Zamiell
Copy link

Zamiell commented Sep 5, 2024

Consider a monorepo like this:

monorepo/
└── packages/
    ├── foo
    |   └── package.json
    └── bar
        └── package.json

If bar depends on foo, and foo is at "1.0.1", and bar specifics foo as "^1.0.1", syncpack will throw a spurious error:

✘ foo ^1.0.1 → 1.0.1 packages\foo\package.json > dependencies [LocalPackageMismatch]

The documentation says this:

As a sensible default, syncpack defines a monorepo-wide exact version policy as a starting point which can be tuned from there. If your project uses exact versions everywhere, and you always want them to be identical, you will not need to define any configuration.

However, in this case, I expect "^1.0.1" to be identical to "1.0.1". In other words, Synpack should respect the carot (or tilde).

@Zamiell Zamiell changed the title Monorepo packages that depend on other monorepo packages are not checked Monorepo packages that depend on other monorepo packages are not compatible with the carot operator Sep 6, 2024
@JamieMason
Copy link
Owner

Could you create a reproduction please? Thanks

@Zamiell
Copy link
Author

Zamiell commented Sep 7, 2024

See: https://github.com/Zamiell/syncpack-bug

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

No branches or pull requests

2 participants