Allow channel updates across releases. #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The node semver module that Nuts currently uses to compare versions does not allow pre-release channel comparisons across actual releases. For example, if a client currently at version 0.1.1-alpha.1 requests an update, and the latest alpha channel build is 0.1.2-alpha.1, then, by default, Nuts will respond saying the only update available is 0.1.1, ignoring the latest alpha pre-release. Also, if an alpha client has updated to a production release (say, from 0.1.1-alpha.1 to 0.1.1) then it won't be able to fetch alpha updates for the next release (e.g. 0.1.2-alpha.1). This behavior is by design in the semver module.
This commit changes the default Nuts behavior to allow dedicated channel clients to always get the latest appropriate build - be it a channel build or a production release.
See this thread discussing the issue with the primary Nuts dev: GitbookIO#20
This should probably be cleaned up a little before opening a PR into the primary Nuts repo. This is just to get things moving for now.