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

Package Versioning #2

Closed
fishcharlie opened this issue May 3, 2020 · 5 comments
Closed

Package Versioning #2

fishcharlie opened this issue May 3, 2020 · 5 comments

Comments

@fishcharlie
Copy link
Contributor

Currently the versioning of this package is very confusing, and doesn't follow standard conventions. There are currently 3 versions of this package:

  • 1.0.0-0
  • 1.0.0-1
  • 1.0.0-2

I believe I got those in order from oldest to newest, but not 100% sure (again part of the confusion).

Anyways, it's very common to do a pattern of 1.0.0-beta.x or 1.0.0-next.x as opposed to just -x. So not really following standards on this package.

Additionally there are 2 labels for this package. latest and next. latest is pointed to 1.0.0-0 and next is pointed to 1.0.0-2. But latest also looks to be a prerelease version (unless 1.0.0-0 is not a prerelease version, which would just be even more confusing). There is no reason latest should be a prerelease version. If anything you should use 0.1.0 or something like that to indicate prerelease and have 1.0.0 be the first stable release. All of this means that just running npm install npm-to-yarn results in getting an outdated package (1.0.0-0), I think (again trying to follow this as best as I can, but it's incredibly confusing).

Also on the README it says the current version is v1.0.0-1. Which makes no sense at all. No idea how that is even happening, but leads to more confusion, and likely a symptom of poor versioning for this package.

image

Finally, this leads to a lot of problems with versioning in the package. npm thinks the latest version is 1.0.0-0 so when I run npm outdated it thinks I need to downgrade from 1.0.0-2 to 1.0.0-0 (which I don't believe is accurate).

I haven't done many tests about what happens when I have ^1.0.0-2 in my package.json dependencies, but I wouldn't be surprised if npm is also getting confused about that since the version doesn't follow any standard convention. I'm not confident at all that it's installing the version I want when I use ^1.0.0-2 in my package.json. See more: https://docs.npmjs.com/misc/semver#caret-ranges-123-025-004.


Here is my proposal for how to fix this:

  1. Submit a final (non prerelease) version to latest as 1.0.1 (maybe 1.0.0, but there is just a lot of confusion around 1.0.0 for this package currently, so starting fresh seems like a good idea). There have been no issues ever reported on this repo (until now), and the last release was almost 3 months ago. This seems like a stable enough package to be released without a prerelease version.
  2. Follow semver for ALL future releases
  3. For future prerelease versions denote it as x.y.z-text.a. Replacing text with beta, alpha, next or something similar. And replacing x.y.z with the next semver version. And a with the number of text the version refers to. Also ensure that this is published with a tag that identical to text.
@fishcharlie
Copy link
Contributor Author

Ahhh. Probably why that badge is messed up is due to the package.json version being outdated.

"version": "1.0.0-1",

This really needs to be cleaned up...

@nebrelbug
Copy link
Owner

@fishcharlie wow, you're right! That's kind of embarrassing.

Usually I follow semantic versioning guidelines and use a release versioning tool like np for my projects. I guess when I published, I was in a hurry to get out a testable release and never cleaned up versioning.

I'll fix all this right now 😃

@nebrelbug
Copy link
Owner

@fishcharlie just updated the package version and the GitHub version 🎉

It seems that np wasn't previously updating the remote origin upon publish. I upgraded the version, and I'll make sure it behaves as expected the next time I publish 😀

Let me know if there appear to be any problems.

@nebrelbug
Copy link
Owner

I also removed the extra dist-tags.

@fishcharlie
Copy link
Contributor Author

Thanks for this @nebrelbug!! Amazing package you have here!

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

2 participants