feat: adding linter for commits

This commit is contained in:
Carlos Gutierrez
2021-11-22 09:39:27 -06:00
commit 2c7c117aa1
3093 changed files with 1215197 additions and 0 deletions

175
node_modules/git-raw-commits/CHANGELOG.md generated vendored Normal file
View File

@ -0,0 +1,175 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
### [2.0.10](https://www.github.com/conventional-changelog/conventional-changelog/compare/v2.0.9...v2.0.10) (2021-01-27)
### Bug Fixes
* align lodash dependency across packages ([#737](https://www.github.com/conventional-changelog/conventional-changelog/issues/737)) ([d9feeb6](https://www.github.com/conventional-changelog/conventional-changelog/commit/d9feeb605de28c00ef55b5c8e229efd1289dd6e8))
* revert normalize git show signature option to false ([c4d9042](https://www.github.com/conventional-changelog/conventional-changelog/commit/c4d9042ae83aa2c823dca181dd72e5a8b3163c1e))
### [2.0.9](https://www.github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@2.0.8...v2.0.9) (2020-12-29)
### Bug Fixes
* normalize git show signature option to false ([#671](https://www.github.com/conventional-changelog/conventional-changelog/issues/671)) ([a0b348c](https://www.github.com/conventional-changelog/conventional-changelog/commit/a0b348c7a74ba49bb07053ed1d25c2053a7c3b1a)), closes [conventional-changelog/commitlint#2118](https://www.github.com/conventional-changelog/commitlint/issues/2118)
## [2.0.8](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@2.0.7...git-raw-commits@2.0.8) (2020-11-05)
### Bug Fixes
* **deps:** update dependency through2 to v4 ([#657](https://github.com/conventional-changelog/conventional-changelog/issues/657)) ([7ae618c](https://github.com/conventional-changelog/conventional-changelog/commit/7ae618c81491841e5b1d796d3933aac0c54bc312))
## [2.0.7](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@2.0.3...git-raw-commits@2.0.7) (2020-05-08)
### Bug Fixes
* **deps:** update yargs-parser to move off a flagged-vulnerable version. ([#635](https://github.com/conventional-changelog/conventional-changelog/issues/635)) ([aafc0f0](https://github.com/conventional-changelog/conventional-changelog/commit/aafc0f00412c3e4b23b8418300e5a570a48fe24d))
## [2.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@2.0.2...git-raw-commits@2.0.3) (2019-11-14)
**Note:** Version bump only for package git-raw-commits
## [2.0.2](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@2.0.1...git-raw-commits@2.0.2) (2019-04-10)
### Bug Fixes
* **deps:** update dependency through2 to v3 ([#392](https://github.com/conventional-changelog/conventional-changelog/issues/392)) ([26fe91f](https://github.com/conventional-changelog/conventional-changelog/commit/26fe91f))
## [2.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@2.0.0...git-raw-commits@2.0.1) (2018-11-01)
### Bug Fixes
* Upgrade to Lerna 3, fix Node.js v11 error ([#385](https://github.com/conventional-changelog/conventional-changelog/issues/385)) ([cdef282](https://github.com/conventional-changelog/conventional-changelog/commit/cdef282))
<a name="2.0.0"></a>
# [2.0.0](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@1.3.6...git-raw-commits@2.0.0) (2018-05-29)
### Chores
* **package:** set Node requirement to oldest supported LTS ([#329](https://github.com/conventional-changelog/conventional-changelog/issues/329)) ([cae2fe0](https://github.com/conventional-changelog/conventional-changelog/commit/cae2fe0))
### BREAKING CHANGES
* **package:** Set the package's minimum required Node version to be the oldest LTS
currently supported by the Node Release working group. At this time,
that is Node 6 (which is in its Maintenance LTS phase).
<a name="1.3.6"></a>
## [1.3.6](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@1.3.5...git-raw-commits@1.3.6) (2018-03-27)
**Note:** Version bump only for package git-raw-commits
<a name="1.3.5"></a>
## [1.3.5](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@1.3.4...git-raw-commits@1.3.5) (2018-03-22)
**Note:** Version bump only for package git-raw-commits
<a name="1.3.4"></a>
## [1.3.4](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@1.3.3...git-raw-commits@1.3.4) (2018-02-24)
**Note:** Version bump only for package git-raw-commits
<a name="1.3.3"></a>
## [1.3.3](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@1.3.2...git-raw-commits@1.3.3) (2018-02-20)
**Note:** Version bump only for package git-raw-commits
<a name="1.3.2"></a>
## [1.3.2](https://github.com/conventional-changelog/git-raw-commits/compare/git-raw-commits@1.3.1...git-raw-commits@1.3.2) (2018-02-13)
**Note:** Version bump only for package git-raw-commits
<a name="1.3.1"></a>
## [1.3.1](https://github.com/conventional-changelog/git-raw-commits/compare/git-raw-commits@1.3.0...git-raw-commits@1.3.1) (2018-02-13)
**Note:** Version bump only for package git-raw-commits
<a name="1.3.0"></a>
# [1.3.0](https://github.com/conventional-changelog/git-raw-commits/compare/git-raw-commits@1.2.0...git-raw-commits@1.3.0) (2017-11-13)
### Features
* **git-raw-commits:** add execOpts.cwd ([2631213](https://github.com/conventional-changelog/git-raw-commits/commit/2631213))
<a name="1.2.0"></a>
# [1.2.0](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@1.1.2...v1.2.0) (2017-03-10)
### Features
* allow raw commits to be filtered by path ([#172](https://github.com/conventional-changelog/conventional-changelog/issues/172)) ([ec0a25d](https://github.com/conventional-changelog/conventional-changelog/commit/ec0a25d))
* migrate repo to lerna mono-repo ([793e823](https://github.com/conventional-changelog/conventional-changelog/commit/793e823))
<a name="1.1.2"></a>
## [1.1.2](https://github.com/conventional-changelog/git-raw-commits/compare/v1.1.1...v1.1.2) (2016-06-27)
### Bug Fixes
* **windows:** use execFile for executing git ([9ae06df](https://github.com/conventional-changelog/git-raw-commits/commit/9ae06df)), closes [#11](https://github.com/conventional-changelog/git-raw-commits/issues/11)
<a name="1.1.1"></a>
## [1.1.1](https://github.com/conventional-changelog/git-raw-commits/compare/v1.1.0...v1.1.1) (2016-06-26)
### Bug Fixes
* **windows:** escape command percent signs ([005b559](https://github.com/conventional-changelog/git-raw-commits/commit/005b559)), closes [#10](https://github.com/conventional-changelog/git-raw-commits/issues/10)

21
node_modules/git-raw-commits/LICENSE.md generated vendored Normal file
View File

@ -0,0 +1,21 @@
### MIT License
Copyright © [conventional-changelog team](https://github.com/conventional-changelog)
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.

101
node_modules/git-raw-commits/README.md generated vendored Normal file
View File

@ -0,0 +1,101 @@
# [![NPM version][npm-image]][npm-url] [![Build Status: Linux][travis-image]][travis-url] [![Build Status: Windows][appveyor-image]][appveyor-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url]
> Get raw git commits out of your repository using git-log(1)
## Install
```sh
$ npm install --save git-raw-commits
```
## Usage
```js
var gitRawCommits = require('git-raw-commits');
gitRawCommits(options)
.pipe(...);
```
## API
### gitRawCommits(gitOpts, [execOpts])
Returns a readable stream. Stream is split to break on each commit.
#### gitOpts
Type: `object`
Please check the available options at http://git-scm.com/docs/git-log.
**NOTE:** Single dash arguments are not supported because of https://github.com/sindresorhus/dargs/blob/master/index.js#L5.
*NOTE*: for `<revision range>` we can also use `<from>..<to>` pattern, and this module has the following extra options for shortcut of this pattern:
##### gitOpts.from
Type: `string` Default: `''`
##### gitOpts.to
Type: `string` Default: `'HEAD'`
This module also have the following additions:
##### gitOpts.format
Type: `string` Default: `'%B'`
Please check http://git-scm.com/docs/git-log for format options.
##### gitOpts.debug
Type: `function`
A function to get debug information.
##### gitOpts.path
Type: `string`
Filter commits to the path provided.
##### execOpts
Options to pass to `git` `childProcess`
Type: `object`
##### execOpts.cwd
Type: `string`
Current working directory to execute git in
## CLI
```sh
$ npm install --global git-raw-commits
$ git-raw-commits --help # for more details
```
## License
MIT © [Steve Mao](https://github.com/stevemao)
[npm-image]: https://badge.fury.io/js/git-raw-commits.svg
[npm-url]: https://npmjs.org/package/git-raw-commits
[travis-image]: https://travis-ci.org/conventional-changelog/git-raw-commits.svg?branch=master
[travis-url]: https://travis-ci.org/conventional-changelog/git-raw-commits
[appveyor-image]: https://ci.appveyor.com/api/projects/status/4qm3bjmg41k3dsbv/branch/master?svg=true
[appveyor-url]: https://ci.appveyor.com/project/stevemao/git-raw-commits/branch/master
[daviddm-image]: https://david-dm.org/conventional-changelog/git-raw-commits.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/conventional-changelog/git-raw-commits
[coveralls-image]: https://coveralls.io/repos/conventional-changelog/git-raw-commits/badge.svg
[coveralls-url]: https://coveralls.io/r/conventional-changelog/git-raw-commits

19
node_modules/git-raw-commits/cli.js generated vendored Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env node
'use strict'
const meow = require('meow')
const gitRawCommits = require('./')
const cli = meow(`
Usage
git-raw-commits [<git-log(1)-options>]
Example
git-raw-commits --from HEAD~2 --to HEAD^`
)
gitRawCommits(cli.flags)
.on('error', function (err) {
process.stderr.write(err)
process.exit(1)
})
.pipe(process.stdout)

90
node_modules/git-raw-commits/index.js generated vendored Normal file
View File

@ -0,0 +1,90 @@
'use strict'
const dargs = require('dargs')
const execFile = require('child_process').execFile
const split = require('split2')
const stream = require('stream')
const template = require('lodash/template')
const through = require('through2')
const DELIMITER = '------------------------ >8 ------------------------'
function normalizeExecOpts (execOpts) {
execOpts = execOpts || {}
execOpts.cwd = execOpts.cwd || process.cwd()
return execOpts
}
function normalizeGitOpts (gitOpts) {
gitOpts = gitOpts || {}
gitOpts.format = gitOpts.format || '%B'
gitOpts.from = gitOpts.from || ''
gitOpts.to = gitOpts.to || 'HEAD'
return gitOpts
}
function getGitArgs (gitOpts) {
const gitFormat = template('--format=<%= format %>%n' + DELIMITER)(gitOpts)
const gitFromTo = [gitOpts.from, gitOpts.to].filter(Boolean).join('..')
const gitArgs = ['log', gitFormat, gitFromTo]
// allow commits to focus on a single directory
// this is useful for monorepos.
if (gitOpts.path) {
gitArgs.push('--', gitOpts.path)
}
return gitArgs.concat(dargs(gitOpts, {
excludes: ['debug', 'from', 'to', 'format', 'path']
}))
}
function gitRawCommits (rawGitOpts, rawExecOpts) {
const readable = new stream.Readable()
readable._read = function () {}
const gitOpts = normalizeGitOpts(rawGitOpts)
const execOpts = normalizeExecOpts(rawExecOpts)
const args = getGitArgs(gitOpts)
if (gitOpts.debug) {
gitOpts.debug('Your git-log command is:\ngit ' + args.join(' '))
}
let isError = false
const child = execFile('git', args, {
cwd: execOpts.cwd,
maxBuffer: Infinity
})
child.stdout
.pipe(split(DELIMITER + '\n'))
.pipe(through(function (chunk, enc, cb) {
readable.push(chunk)
isError = false
cb()
}, function (cb) {
setImmediate(function () {
if (!isError) {
readable.push(null)
readable.emit('close')
}
cb()
})
}))
child.stderr
.pipe(through.obj(function (chunk) {
isError = true
readable.emit('error', new Error(chunk))
readable.emit('close')
}))
return readable
}
module.exports = gitRawCommits

48
node_modules/git-raw-commits/package.json generated vendored Normal file
View File

@ -0,0 +1,48 @@
{
"name": "git-raw-commits",
"version": "2.0.10",
"description": "Get raw git commits out of your repository using git-log(1)",
"bugs": {
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
},
"homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-raw-commits#readme",
"author": {
"name": "Steve Mao",
"email": "maochenyan@gmail.com",
"url": "https://github.com/stevemao"
},
"repository": {
"type": "git",
"url": "https://github.com/conventional-changelog/conventional-changelog.git"
},
"license": "MIT",
"engines": {
"node": ">=10"
},
"files": [
"index.js",
"cli.js"
],
"keywords": [
"git-raw-commits",
"raw",
"commit",
"commits",
"git",
"log",
"git-log"
],
"dependencies": {
"dargs": "^7.0.0",
"lodash": "^4.17.15",
"meow": "^8.0.0",
"split2": "^3.0.0",
"through2": "^4.0.0"
},
"scripts": {
"test-windows": "mocha --timeout 30000"
},
"bin": {
"git-raw-commits": "cli.js"
}
}