git-raw-commits 2.0.11 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/index.js +32 -23
- package/package.json +8 -10
- package/CHANGELOG.md +0 -182
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [![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][
|
|
1
|
+
# [![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][coverage-image]][coverage-url]
|
|
2
2
|
|
|
3
3
|
> Get raw git commits out of your repository using git-log(1)
|
|
4
4
|
|
|
@@ -97,5 +97,5 @@ MIT © [Steve Mao](https://github.com/stevemao)
|
|
|
97
97
|
[appveyor-url]: https://ci.appveyor.com/project/stevemao/git-raw-commits/branch/master
|
|
98
98
|
[daviddm-image]: https://david-dm.org/conventional-changelog/git-raw-commits.svg?theme=shields.io
|
|
99
99
|
[daviddm-url]: https://david-dm.org/conventional-changelog/git-raw-commits
|
|
100
|
-
[
|
|
101
|
-
[
|
|
100
|
+
[coverage-image]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master
|
|
101
|
+
[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master
|
package/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
const dargs = require('dargs')
|
|
4
4
|
const execFile = require('child_process').execFile
|
|
5
5
|
const split = require('split2')
|
|
6
|
-
const
|
|
7
|
-
const template = require('lodash/template')
|
|
8
|
-
const through = require('through2')
|
|
6
|
+
const { Readable, Transform } = require('stream')
|
|
9
7
|
|
|
10
8
|
const DELIMITER = '------------------------ >8 ------------------------'
|
|
11
9
|
|
|
@@ -24,7 +22,7 @@ function normalizeGitOpts (gitOpts) {
|
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
function getGitArgs (gitOpts) {
|
|
27
|
-
const gitFormat =
|
|
25
|
+
const gitFormat = `--format=${gitOpts.format || ''}%n${DELIMITER}`
|
|
28
26
|
const gitFromTo = [gitOpts.from, gitOpts.to].filter(Boolean).join('..')
|
|
29
27
|
|
|
30
28
|
const gitArgs = ['log', gitFormat, gitFromTo]
|
|
@@ -42,7 +40,7 @@ function getGitArgs (gitOpts) {
|
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
function gitRawCommits (rawGitOpts, rawExecOpts) {
|
|
45
|
-
const readable = new
|
|
43
|
+
const readable = new Readable()
|
|
46
44
|
readable._read = function () {}
|
|
47
45
|
|
|
48
46
|
const gitOpts = normalizeGitOpts(rawGitOpts)
|
|
@@ -62,28 +60,39 @@ function gitRawCommits (rawGitOpts, rawExecOpts) {
|
|
|
62
60
|
|
|
63
61
|
child.stdout
|
|
64
62
|
.pipe(split(DELIMITER + '\n'))
|
|
65
|
-
.pipe(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
.pipe(
|
|
64
|
+
new Transform({
|
|
65
|
+
transform (chunk, enc, cb) {
|
|
66
|
+
readable.push(chunk)
|
|
67
|
+
isError = false
|
|
68
|
+
|
|
69
|
+
cb()
|
|
70
|
+
},
|
|
71
|
+
flush (cb) {
|
|
72
|
+
setImmediate(function () {
|
|
73
|
+
if (!isError) {
|
|
74
|
+
readable.push(null)
|
|
75
|
+
readable.emit('close')
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
cb()
|
|
79
|
+
})
|
|
75
80
|
}
|
|
76
|
-
|
|
77
|
-
cb()
|
|
78
81
|
})
|
|
79
|
-
|
|
82
|
+
)
|
|
80
83
|
|
|
81
84
|
child.stderr
|
|
82
|
-
.pipe(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
.pipe(
|
|
86
|
+
new Transform({
|
|
87
|
+
objectMode: true,
|
|
88
|
+
highWaterMark: 16,
|
|
89
|
+
transform (chunk) {
|
|
90
|
+
isError = true
|
|
91
|
+
readable.emit('error', new Error(chunk))
|
|
92
|
+
readable.emit('close')
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
)
|
|
87
96
|
|
|
88
97
|
return readable
|
|
89
98
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-raw-commits",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Get raw git commits out of your repository using git-log(1)",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=14"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"index.js",
|
|
@@ -34,15 +34,13 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"dargs": "^7.0.0",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"split2": "^3.0.0",
|
|
40
|
-
"through2": "^4.0.0"
|
|
41
|
-
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"test-windows": "mocha --timeout 30000"
|
|
37
|
+
"meow": "^8.1.2",
|
|
38
|
+
"split2": "^3.2.2"
|
|
44
39
|
},
|
|
45
40
|
"bin": {
|
|
46
41
|
"git-raw-commits": "cli.js"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"test-windows": "mocha --timeout 30000"
|
|
47
45
|
}
|
|
48
|
-
}
|
|
46
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
### [2.0.11](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits-v2.0.10...git-raw-commits-v2.0.11) (2021-12-29)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* allow raw commits to be filtered by path and date range ([#893](https://github.com/conventional-changelog/conventional-changelog/issues/893)) ([b2245a7](https://github.com/conventional-changelog/conventional-changelog/commit/b2245a766c70d280380abbbe85c4894eee04fdd0))
|
|
12
|
-
|
|
13
|
-
### [2.0.10](https://www.github.com/conventional-changelog/conventional-changelog/compare/v2.0.9...v2.0.10) (2021-01-27)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Bug Fixes
|
|
17
|
-
|
|
18
|
-
* 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))
|
|
19
|
-
* revert normalize git show signature option to false ([c4d9042](https://www.github.com/conventional-changelog/conventional-changelog/commit/c4d9042ae83aa2c823dca181dd72e5a8b3163c1e))
|
|
20
|
-
|
|
21
|
-
### [2.0.9](https://www.github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@2.0.8...v2.0.9) (2020-12-29)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
### Bug Fixes
|
|
25
|
-
|
|
26
|
-
* 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)
|
|
27
|
-
|
|
28
|
-
## [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)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Bug Fixes
|
|
32
|
-
|
|
33
|
-
* **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))
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## [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)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Bug Fixes
|
|
43
|
-
|
|
44
|
-
* **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))
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## [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)
|
|
51
|
-
|
|
52
|
-
**Note:** Version bump only for package git-raw-commits
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## [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)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### Bug Fixes
|
|
62
|
-
|
|
63
|
-
* **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))
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## [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)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
### Bug Fixes
|
|
73
|
-
|
|
74
|
-
* 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))
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<a name="2.0.0"></a>
|
|
81
|
-
# [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)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
### Chores
|
|
85
|
-
|
|
86
|
-
* **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))
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
### BREAKING CHANGES
|
|
90
|
-
|
|
91
|
-
* **package:** Set the package's minimum required Node version to be the oldest LTS
|
|
92
|
-
currently supported by the Node Release working group. At this time,
|
|
93
|
-
that is Node 6 (which is in its Maintenance LTS phase).
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<a name="1.3.6"></a>
|
|
99
|
-
## [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)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
**Note:** Version bump only for package git-raw-commits
|
|
105
|
-
|
|
106
|
-
<a name="1.3.5"></a>
|
|
107
|
-
## [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)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
**Note:** Version bump only for package git-raw-commits
|
|
113
|
-
|
|
114
|
-
<a name="1.3.4"></a>
|
|
115
|
-
## [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)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
**Note:** Version bump only for package git-raw-commits
|
|
121
|
-
|
|
122
|
-
<a name="1.3.3"></a>
|
|
123
|
-
## [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)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
**Note:** Version bump only for package git-raw-commits
|
|
129
|
-
|
|
130
|
-
<a name="1.3.2"></a>
|
|
131
|
-
## [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)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
**Note:** Version bump only for package git-raw-commits
|
|
137
|
-
|
|
138
|
-
<a name="1.3.1"></a>
|
|
139
|
-
## [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)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
**Note:** Version bump only for package git-raw-commits
|
|
145
|
-
|
|
146
|
-
<a name="1.3.0"></a>
|
|
147
|
-
# [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)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
### Features
|
|
151
|
-
|
|
152
|
-
* **git-raw-commits:** add execOpts.cwd ([2631213](https://github.com/conventional-changelog/git-raw-commits/commit/2631213))
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
<a name="1.2.0"></a>
|
|
158
|
-
# [1.2.0](https://github.com/conventional-changelog/conventional-changelog/compare/git-raw-commits@1.1.2...v1.2.0) (2017-03-10)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
### Features
|
|
162
|
-
|
|
163
|
-
* 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))
|
|
164
|
-
* migrate repo to lerna mono-repo ([793e823](https://github.com/conventional-changelog/conventional-changelog/commit/793e823))
|
|
165
|
-
|
|
166
|
-
<a name="1.1.2"></a>
|
|
167
|
-
## [1.1.2](https://github.com/conventional-changelog/git-raw-commits/compare/v1.1.1...v1.1.2) (2016-06-27)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
### Bug Fixes
|
|
171
|
-
|
|
172
|
-
* **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)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
<a name="1.1.1"></a>
|
|
177
|
-
## [1.1.1](https://github.com/conventional-changelog/git-raw-commits/compare/v1.1.0...v1.1.1) (2016-06-26)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
### Bug Fixes
|
|
181
|
-
|
|
182
|
-
* **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)
|