initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

5
node_modules/compare-versions/.editorconfig generated vendored Normal file
View File

@@ -0,0 +1,5 @@
root = true
[*]
indent_style = spaces
indent_size = 2

4
node_modules/compare-versions/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,4 @@
language: node_js
node_js:
- "8"
after_script: "npm install coveralls && nyc report --reporter=text-lcov | coveralls"

40
node_modules/compare-versions/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,40 @@
# Changelog
## [3.3.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.3.0) - 2018-06-10
- Add TypeScript declarations.
## [3.2.1](https://github.com/omichelsen/compare-versions/releases/tag/v3.2.1) - 2018-05-14
- Fix rare bug in handling optional metadata.
## [3.2.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.2.0) - 2018-05-13
- Support Chromium version numbers.
## [3.1.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.1.0) - 2017-09-25
- Ignore leading zero in numbers.
## [3.0.1](https://github.com/omichelsen/compare-versions/releases/tag/v3.0.1) - 2017-04-01
- Fix for leading 'v'.
## [3.0.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.0.0) - 2016-08-08
- Validate input data.
## [2.0.2](https://github.com/omichelsen/compare-versions/releases/tag/v2.0.2) - 2016-06-06
- Handle numbers in pre-release versions.
## [2.0.1](https://github.com/omichelsen/compare-versions/releases/tag/v2.0.1) - 2015-09-13
- Fix for versions with <3 digits.
## [2.0.0](https://github.com/omichelsen/compare-versions/releases/tag/v2.0.0) - 2015-09-07
- Change global window accessor from returnExports to compareVersions.
## [1.1.2](https://github.com/omichelsen/compare-versions/releases/tag/v1.1.2) - 2015-05-03
- Move patch check outside of the for loop.
## [1.1.1](https://github.com/omichelsen/compare-versions/releases/tag/v1.1.1) - 2015-05-03
- Add a base 10 radix.
## [1.1.0](https://github.com/omichelsen/compare-versions/releases/tag/v1.1.0) - 2015-03-18
- Added support for semver pre-release and metadata syntax.
## [1.0.0](https://github.com/omichelsen/compare-versions/releases/tag/v1.0.0) - 2015-03-18
- Initial release.

21
node_modules/compare-versions/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-2017 Ole Michelsen
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.

58
node_modules/compare-versions/README.md generated vendored Normal file
View File

