It doesn't make sense upon initial description reading, but there is a use case for it...
Updating a package.json
dependency
to use a caret without getting the latest semver match.
I'm currently working on a very large project, in which we would like to enforce exact version matches across all child workspace package.json
files.
Understand that when I say child workspace packages, you mustn't assume this project is a monorepo that publishes its packages. It uses yarn workspaces simply for the benefit of doing non-relative-path imports:
import { thing } from 'internal-package-a'
// vs