ubdate
This commit is contained in:
31
node_modules/find-versions/index.d.ts
generated
vendored
Normal file
31
node_modules/find-versions/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
declare namespace findVersions {
|
||||
interface Options {
|
||||
/**
|
||||
Also match non-semver versions like `1.88`. They're coerced into semver compliant versions.
|
||||
|
||||
@default false
|
||||
*/
|
||||
readonly loose?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Find semver versions in a string: `unicorn v1.2.3` → `1.2.3`.
|
||||
|
||||
@example
|
||||
```
|
||||
import findVersions = require('find-versions');
|
||||
|
||||
findVersions('unicorn v1.2.3 rainbow 2.3.4+build.1');
|
||||
//=> ['1.2.3', '2.3.4+build.1']
|
||||
|
||||
findVersions('cp (GNU coreutils) 8.22', {loose: true});
|
||||
//=> ['8.22.0']
|
||||
```
|
||||
*/
|
||||
declare function findVersions(
|
||||
stringWithVersions: string,
|
||||
options?: findVersions.Options
|
||||
): string[];
|
||||
|
||||
export = findVersions;
|
||||
13
node_modules/find-versions/index.js
generated
vendored
Normal file
13
node_modules/find-versions/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
const semverRegex = require('semver-regex');
|
||||
|
||||
module.exports = (stringWithVersions, options = {}) => {
|
||||
if (typeof stringWithVersions !== 'string') {
|
||||
throw new TypeError(`Expected a string, got ${typeof stringWithVersions}`);
|
||||
}
|
||||
|
||||
const reLoose = new RegExp(`(?:${semverRegex().source})|(?:v?(?:\\d+\\.\\d+)(?:\\.\\d+)?)`, 'g');
|
||||
const matches = stringWithVersions.match(options.loose === true ? reLoose : semverRegex()) || [];
|
||||
|
||||
return [...new Set(matches.map(match => match.trim().replace(/^v/, '').replace(/^\d+\.\d+$/, '$&.0')))];
|
||||
};
|
||||
9
node_modules/find-versions/license
generated
vendored
Normal file
9
node_modules/find-versions/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
75
node_modules/find-versions/package.json
generated
vendored
Normal file
75
node_modules/find-versions/package.json
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"_from": "find-versions@^3.0.0",
|
||||
"_id": "find-versions@3.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==",
|
||||
"_location": "/find-versions",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "find-versions@^3.0.0",
|
||||
"name": "find-versions",
|
||||
"escapedName": "find-versions",
|
||||
"rawSpec": "^3.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/bin-version"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz",
|
||||
"_shasum": "10297f98030a786829681690545ef659ed1d254e",
|
||||
"_spec": "find-versions@^3.0.0",
|
||||
"_where": "/var/www/html/jason/WeihnachtenMelly/node_modules/bin-version",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/find-versions/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"semver-regex": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Find semver versions in a string: `unicorn v1.2.3` → `1.2.3`",
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/find-versions#readme",
|
||||
"keywords": [
|
||||
"semver",
|
||||
"version",
|
||||
"versions",
|
||||
"regex",
|
||||
"regexp",
|
||||
"match",
|
||||
"matching",
|
||||
"semantic",
|
||||
"find",
|
||||
"extract",
|
||||
"get"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "find-versions",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/find-versions.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"version": "3.2.0"
|
||||
}
|
||||
53
node_modules/find-versions/readme.md
generated
vendored
Normal file
53
node_modules/find-versions/readme.md
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# find-versions [](https://travis-ci.com/sindresorhus/find-versions)
|
||||
|
||||
> Find semver versions in a string: `unicorn v1.2.3` → `1.2.3`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install find-versions
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const findVersions = require('find-versions');
|
||||
|
||||
findVersions('unicorn v1.2.3 rainbow 2.3.4+build.1');
|
||||
//=> ['1.2.3', '2.3.4+build.1']
|
||||
|
||||
findVersions('cp (GNU coreutils) 8.22', {loose: true});
|
||||
//=> ['8.22.0']
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### findVersions(stringWithVersions, [options])
|
||||
|
||||
#### stringWithVersions
|
||||
|
||||
Type: `string`
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
##### loose
|
||||
|
||||
Type: `boolean`
|
||||
Default: `false`
|
||||
|
||||
Also match non-semver versions like `1.88`. They're coerced into semver compliant versions.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [find-versions-cli](https://github.com/sindresorhus/find-versions-cli) - CLI for this module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Reference in New Issue
Block a user