This commit is contained in:
eric sciple 2020-01-24 12:20:47 -05:00
parent a004f0ae58
commit fc725ba36b
7280 changed files with 19 additions and 1796407 deletions

View file

@ -1,6 +0,0 @@
language: node_js
node_js:
- "0.8"
- "0.10"
before_install:
- npm install -g npm

18
node_modules/semver-compare/LICENSE generated vendored
View file

@ -1,18 +0,0 @@
This software is released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,13 +0,0 @@
var cmp = require('../');
var versions = [
'1.2.3',
'4.11.6',
'4.2.0',
'1.5.19',
'1.5.5',
'4.1.3',
'2.3.1',
'10.5.5',
'11.3.0'
];
console.log(versions.sort(cmp).join('\n'));

View file

@ -1,12 +0,0 @@
var versions = [
'1.2.3',
'4.11.6',
'4.2.0',
'1.5.19',
'1.5.5',
'4.1.3',
'2.3.1',
'10.5.5',
'11.3.0'
];
console.log(versions.sort().join('\n'));

13
node_modules/semver-compare/index.js generated vendored
View file

@ -1,13 +0,0 @@
module.exports = function cmp (a, b) {
var pa = a.split('.');
var pb = b.split('.');
for (var i = 0; i < 3; i++) {
var na = Number(pa[i]);
var nb = Number(pb[i]);
if (na > nb) return 1;
if (nb > na) return -1;
if (!isNaN(na) && isNaN(nb)) return 1;
if (isNaN(na) && !isNaN(nb)) return -1;
}
return 0;
};

View file

@ -1,63 +0,0 @@
{
"_args": [
[
"semver-compare@1.0.0",
"/Users/eric/repos/actions/setup-node"
]
],
"_development": true,
"_from": "semver-compare@1.0.0",
"_id": "semver-compare@1.0.0",
"_inBundle": false,
"_integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
"_location": "/semver-compare",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "semver-compare@1.0.0",
"name": "semver-compare",
"escapedName": "semver-compare",
"rawSpec": "1.0.0",
"saveSpec": null,
"fetchSpec": "1.0.0"
},
"_requiredBy": [
"/please-upgrade-node"
],
"_resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
"_spec": "1.0.0",
"_where": "/Users/eric/repos/actions/setup-node",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"bugs": {
"url": "https://github.com/substack/semver-compare/issues"
},
"dependencies": {},
"description": "compare two semver version strings, returning -1, 0, or 1",
"devDependencies": {
"tape": "^3.0.0"
},
"homepage": "https://github.com/substack/semver-compare",
"keywords": [
"semver",
"compare",
"cmp",
"comparison",
"sort"
],
"license": "MIT",
"main": "index.js",
"name": "semver-compare",
"repository": {
"type": "git",
"url": "git://github.com/substack/semver-compare.git"
},
"scripts": {
"test": "tape test/*.js"
},
"version": "1.0.0"
}

View file

@ -1,77 +0,0 @@
# semver-compare
compare two semver version strings, returning -1, 0, or 1
The return value can be fed straight into `[].sort`.
[![build status](https://secure.travis-ci.org/substack/semver-compare.png)](http://travis-ci.org/substack/semver-compare)
# example
``` js
var cmp = require('semver-compare');
var versions = [
'1.2.3',
'4.11.6',
'4.2.0',
'1.5.19',
'1.5.5',
'4.1.3',
'2.3.1',
'10.5.5',
'11.3.0'
];
console.log(versions.sort(cmp).join('\n'));
```
prints:
```
1.2.3
1.5.5
1.5.19
2.3.1
4.1.3
4.2.0
4.11.6
10.5.5
11.3.0
```
whereas the default lexicographic sort (`versions.sort()`) would be:
```
1.2.3
1.5.19
1.5.5
10.5.5
11.3.0
2.3.1
4.1.3
4.11.6
4.2.0
```
# methods
```
var cmp = require('semver-compare')
```
## cmp(a, b)
If the semver string `a` is greater than `b`, return `1`.
If the semver string `b` is greater than `a`, return `-1`.
If `a` equals `b`, return 0;
# install
With [npm](https://npmjs.org) do:
```
npm install semver-compare
```
# license
MIT

View file

@ -1,29 +0,0 @@
var cmp = require('../');
var test = require('tape');
var versions = [
'1.2.3',
'4.11.6',
'4.2.0',
'1.5.19',
'1.5.5',
'4.1.3',
'2.3.1',
'10.5.5',
'11.3.0'
];
test('cmp', function (t) {
t.plan(1);
t.deepEqual(versions.sort(cmp), [
'1.2.3',
'1.5.5',
'1.5.19',
'2.3.1',
'4.1.3',
'4.2.0',
'4.11.6',
'10.5.5',
'11.3.0'
]);
});