New upstream version 3.4.0
Julien Puydt
5 years ago
0 | 0 |
# Changelog
|
|
1 |
|
|
2 |
## [3.4.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.4.0) - 2018-08-30
|
|
3 |
- Show rejected version in error message.
|
1 | 4 |
|
2 | 5 |
## [3.3.1](https://github.com/omichelsen/compare-versions/releases/tag/v3.3.1) - 2018-08-18
|
3 | 6 |
- Fix TypeScript export declaration.
|
1 | 1 |
|
2 | 2 |
[![Build Status](https://img.shields.io/travis/omichelsen/compare-versions/master.svg)](https://travis-ci.org/omichelsen/compare-versions)
|
3 | 3 |
[![Coverage Status](https://coveralls.io/repos/omichelsen/compare-versions/badge.svg?branch=master&service=github)](https://coveralls.io/github/omichelsen/compare-versions?branch=master)
|
|
4 |
[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/compare-versions.svg)](https://bundlephobia.com/result?p=compare-versions)
|
4 | 5 |
|
5 | |
Compare [semver](https://semver.org/) version strings to find greater, equal or lesser. Runs in the browser as well as Node.js/React Native etc. Has no dependencies and is tiny (<600 bytes gzipped).
|
|
6 |
Compare [semver](https://semver.org/) version strings to find greater, equal or lesser. Runs in the browser as well as Node.js/React Native etc. Has no dependencies and is tiny (~630 bytes gzipped).
|
6 | 7 |
|
7 | 8 |
This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`. Additionally supports the following variations:
|
8 | 9 |
|
0 | 0 |
{
|
1 | 1 |
"name": "compare-versions",
|
2 | |
"version": "3.3.1",
|
|
2 |
"version": "3.4.0",
|
3 | 3 |
"description": "Compare semver version strings to find greater, equal or lesser.",
|
4 | 4 |
"main": "index.js",
|
5 | 5 |
"authors": [
|
32 | 32 |
throw new TypeError('Invalid argument expected string');
|
33 | 33 |
}
|
34 | 34 |
if (!semver.test(version)) {
|
35 | |
throw new Error('Invalid argument not valid semver');
|
|
35 |
throw new Error('Invalid argument not valid semver (\''+version+'\' received)');
|
36 | 36 |
}
|
37 | 37 |
}
|
38 | 38 |
|
0 | 0 |
{
|
1 | 1 |
"name": "compare-versions",
|
2 | |
"version": "3.3.1",
|
|
2 |
"version": "3.4.0",
|
3 | 3 |
"description": "Compare semver version strings to find greater, equal or lesser.",
|
4 | 4 |
"repository": {
|
5 | 5 |
"type": "git",
|