You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAICS there's no API equivalent to npm update {package} that would update a package to the latest version matching the package.json definition without touching it.
When developing multiple interdependent modules side-by-side (simplest case being a "library" module shared between multiple "app" modules), it's useful to link to the "latest dev snapshot" of a module and publish these snapshots on a regular basis during the development process. Even though this breaks the "everybody gets the same dependencies" rule in principle, it saves a lot of valuable time compared to keeping track of the snapshot numbers and updating the dependencies all the time. (Of course this is a development scenario only.)
AFAICS Yarn provides just the upgrade API which not only updates the package.json, but more upgrades only to latest stable version, so in the scenario described above it actually downgrades.
What is the expected behavior?
I'd expect Yarn to provide an API that allows updating to the latest dev snapshots for definitions like this one:
"my-library-module": "~1.2.3-pre"
without touching the definition itself. At the very least I'd expect upgrade to be able to get the latest pre-release version (even if it does write it in package.json).
If neither of these options make sense, please explain in the comments why.
The text was updated successfully, but these errors were encountered:
I have exactly the same problem. In the Java world, Maven has the concept of a SNAPSHOT release. SNAPSHOT is a special name in the version number, and Maven not just automatically updates the dependency package when the checksum does not match, but also prevents release versions to have snapshot dependencies.
In Yarn, if we are developing a library and a module at the same time, every time the library is updated, the module will fail the build. There must be a way to say that the checksum of a dependency shouldn't be verified.
This StackOverflow question gives a hack to fix it, but the tool must have a standard solution for this common problem.
Do you want to request a feature or report a bug?
Feature.
What is the current behavior?
AFAICS there's no API equivalent to
npm update {package}
that would update a package to the latest version matching thepackage.json
definition without touching it.When developing multiple interdependent modules side-by-side (simplest case being a "library" module shared between multiple "app" modules), it's useful to link to the "latest dev snapshot" of a module and publish these snapshots on a regular basis during the development process. Even though this breaks the "everybody gets the same dependencies" rule in principle, it saves a lot of valuable time compared to keeping track of the snapshot numbers and updating the dependencies all the time. (Of course this is a development scenario only.)
AFAICS Yarn provides just the
upgrade
API which not only updates thepackage.json
, but more upgrades only to latest stable version, so in the scenario described above it actually downgrades.What is the expected behavior?
I'd expect Yarn to provide an API that allows updating to the latest dev snapshots for definitions like this one:
without touching the definition itself. At the very least I'd expect
upgrade
to be able to get the latest pre-release version (even if it does write it inpackage.json
).If neither of these options make sense, please explain in the comments why.
The text was updated successfully, but these errors were encountered: