mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-16 07:13:46 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
22
node_modules/parse-github-repo-url/LICENSE
generated
vendored
Normal file
22
node_modules/parse-github-repo-url/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong me@jongleberry.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.
|
||||
34
node_modules/parse-github-repo-url/README.md
generated
vendored
Normal file
34
node_modules/parse-github-repo-url/README.md
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# parse-github-repo-url
|
||||
|
||||
> Parse a GitHub URL for user/project@version
|
||||
|
||||
[](https://travis-ci.org/repo-utils/parse-github-repo-url)
|
||||
[![semantic-release][semantic-image] ][semantic-url]
|
||||
|
||||
[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
|
||||
[semantic-url]: https://github.com/semantic-release/semantic-release
|
||||
|
||||
# Features
|
||||
|
||||
Parse all the stupid ways you could write a GitHub URL in your damn `package.json`.
|
||||
Supports:
|
||||
|
||||
- `<user>/<repo#<commit>`
|
||||
- `git://` and `.git` w/ `#commit` or `@version`
|
||||
- `git@` and `https:git@`
|
||||
- `www.github.com`
|
||||
- `gitlab.<my company name>.com/user/repo.git` parsing
|
||||
- All 5 different ways you could download a freaking tarball/zipball
|
||||
|
||||
## API
|
||||
|
||||
### [user, repo, version] = parse(url)
|
||||
|
||||
`version` could be `false`y, a semantic version, a commit, or a branch, etc.
|
||||
|
||||
```js
|
||||
var parse = require('parse-github-repo-url')
|
||||
parse('component/emitter#1') // => ['component', 'emitter', '1']
|
||||
```
|
||||
|
||||
See the tests for all the different types of supported URLs.
|
||||
58
node_modules/parse-github-repo-url/index.js
generated
vendored
Normal file
58
node_modules/parse-github-repo-url/index.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
var parse = require('url').parse
|
||||
|
||||
module.exports = function (string) {
|
||||
// user/repo#version
|
||||
var m = /^([\w-.]+)\/([\w-.]+)((?:#|@).+)?$/.exec(string)
|
||||
if (m) return format(m)
|
||||
|
||||
string = string.replace('//www.', '//')
|
||||
// normalize git@ and https:git@ urls
|
||||
string = string.replace(/^git@/, 'https://')
|
||||
string = string.replace(/^https:git@/, 'https://')
|
||||
string = string.replace('.com:', '.com/')
|
||||
|
||||
if (!~string.indexOf('://')) {
|
||||
return false
|
||||
}
|
||||
var url = parse(string)
|
||||
|
||||
var path = url.pathname.replace(/\.git$/, '')
|
||||
|
||||
// https://www.npmjs.org/doc/json.html#Git-URLs-as-Dependencies
|
||||
var m = /^\/([\w-.]+)\/([\w-.]+)$/.exec(path)
|
||||
if (m) return m.slice(1, 3).concat((url.hash || '').slice(1))
|
||||
|
||||
// archive link
|
||||
// https://developer.github.com/v3/repos/contents/#get-archive-link
|
||||
var m = /^\/repos\/([\w-.]+)\/([\w-.]+)\/(?:tarball|zipball)(\/.+)?$/.exec(path)
|
||||
if (m) return format(m)
|
||||
|
||||
// codeload link
|
||||
// https://developer.github.com/v3/repos/contents/#response-4
|
||||
var m = /^\/([\w-.]+)\/([\w-.]+)\/(?:legacy\.(?:zip|tar\.gz))(\/.+)?$/.exec(path)
|
||||
if (m) return format(m)
|
||||
|
||||
// tarball link
|
||||
// https://github.com/LearnBoost/socket.io-client/blob/master/package.json#L14
|
||||
var m = /^\/([\w-]+)\/([\w-.]+)\/archive\/(.+)\.tar\.gz?$/.exec(path)
|
||||
if (m) return m.slice(1, 4)
|
||||
|
||||
// https://docs.gitlab.com/ce/user/group/subgroups/
|
||||
if (~url.host.indexOf('gitlab')) {
|
||||
var m = /^\/((?:[\w-.]+\/)+)([\w-.]+)$/.exec(path)
|
||||
if (m) {
|
||||
m = m.slice(1, 3);
|
||||
// remove slash at the end
|
||||
m[0] = m[0].slice(0, -1);
|
||||
return m.concat((url.hash || '').slice(1));
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
function format(m) {
|
||||
var version = (m[3] || '').slice(1)
|
||||
if (/^['"]/.test(version)) version = version.slice(1, -1)
|
||||
return [m[1], m[2], version]
|
||||
}
|
||||
29
node_modules/parse-github-repo-url/package.json
generated
vendored
Normal file
29
node_modules/parse-github-repo-url/package.json
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "parse-github-repo-url",
|
||||
"description": "Parse a GitHub URL for user/project@version",
|
||||
"version": "1.4.1",
|
||||
"author": {
|
||||
"name": "Jonathan Ong",
|
||||
"email": "me@jongleberry.com",
|
||||
"url": "http://jongleberry.com",
|
||||
"twitter": "https://twitter.com/jongleberry"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/repo-utils/parse-github-repo-url.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "1",
|
||||
"semantic-release": "^4.3.5"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "mocha --reporter spec --bail",
|
||||
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
|
||||
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user