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

--fix option does not work when dependencies use "*" or "" as the version #360

Open
ddzz opened this issue Feb 26, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@ddzz
Copy link
Collaborator

ddzz commented Feb 26, 2022

Similar to #345, dependencies that have "*" or "" as the version are not being autofixed.

@ddzz ddzz added the bug Something isn't working label Feb 26, 2022
@bmish
Copy link
Owner

bmish commented Feb 28, 2022

I noticed this as part of #359 too.

Let's say we have the versions * and ^1.2.3 present for a dependency. I'm currently leaning towards not autofixing in this situation because converting one to the other could be too large of a behavior change and it seems like some monorepos choose one or the other in different situations.

For example. For dependencies of published libraries, we usually want to specify the desired version range for safety/compatibility. For internal-only packages or dev-dependencies, we may not care as much about the specific version and might just use * to indicate that we're likely fine with any version or always getting the latest version.

So we probably shouldn't autofix. The next question is should we still consider having the versions * and ^1.2.3 as a mismatch? Probably not, unless we want to force people to convert * to actual ranges, which seems too aggressive.

As for blank versions "", I haven't seen that before. Need to find out what the behavior is there and why someone would use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants