chore(package): re-init package with commitizen and standard-release

This commit is contained in:
Pavel Pertsev
2018-05-16 12:54:46 +03:00
parent cb4e7a5643
commit eaf2328575
10640 changed files with 609660 additions and 117 deletions

2
node_modules/find-root/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,2 @@
node_modules
.DS_Store

7
node_modules/find-root/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,7 @@
Copyright © 2013 AgileMD <hello@agilemd.com> http://agilemd.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.

55
node_modules/find-root/README.md generated vendored Normal file
View File

@@ -0,0 +1,55 @@
# find-root
recursively find the closest package.json
[![Circle CI](https://circleci.com/gh/jden/find-root.svg?style=svg)](https://circleci.com/gh/jden/find-root)
## usage
Say you want to check if the directory name of a project matches its
module name in package.json:
```js
var path = require('path')
var findRoot = require('find-root')
// from a starting directory, recursively search for the nearest
// directory containing package.json
var root = findRoot('/Users/jden/dev/find-root/tests')
// => '/Users/jden/dev/find-root'
var dirname = path.basename(root)
console.log('is it the same?')
console.log(dirname === require(path.join(root, 'package.json')).name)
```
## api
### `findRoot: (startingPath : String) => String`
Returns the path for the nearest directory to `startingPath` containing
a `package.json` file, eg `/foo/module`.
Throws an error if no `package.json` is found at any level in the
`startingPath`.
## installation
$ npm install find-root
## running the tests
From package root:
$ npm install
$ npm test
## contributors
- jden <jason@denizac.org>
## license
MIT. (c) MMXIII AgileMD http://agilemd.com

24
node_modules/find-root/index.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
var path = require('path')
var fs = require('fs')
function findRoot(start) {
start = start || module.parent.filename
if (typeof start === 'string') {
if (start[start.length-1] !== path.sep) {
start+=path.sep
}
start = start.split(path.sep)
}
if(!start.length) {
throw new Error('package.json not found in path')
}
start.pop()
var dir = start.join(path.sep)
try {
fs.statSync(path.join(dir, 'package.json'));
return dir;
} catch (e) {}
return findRoot(start)
}
module.exports = findRoot

27
node_modules/find-root/package.json generated vendored Normal file
View File

@@ -0,0 +1,27 @@
{
"name": "find-root",
"author": "AgileMD <hello@agilemd.com>",
"contributors": [
"jden <jason@denizac.org>"
],
"version": "1.0.0",
"description": "find the closest package.json",
"keywords": [
"package",
"module",
"base",
"root"
],
"main": "index.js",
"scripts": {
"test": "node node_modules/mocha/bin/mocha"
},
"repository": "git@github.com:agilemd/find-root.git",
"license": "MIT",
"readmeFilename": "README.md",
"devDependencies": {
"chai": "~1.6.0",
"mocha": "~1.9.0",
"moquire": "~1.5.4"
}
}

53
node_modules/find-root/test/test.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
var chai = require('chai')
chai.should()
var expect = chai.expect
var moquire = require('moquire')
var path = require('path')
var MODULE = '../'
describe('find-root', function () {
it('recursively looks for package.json', function () {
var checked = []
var fs = {
statSync: function (path) {
checked.push(path)
if (path === '/foo/package.json') {
return {};
} else {
throw new Error();
}
}
}
var findRoot = moquire(MODULE, {fs: fs})
findRoot('/foo/bar/baz')
.should.equal('/foo')
checked.should.deep.equal([
'/foo/bar/baz/package.json',
'/foo/bar/package.json',
'/foo/package.json'
])
})
it('throws if not found', function () {
var fs = {
statSync: function (path) {
throw new Error();
}
}
var findRoot = moquire(MODULE, {fs: fs})
expect(function () {
findRoot('/foo/bar/baz/')
}).to.throw('not found')
})
})