Codebase list node-compare-versions / e74b4c5
New upstream version 3.4.0 Julien Puydt 5 years ago
5 changed file(s) with 8 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
00 # 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.
14
25 ## [3.3.1](https://github.com/omichelsen/compare-versions/releases/tag/v3.3.1) - 2018-08-18
36 - Fix TypeScript export declaration.
11
22 [![Build Status](https://img.shields.io/travis/omichelsen/compare-versions/master.svg)](https://travis-ci.org/omichelsen/compare-versions)
33 [![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)
45
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).
67
78 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:
89
00 {
11 "name": "compare-versions",
2 "version": "3.3.1",
2 "version": "3.4.0",
33 "description": "Compare semver version strings to find greater, equal or lesser.",
44 "main": "index.js",
55 "authors": [
3232 throw new TypeError('Invalid argument expected string');
3333 }
3434 if (!semver.test(version)) {
35 throw new Error('Invalid argument not valid semver');
35 throw new Error('Invalid argument not valid semver (\''+version+'\' received)');
3636 }
3737 }
3838
00 {
11 "name": "compare-versions",
2 "version": "3.3.1",
2 "version": "3.4.0",
33 "description": "Compare semver version strings to find greater, equal or lesser.",
44 "repository": {
55 "type": "git",