@commitlint/read 9.1.2 → 12.0.1
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/CHANGELOG.md +54 -0
- package/README.md +2 -2
- package/lib/get-edit-commit.js +1 -0
- package/lib/get-edit-commit.js.map +1 -1
- package/lib/get-edit-file-path.js +2 -1
- package/lib/get-edit-file-path.js.map +1 -1
- package/lib/get-history-commits.js +1 -0
- package/lib/get-history-commits.js.map +1 -1
- package/lib/stream-to-promise.js +2 -1
- package/lib/stream-to-promise.js.map +1 -1
- package/package.json +11 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,60 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [12.0.1](https://github.com/conventional-changelog/commitlint/compare/v12.0.0...v12.0.1) (2021-02-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @commitlint/read
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [12.0.0](https://github.com/conventional-changelog/commitlint/compare/v11.0.0...v12.0.0) (2021-01-18)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @commitlint/read
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [11.0.0](https://github.com/conventional-changelog/commitlint/compare/v10.0.0...v11.0.0) (2020-09-05)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* update dependency @types/fs-extra to ^9.0.1 ([#2088](https://github.com/conventional-changelog/commitlint/issues/2088)) ([cb1028e](https://github.com/conventional-changelog/commitlint/commit/cb1028ef2700d86991c69a1e2ad391bc1bdc9d90))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [10.0.0](https://github.com/conventional-changelog/commitlint/compare/v9.1.2...v10.0.0) (2020-08-16)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* update dependency fs-extra to v9 ([#1018](https://github.com/conventional-changelog/commitlint/issues/1018)) ([2df49fa](https://github.com/conventional-changelog/commitlint/commit/2df49fac907993ae78199a1012e918b0e2ff5621))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
* refactor!: drop support for node 8 (#1999) ([751f39f](https://github.com/conventional-changelog/commitlint/commit/751f39f284ef232574a176c3c11b1982ee544166)), closes [#1999](https://github.com/conventional-changelog/commitlint/issues/1999)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### BREAKING CHANGES
|
|
45
|
+
|
|
46
|
+
* remove node 8 from circle-ci checks
|
|
47
|
+
|
|
48
|
+
also remove node 13 because we do not support experimental versions
|
|
49
|
+
|
|
50
|
+
* docs: update node v10 to latest LTS 10 version
|
|
51
|
+
|
|
52
|
+
Co-authored-by: Cedric van Putten <me@bycedric.com>
|
|
53
|
+
|
|
54
|
+
Co-authored-by: Cedric van Putten <me@bycedric.com>
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
6
60
|
## [9.1.2](https://github.com/conventional-changelog/commitlint/compare/v9.1.1...v9.1.2) (2020-07-13)
|
|
7
61
|
|
|
8
62
|
**Note:** Version bump only for package @commitlint/read
|
package/README.md
CHANGED
|
@@ -14,11 +14,11 @@ npm install --save @commitlint/read
|
|
|
14
14
|
const read = require('@commitlint/read');
|
|
15
15
|
|
|
16
16
|
// Read last edited commit message
|
|
17
|
-
read({edit: true}).then(messages => console.log(messages));
|
|
17
|
+
read({edit: true}).then((messages) => console.log(messages));
|
|
18
18
|
// => ['I did something\n\n']
|
|
19
19
|
|
|
20
20
|
// Read from the third to second commit message from HEAD
|
|
21
|
-
read({from: 'HEAD~2', to: 'HEAD~1'}).then(messages => console.log(messages));
|
|
21
|
+
read({from: 'HEAD~2', to: 'HEAD~1'}).then((messages) => console.log(messages));
|
|
22
22
|
// => ['Initial commit\n\n']
|
|
23
23
|
```
|
|
24
24
|
|
package/lib/get-edit-commit.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getEditCommit = void 0;
|
|
6
7
|
const top_level_1 = __importDefault(require("@commitlint/top-level"));
|
|
7
8
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
9
|
const get_edit_file_path_1 = require("./get-edit-file-path");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-edit-commit.js","sourceRoot":"","sources":["../src/get-edit-commit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-edit-commit.js","sourceRoot":"","sources":["../src/get-edit-commit.ts"],"names":[],"mappings":";;;;;;AAAA,sEAA6C;AAC7C,wDAA0B;AAC1B,6DAAqD;AAErD,qCAAqC;AAC9B,KAAK,UAAU,aAAa,CAClC,GAAY,EACZ,IAAuB;IAEvB,MAAM,GAAG,GAAG,MAAM,mBAAQ,CAAC,GAAG,CAAC,CAAC;IAEhC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAI,SAAS,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAC;KAC3D;IAED,MAAM,YAAY,GAAG,MAAM,oCAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAW,MAAM,kBAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEzD,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC;AAdD,sCAcC"}
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getEditFilePath = void 0;
|
|
6
7
|
const path_1 = __importDefault(require("path"));
|
|
7
8
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
9
|
// Get path to recently edited commit message file
|
|
@@ -16,7 +17,7 @@ async function getEditFilePath(top, edit) {
|
|
|
16
17
|
return path_1.default.join(top, '.git/COMMIT_EDITMSG');
|
|
17
18
|
}
|
|
18
19
|
const gitFile = await fs_extra_1.default.readFile(dotgitPath, {
|
|
19
|
-
encoding: 'utf-8'
|
|
20
|
+
encoding: 'utf-8',
|
|
20
21
|
});
|
|
21
22
|
const relativeGitPath = gitFile.replace('gitdir: ', '').replace('\n', '');
|
|
22
23
|
return path_1.default.resolve(top, relativeGitPath, 'COMMIT_EDITMSG');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-edit-file-path.js","sourceRoot":"","sources":["../src/get-edit-file-path.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-edit-file-path.js","sourceRoot":"","sources":["../src/get-edit-file-path.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,wDAA0B;AAE1B,kDAAkD;AAC3C,KAAK,UAAU,eAAe,CACpC,GAAW,EACX,IAAuB;IAEvB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC7B,OAAO,cAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;KAC/B;IAED,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAU,MAAM,kBAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEtD,IAAI,WAAW,CAAC,WAAW,EAAE,EAAE;QAC9B,OAAO,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;KAC7C;IAED,MAAM,OAAO,GAAW,MAAM,kBAAE,CAAC,QAAQ,CAAC,UAAU,EAAE;QACrD,QAAQ,EAAE,OAAO;KACjB,CAAC,CAAC;IACH,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC1E,OAAO,cAAI,CAAC,OAAO,CAAC,GAAG,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAC7D,CAAC;AApBD,0CAoBC"}
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getHistoryCommits = void 0;
|
|
6
7
|
const git_raw_commits_1 = __importDefault(require("git-raw-commits"));
|
|
7
8
|
const stream_to_promise_1 = require("./stream-to-promise");
|
|
8
9
|
// Get commit messages from history
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-history-commits.js","sourceRoot":"","sources":["../src/get-history-commits.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-history-commits.js","sourceRoot":"","sources":["../src/get-history-commits.ts"],"names":[],"mappings":";;;;;;AAAA,sEAA4C;AAC5C,2DAAoD;AAEpD,mCAAmC;AAC5B,KAAK,UAAU,iBAAiB,CACtC,OAAqC,EACrC,OAAuB,EAAE;IAEzB,OAAO,mCAAe,CAAC,yBAAa,CAAC,OAAO,EAAE,EAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAC,CAAC,CAAC,CAAC;AACjE,CAAC;AALD,8CAKC"}
|
package/lib/stream-to-promise.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.streamToPromise = void 0;
|
|
3
4
|
function streamToPromise(stream) {
|
|
4
5
|
const data = [];
|
|
5
6
|
return new Promise((resolve, reject) => stream
|
|
6
|
-
.on('data', chunk => data.push(chunk.toString('utf-8')))
|
|
7
|
+
.on('data', (chunk) => data.push(chunk.toString('utf-8')))
|
|
7
8
|
.on('error', reject)
|
|
8
9
|
.on('end', () => resolve(data)));
|
|
9
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-to-promise.js","sourceRoot":"","sources":["../src/stream-to-promise.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stream-to-promise.js","sourceRoot":"","sources":["../src/stream-to-promise.ts"],"names":[],"mappings":";;;AAEA,SAAgB,eAAe,CAAC,MAAgB;IAC/C,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CACtC,MAAM;SACJ,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;SACzD,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;SACnB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAChC,CAAC;AACH,CAAC;AARD,0CAQC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commitlint/read",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "Read commit messages from a specified range or last edit",
|
|
5
5
|
"main": "lib/read.js",
|
|
6
6
|
"types": "lib/read.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"pkg": "pkg-check --skip-import"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
|
-
"node": ">=
|
|
15
|
+
"node": ">=v10"
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
@@ -34,15 +34,17 @@
|
|
|
34
34
|
},
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@commitlint/test": "^
|
|
38
|
-
"@commitlint/utils": "^
|
|
39
|
-
"@types/fs-extra": "^
|
|
40
|
-
"@types/git-raw-commits": "^2.0.0"
|
|
37
|
+
"@commitlint/test": "^12.0.1",
|
|
38
|
+
"@commitlint/utils": "^12.0.1",
|
|
39
|
+
"@types/fs-extra": "^9.0.1",
|
|
40
|
+
"@types/git-raw-commits": "^2.0.0",
|
|
41
|
+
"execa": "^5.0.0"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@commitlint/top-level": "^
|
|
44
|
-
"
|
|
44
|
+
"@commitlint/top-level": "^12.0.1",
|
|
45
|
+
"@commitlint/types": "^12.0.1",
|
|
46
|
+
"fs-extra": "^9.0.0",
|
|
45
47
|
"git-raw-commits": "^2.0.0"
|
|
46
48
|
},
|
|
47
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "610d2911bea066c87700155de3bf5bbecf266a8d"
|
|
48
50
|
}
|