Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/damonoehlman/slimver-spec
Lightweight and strict numeric versioning (major.minor.patch) only
https://github.com/damonoehlman/slimver-spec
Last synced: 7 days ago
JSON representation
Lightweight and strict numeric versioning (major.minor.patch) only
- Host: GitHub
- URL: https://github.com/damonoehlman/slimver-spec
- Owner: DamonOehlman
- Created: 2014-06-14T02:48:06.000Z (over 10 years ago)
- Default Branch: gh-pages
- Last Pushed: 2015-06-16T04:36:21.000Z (over 9 years ago)
- Last Synced: 2024-10-25T20:39:30.575Z (21 days ago)
- Language: JavaScript
- Homepage: http://damonoehlman.github.io/slimver-spec/
- Size: 392 KB
- Stars: 16
- Watchers: 4
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# slimver
This repository describes __slimver__ which is a simplified, opinionated, and strict variant of the [semver](http://semver.org/) spec. If it doesn't fit your needs, then that is likely by design and you should continue with using semver.
Feel free to [open an issue](https://github.com/DamonOehlman/slimver-spec/issues) if you would like to discuss aspects of the design though.
[![unstable](https://img.shields.io/badge/stability-unstable-yellowgreen.svg)](https://github.com/dominictarr/stability#unstable)
## Rules
### Version Strings
- A slimver version string is expressed in the form, `MAJOR.MINOR.PATCH` as per the semver spec. In contrast with semver though, slimver has no capacity to express prerelease or build metadata as part of the version string. It is a strictly three positive integer values (between 0 and 65535) joined using a single dot character (`.`).
__OK__
- `1.0.0`
__NOT OK__
- `1.0.0-beta1`
- As each of the version parts is constrained within the range of `0..65535`, the largest version of a thing that can be tagged for release using slimver is `65535.65535.65535`.
__OK__
- `1.0.0`
- `1.5.65535`__NOT OK__
- `5.123232.0`
### Ranges
Only simple version range expressions are permitted:
- `^` expressions mean - any version matching the current major version, starting at the currently specified version.
- `~` expressions are supported, but are __EXACTLY THE SAME__ as `^` expressions.
- In the case that you want to lock to something other than a major version, you should use an `n.n.x` range expression or simply "pin" the version to a specific version with `n.n.n`.
__NOTE:__ The [special pre `1.0.0` version range matching expressions from node-semver](https://github.com/isaacs/node-semver#ranges) have been replaced with simpler rules (see [here](https://github.com/DamonOehlman/slimver-spec/issues/2) and [here](https://github.com/dominictarr/semver-ftw/issues/2) for more info behind why).
#### Range Examples
| version | min | max |
|---------|-------|---------------|
| ^1.2.3 | 1.2.3 | 1.65535.65535 |
| ^0.1.2 | 0.1.2 | 0.65535.65535 |
| ^0.0.1 | 0.0.1 | 0.65535.65535 |
| ~1.2.3 | 1.2.3 | 1.65535.65535 |
| ~0.1.2 | 0.1.2 | 0.65535.65535 |
| ~0.0.1 | 0.0.1 | 0.65535.65535 |
| 1.x.x | 1.0.0 | 1.65535.65535 |
| 1.1.x | 1.1.0 | 1.1.65535 |## Benefits
- By sticking to these strict rules a version can be encoded into a single numeric value for easy comparison.
- Simplified range expressions mean requirements are visually grokkable.## Implementations
- JS: [slimver](https://github.com/DamonOehlman/slimver)
## Feedback
Drop an issue in the [source repo](https://github.com/DamonOehlman/slimver-spec), or add your opinion to any of the [existing issues](https://github.com/DamonOehlman/slimver-spec/issues).
## Other Reading
The following sites, issues, posts, etc are all worth a look:
-
## License
[Creative Commons - CC BY 3.0](http://creativecommons.org/licenses/by/3.0/)