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

Provide dev snapshot update API for side-by-side module development #2314

Open
hon2a opened this issue Dec 21, 2016 · 1 comment
Open

Provide dev snapshot update API for side-by-side module development #2314

hon2a opened this issue Dec 21, 2016 · 1 comment

Comments

@hon2a
Copy link

hon2a commented Dec 21, 2016

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 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.

@pauloneves
Copy link

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.

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

4 participants