@@ -0,0 +1,58 @@
# compare-versions
[![Build Status](https://img.shields.io/travis/omichelsen/compare-versions/master.svg)](https://travis-ci.org/omichelsen/compare-versions)
[![Coverage Status](https://coveralls.io/repos/omichelsen/compare-versions/badge.svg?branch=master&service=github)](https://coveralls.io/github/omichelsen/compare-versions?branch=master)
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).
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:
- Supports wildcards for minor and patch version like `1.0.x` or `1.0.*`.
- Supports [Chromium version numbers](https://www.chromium.org/developers/version-numbers) with 4 parts, e.g. version `25.0.1364.126`.
- Any leading `v` is ignored, e.g. `v1.0` is interpreted as `1.0`.
- Leading zero is ignored, e.g. `1.01.1` is interpreted as `1.1.1`.
## Install
```bash
$ npm install compare-versions
```
## Usage
```javascript
var compareVersions = require('compare-versions');
compareVersions('10.1.8', '10.0.4'); // 1
compareVersions('10.0.1', '10.0.1'); // 0
compareVersions('10.1.1', '10.2.2'); // -1
```
Can also be used for sorting:
```javascript
var versions = [
'1.5.19',
'1.2.3',
'1.5.5'
]
var sorted = versions.sort(compareVersions);
/*
[
'1.2.3',
'1.5.5',
'1.5.19'
]
*/
```
### Browser
If included directly in the browser, `compareVersions()` is available on the global window:
```html
<script src="compare-versions/index.js"></script>
<script>
window.compareVersions('10.0.0', '10.1.0');
</script>
```

29
node_modules/compare-versions/bower.json generated vendored Normal file
View File

@@ -0,0 +1,29 @@
{
"name": "compare-versions",
"version": "3.3.0",
"description": "Compare semver version strings to find greater, equal or lesser.",
"main": "index.js",
"authors": [
"Ole Bjørn Michelsen <ole@michelsen.dk>"
],
"moduleType": [
"amd",
"globals",
"node"
],
"keywords": [
"semver",
"version",
"compare",
"browser",
"node"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}

2
node_modules/compare-versions/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
declare function compareVersions(firstVersion: string, secondVersion: string): number;
export = compareVersions;

75
node_modules/compare-versions/index.js generated vendored Normal file
View File

@@ -0,0 +1,75 @@
/* global define */
(function (root, factory) {
/* istanbul ignore next */
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.compareVersions = factory();
}
}(this, function () {
var semver = /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
function indexOrEnd(str, q) {
return str.indexOf(q) === -1 ? str.length : str.indexOf(q);
}
function split(v) {
var c = v.replace(/^v/, '').replace(/\+.*$/, '');
var patchIndex = indexOrEnd(c, '-');
var arr = c.substring(0, patchIndex).split('.');
arr.push(c.substring(patchIndex + 1));
return arr;
}
function tryParse(v) {
return isNaN(Number(v)) ? v : Number(v);
}
function validate(version) {
if (typeof version !== 'string') {
throw new TypeError('Invalid argument expected string');
}
if (!semver.test(version)) {
throw new Error('Invalid argument not valid semver');
}
}
return function compareVersions(v1, v2) {
[v1, v2].forEach(validate);
var s1 = split(v1);
var s2 = split(v2);
for (var i = 0; i < Math.max(s1.length - 1, s2.length - 1); i++) {
var n1 = parseInt(s1[i] || 0, 10);
var n2 = parseInt(s2[i] || 0, 10);
if (n1 > n2) return 1;
if (n2 > n1) return -1;
}
var sp1 = s1[s1.length - 1];
var sp2 = s2[s2.length - 1];
if (sp1 && sp2) {
var p1 = sp1.split('.').map(tryParse);
var p2 = sp2.split('.').map(tryParse);
for (i = 0; i < Math.max(p1.length, p2.length); i++) {
if (p1[i] === undefined || typeof p2[i] === 'string' && typeof p1[i] === 'number') return -1;
if (p2[i] === undefined || typeof p1[i] === 'string' && typeof p2[i] === 'number') return 1;
if (p1[i] > p2[i]) return 1;
if (p2[i] > p1[i]) return -1;
}
} else if (sp1 || sp2) {
return sp1 ? -1 : 1;
}
return 0;
};
}));

92
node_modules/compare-versions/package.json generated vendored Normal file
View File

@@ -0,0 +1,92 @@
{
"_args": [
[
"compare-versions@^3.1.0",
"/home/bernhard/freifunk-app/node_modules/istanbul-api"
]
],
"_from": "compare-versions@>=3.1.0 <4.0.0",
"_id": "compare-versions@3.3.0",
"_inCache": true,
"_installable": true,
"_location": "/compare-versions",
"_nodeVersion": "9.11.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/compare-versions_3.3.0_1528639493529_0.7904406976732852"
},
"_npmUser": {
"email": "ole@michelsen.dk",
"name": "omichelsen"
},
"_npmVersion": "6.1.0",
"_phantomChildren": {},
"_requested": {
"name": "compare-versions",
"raw": "compare-versions@^3.1.0",
"rawSpec": "^3.1.0",
"scope": null,
"spec": ">=3.1.0 <4.0.0",
"type": "range"
},
"_requiredBy": [
"/istanbul-api"
],
"_resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.0.tgz",
"_shasum": "af93ea705a96943f622ab309578b9b90586f39c3",
"_shrinkwrap": null,
"_spec": "compare-versions@^3.1.0",
"_where": "/home/bernhard/freifunk-app/node_modules/istanbul-api",
"author": {
"name": "Ole Michelsen"
},
"bugs": {
"url": "https://github.com/omichelsen/compare-versions/issues"
},
"dependencies": {},
"description": "Compare semver version strings to find greater, equal or lesser.",
"devDependencies": {
"mocha": "^5.2.0",
"nyc": "^12.0.2"
},
"directories": {
"test": "test"
},
"dist": {
"fileCount": 11,
"integrity": "sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHTAGCRA9TVsSAnZWagAAv5EP/3L0mpXmTyfHn8e+PqJW\naL9qsDm6BO37b7NDyVhZHC5FC+PsukrUc2Z2SyycMqOUxyUCH3X2VNYniLUo\npcwNHjnZqgMnMxnFHVhgo5XoJ0C7fJzWEhUx72Jj5eiXTFpsU3t2ziB0Zjo2\n09S6VG8fhk4OYBF/J2JyGfgSR6NmIA51IyxrQ1mniuLjw4wDQEQtsUmo1Znh\nBjyVQ/GgdB/ui0JFu3QaQVmPrCljbGp8GSGnBfZ3S6DEKTY5e7hMKXGzTr+L\ncRUgEib/BhBmhgSasLC/cW/XXBUFSsLxdTRCbhD3Q7evOBuHGd0ejMw1z4bR\n1awrG0WvfPp1wNSqCih4U6WWHdfSxWg67M/xsE+mfwl0DxQx9tERGrFNF11T\nX4qVMz2z5XGl119mRFGiFKMBdg/GFiSX5Fba60y3NUvWFoAj6kh+NijI4cb9\nAi4Q8bNymr9Ao/zI012tu6nzO/T9iIN4+479ANL9UyMB79VCVY+hOfUFKTtL\nv8qMB2CLfoetKen1CATjvgMniCSdtcJugnLIGTrsUcJ6N7+wB1uQZEhLWrC8\nxw0GqsFmc9q6/6BkADJhm5Cj63ep52s67Fbe4JcXy4P4scIPXr5QUunJUJr5\nCw/RrGWcQ1dSec9onRA3bI9xl2SV3GS2UICfuY/X5LQBEtenfXfL4LIC08sc\nv5yF\r\n=QWgQ\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "af93ea705a96943f622ab309578b9b90586f39c3",
"tarball": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.0.tgz",
"unpackedSize": 14447
},
"gitHead": "8ccb87b70ad0527bbc90e3cd9fe529f812bb99ef",
"homepage": "https://github.com/omichelsen/compare-versions#readme",
"keywords": [
"browser",
"compare",
"node",
"semver",
"version"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "omichelsen",
"email": "ole@michelsen.dk"
}
],
"name": "compare-versions",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/omichelsen/compare-versions.git"
},
"scripts": {
"test": "nyc mocha"
},
"types": "index.d.ts",
"version": "3.3.0"
}

181
node_modules/compare-versions/test/compare.js generated vendored Normal file
View File

@@ -0,0 +1,181 @@
const assert = require('assert');
const compare = require('..');
const cmp = {
'1': '>',
'0': '=',
'-1': '<',
};
const runTests = (dataSet) => {
dataSet.forEach(([v1, v2, expected]) => {
it(`${v1} ${cmp[expected]} ${v2}`, () => assert.equal(compare(v1, v2), expected));
});
};
describe('compare versions', () => {
describe('single-segment versions', () => {
runTests([
['10', '9', 1],
['10', '10', 0],
['9', '10', -1],
]);
});
describe('two-segment versions', () => {
runTests([
['10.8', '10.4', 1],
['10.1', '10.1', 0],
['10.1', '10.2', -1],
]);
});
describe('three-segment versions', () => {
runTests([
['10.1.8', '10.0.4', 1],
['10.0.1', '10.0.1', 0],
['10.1.1', '10.2.2', -1],
]);
});
describe('four-segment versions - https://www.chromium.org/developers/version-numbers', () => {
runTests([
['1.0.0.0', '1', 0],
['1.0.0.0', '1.0', 0],
['1.0.0.0', '1.0.0', 0],
['1.0.0.0', '1.0.0.0', 0],
['1.2.3.4', '1.2.3.4', 0],
['1.2.3.4', '1.2.3.04', 0],
['v1.2.3.4', '01.2.3.4', 0],
['1.2.3.4', '1.2.3.5', -1],
['1.2.3.5', '1.2.3.4', 1],
['1.0.0.0-alpha', '1.0.0-alpha', 0],
['1.0.0.0-alpha', '1.0.0.0-beta', -1],
]);
});
it('should compare versions with different number of digits in same group', () => {
assert.equal(compare('11.0.10', '11.0.2'), 1);
assert.equal(compare('11.0.2', '11.0.10'), -1);
});
it('should compare versions with different number of digits in different groups', () => {
assert.equal(compare('11.1.10', '11.0'), 1);
});
it('should compare versions with different number of digits', () => {
assert.equal(compare('1.1.1', '1'), 1);
assert.equal(compare('1.0.0', '1'), 0);
assert.equal(compare('1.0', '1.4.1'), -1);
});
describe('pre-release versions - https://semver.org/#spec-item-9', () => {
runTests([
['1.0.0-alpha.1', '1.0.0-alpha', 1],
['1.0.0-alpha', '1.0.0-alpha.1', -1],
['1.0.0-alpha.1', '1.0.0-alpha.beta', -1],
['1.0.0-alpha.beta', '1.0.0-beta', -1],
['1.0.0-beta', '1.0.0-beta.2', -1],
['1.0.0-beta.2', '1.0.0-beta.11', -1],
['1.0.0-beta.11', '1.0.0-rc.1', -1],
['1.0.0-rc.1', '1.0.0', -1],
['1.0.0-alpha', '1', -1],
]);
});
describe('ignore build metadata - https://semver.org/#spec-item-10', () => {
runTests([
['1.4.0-build.3928', '1.4.0-build.3928+sha.a8d9d4f', 0],
['1.4.0-build.3928+sha.b8dbdb0', '1.4.0-build.3928+sha.a8d9d4f', 0],
['1.0.0-alpha+001', '1.0.0-alpha', 0],
['1.0.0-beta+exp.sha.5114f85', '1.0.0-beta+exp.sha.999999', 0],
['1.0.0+20130313144700', '1.0.0', 0],
['1.0.0+20130313144700', '2.0.0', -1],
['1.0.0+20130313144700', '1.0.1+11234343435', -1],
['1.0.1+1', '1.0.1+2', 0],
['1.0.0+a-a', '1.0.0+a-b', 0],
]);
});
describe('ignore leading `v`', () => {
runTests([
['v1.0.0', '1.0.0', 0],
['v1.0.0', 'v1.0.0', 0],
['v1.0.0', 'v1.0.0', 0],
['v1.0.0-alpha', '1.0.0-alpha', 0],
]);
});
describe('ignore leading `0`', () => {
runTests([
['01.0.0', '1', 0],
['01.0.0', '1.0.0', 0],
['1.01.0', '1.01.0', 0],
['1.0.03', '1.0.3', 0],
['1.0.03-alpha', '1.0.3-alpha', 0],
['v01.0.0', '1.0.0', 0],
['v01.0.0', '2.0.0', -1],
]);
});
describe('invalid input', () => {
[
[42, /Invalid argument expected string/],
[{}, /Invalid argument expected string/],
[[], /Invalid argument expected string/],
[() => undefined, /Invalid argument expected string/],
['6.3.', /Invalid argument not valid semver/],
['1.2.3a', /Invalid argument not valid semver/],
['1.2.-3a', /Invalid argument not valid semver/],
].forEach(([v1, exception]) => {
it(`should throw on ${v1}`, () => {
assert.throws(() => { compare(v1, v1); }, exception);
});
});
});
runTests([
['0.1.20', '0.1.5', 1],
['0.6.1-1', '0.6.1-0', 1],
['0.7.x', '0.6.0', 1],
['0.7.x', '0.6.0-asdf', 1],
['0.7.x', '0.6.2', 1],
['0.7.x', '0.7.0-asdf', 1],
['1', '0.0.0-beta', 1],
['1', '0.2.3', 1],
['1', '0.2.4', 1],
['1', '1.0.0-0', 1],
['1', '1.0.0-beta', 1],
['1.0', '0.0.0', 1],
['1.0', '0.1.0', 1],
['1.0', '0.1.2', 1],
['1.0.0', '0.0.0', 1],
['1.0.0', '0.0.1', 1],
['1.0.0', '0.2.3', 1],
['1.0.0-beta.2', '1.0.0-beta.1', 1],
['1.2.*', '1.1.3', 1],
['1.2.*', '1.1.9999', 1],
['1.2.2', '1.2.1', 1],
['1.2.x', '1.0.0', 1],
['1.2.x', '1.1.0', 1],
['1.2.x', '1.1.3', 1],
['2', '1.0.0', 1],
['2', '1.0.0-beta', 1],
['2', '1.9999.9999', 1],
['2.*.*', '1.0.1', 1],
['2.*.*', '1.1.3', 1],
['2.0.0', '1.0.0', 1],
['2.0.0', '1.1.1', 1],
['2.0.0', '1.2.9', 1],
['2.0.0', '1.9999.9999', 1],
['2.3', '2.2.1', 1],
['2.3', '2.2.2', 1],
['2.4', '2.3.0', 1],
['2.4', '2.3.5', 1],
['2.x.x', '1.0.0', 1],
['2.x.x', '1.1.3', 1],
['3.2.1', '2.3.2', 1],
['3.2.1', '3.2.0', 1],
['v0.5.4-pre', '0.5.4-alpha', 1],
['v3.2.1', 'v2.3.2', 1],
]);
});

60
node_modules/compare-versions/test/sort.js generated vendored Normal file
View File

@@ -0,0 +1,60 @@
var assert = require('assert');
var compare = require('..');
describe('sort versions', function () {
it('should sort versions', function () {
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'
];
assert.deepEqual(versions.sort(compare), [
'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'
]);
});
it('should sort different digits', function () {
var versions = [
'1.0',
'1.0.0',
'1.0.1'
];
assert.deepEqual(versions.sort(compare), [
'1.0',
'1.0.0',
'1.0.1'
]);
});
it('should sort pre-release', function () {
var versions = [
'1.0.0',
'1.0.1',
'1.0.1-gamma',
'1.0.1-alpha'
];
assert.deepEqual(versions.sort(compare), [
'1.0.0',
'1.0.1-alpha',
'1.0.1-gamma',
'1.0.1'
]);
});
});