question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Releasing prerelease versions without modifying package.json files

See original GitHub issue

Affected Packages

Problem

Let’s say we have a UI library that is actively developed and releases are happening multiple times from different branches. The releases from branches are happening for testing or experimentation. These releases should happen with prerelease version numbers.

There’s active development on master and on the different branches, so the versions are being modified all the time. As a result, merges and/or rebases are extremely hard due to the conflicts in the version numbers.

Proposed solution

There should be a way to publish prerelease versions without modifications to package.json files. This way, only the regular publishes on master will modify the versions in manifests and conflicts will never happen.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:19 (18 by maintainers)

github_iconTop GitHub Comments

3reactions
emmatowncommented, Apr 16, 2020

We definitely want to do something like this. We documented what we wanted this to look like when we first implemented prereleases in our dictionary but we haven’t got around to actually implementing it.

snapshot prerelease - A snapshot prerelease is intended to make it easy to test all changes at a particular git commit. It is published at 0.0.0 and uses the git hash as the tag. This should be used as a less formal method than a release candidate to make it easy to install and test changes. An example, if we have a package at 1.0.0, and have a changeset for it to be major bumpred, a snapshot release will be at 0.0.0-ABCDEFGH (the last github hash). If we add more commits, the next snapshot would be 0.0.0-HIJKLMNOP.

IIRC, the command we wanted was changeset pre snapshot <tag>. It would set all the versions to 0.0.0-tag-hash and update that in all the dependents, publish all the packages to the dist tag that was specified and then undo the changes.

2reactions
Novinycommented, May 4, 2020

❤️ Thanks @ajaymathur

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releasing prerelease versions without modifying package ...
There should be a way to publish prerelease versions without modifications to package.json files. This way, only the regular publishes on master ...
Read more >
How npm handles updates for pre-release packages. - Ru Singh
Go ahead and edit the package.json file, and specify the version you need. Then install the dependencies again. This is usually frowned upon...
Read more >
npm install using pre-release versions - node.js - Stack Overflow
i want to use pre-release versions in my package.json to get some dependencies in the latest version (containing als pre-releases) but for ...
Read more >
Frequently Asked Questions - semantic-release
The package.json 's version will be updated by the semantic-release command just before publishing to npm ...
Read more >
How I established a good release process in JavaScript
json files. Run git log -1 and then git show <commit ha sh> to see the changes. For changing minor version or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found