mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
* first action! (#1)
This commit is contained in:
parent
8deacc95b1
commit
ace1e6a69a
3750 changed files with 1155519 additions and 0 deletions
27
node_modules/semver-diff/index.js
generated
vendored
Normal file
27
node_modules/semver-diff/index.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
var semver = require('semver');
|
||||
|
||||
module.exports = function (a, b) {
|
||||
if (semver.gt(a, b)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
a = semver.parse(a);
|
||||
b = semver.parse(b);
|
||||
|
||||
for (var key in a) {
|
||||
if (key === 'major' || key === 'minor' || key === 'patch') {
|
||||
if (a[key] !== b[key]) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
if (key === 'prerelease' || key === 'build') {
|
||||
if (JSON.stringify(a[key]) !== JSON.stringify(b[key])) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
21
node_modules/semver-diff/license
generated
vendored
Normal file
21
node_modules/semver-diff/license
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
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.
|
66
node_modules/semver-diff/package.json
generated
vendored
Normal file
66
node_modules/semver-diff/package.json
generated
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"_from": "semver-diff@^2.0.0",
|
||||
"_id": "semver-diff@2.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=",
|
||||
"_location": "/semver-diff",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "semver-diff@^2.0.0",
|
||||
"name": "semver-diff",
|
||||
"escapedName": "semver-diff",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/update-notifier"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz",
|
||||
"_shasum": "4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36",
|
||||
"_spec": "semver-diff@^2.0.0",
|
||||
"_where": "/home/shimataro/projects/actions/ssh-key-action/node_modules/update-notifier",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/semver-diff/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"semver": "^5.0.3"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Get the diff type of two semver versions: 0.0.1 0.0.2 → patch",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/semver-diff#readme",
|
||||
"keywords": [
|
||||
"semver",
|
||||
"version",
|
||||
"semantic",
|
||||
"diff",
|
||||
"difference"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "semver-diff",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/semver-diff.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.1.0"
|
||||
}
|
52
node_modules/semver-diff/readme.md
generated
vendored
Normal file
52
node_modules/semver-diff/readme.md
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
# semver-diff [](https://travis-ci.org/sindresorhus/semver-diff)
|
||||
|
||||
> Get the diff type of two [semver](https://github.com/isaacs/node-semver) versions: `0.0.1 0.0.2` → `patch`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save semver-diff
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var semverDiff = require('semver-diff');
|
||||
|
||||
semverDiff('1.1.1', '1.1.2');
|
||||
//=> 'patch'
|
||||
|
||||
semverDiff('0.0.1', '1.0.0');
|
||||
//=> 'major'
|
||||
|
||||
semverDiff('0.0.1', '0.1.0');
|
||||
//=> 'minor'
|
||||
|
||||
semverDiff('0.0.1-foo', '0.0.1-foo.bar');
|
||||
//=> 'prerelease'
|
||||
|
||||
semverDiff('0.1.0', '0.1.0+foo');
|
||||
//=> 'build'
|
||||
|
||||
semverDiff('0.0.1', '0.0.1');
|
||||
//=> null
|
||||
|
||||
semverDiff('0.0.2', '0.0.1');
|
||||
//=> null
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### semverDiff(versionA, versionB)
|
||||
|
||||
Returns the difference type between two semver versions, or `null` if they're identical or the second one is lower than the first.
|
||||
|
||||
Possible values: `'major'`, `'minor'`, `'patch'`, `'prerelease'`, `'build'`, `null`.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
Loading…
Add table
Add a link
Reference in a new issue