@commitlint/read 20.5.0 → 21.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/lib/get-edit-commit.d.ts.map +1 -1
- package/lib/get-edit-commit.js.map +1 -1
- package/lib/get-edit-file-path.d.ts.map +1 -1
- package/lib/get-edit-file-path.js.map +1 -1
- package/lib/read.d.ts.map +1 -1
- package/lib/read.js +11 -11
- package/lib/read.js.map +1 -1
- package/package.json +32 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-edit-commit.d.ts","sourceRoot":"","sources":["../src/get-edit-commit.ts"],"names":[],"mappings":"AAMA,wBAAsB,aAAa,
|
|
1
|
+
{"version":3,"file":"get-edit-commit.d.ts","sourceRoot":"","sources":["../src/get-edit-commit.ts"],"names":[],"mappings":"AAMA,wBAAsB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAW5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-edit-commit.js","sourceRoot":"","sources":["../src/get-edit-commit.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,qCAAqC;AACrC,MAAM,CAAC,KAAK,UAAU,aAAa,
|
|
1
|
+
{"version":3,"file":"get-edit-commit.js","sourceRoot":"","sources":["../src/get-edit-commit.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,qCAAqC;AACrC,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAY,EAAE,IAAuB;IACxE,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEhC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,SAAS,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAW,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEzD,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-edit-file-path.d.ts","sourceRoot":"","sources":["../src/get-edit-file-path.ts"],"names":[],"mappings":"AAKA,wBAAsB,eAAe,
|
|
1
|
+
{"version":3,"file":"get-edit-file-path.d.ts","sourceRoot":"","sources":["../src/get-edit-file-path.ts"],"names":[],"mappings":"AAKA,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-edit-file-path.js","sourceRoot":"","sources":["../src/get-edit-file-path.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B,kDAAkD;AAClD,MAAM,CAAC,KAAK,UAAU,eAAe,
|
|
1
|
+
{"version":3,"file":"get-edit-file-path.js","sourceRoot":"","sources":["../src/get-edit-file-path.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B,kDAAkD;AAClD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC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C,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAQA,UAAU,uBAAuB;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,wBAA8B,iBAAiB,CAC9C,QAAQ,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,EAAE,CAAC,CAuDnB"}
|
package/lib/read.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { parseArgs } from "node:util";
|
|
2
2
|
import { getHistoryCommits } from "./get-history-commits.js";
|
|
3
3
|
import { getEditCommit } from "./get-edit-commit.js";
|
|
4
4
|
import { x } from "tinyexec";
|
|
@@ -10,7 +10,9 @@ export default async function getCommitMessages(settings) {
|
|
|
10
10
|
return getEditCommit(cwd, edit);
|
|
11
11
|
}
|
|
12
12
|
if (last) {
|
|
13
|
-
const gitCommandResult = await x("git", ["log", "-1", "--pretty=format:%B"], {
|
|
13
|
+
const gitCommandResult = await x("git", ["log", "-1", "--pretty=format:%B"], {
|
|
14
|
+
nodeOptions: { cwd },
|
|
15
|
+
});
|
|
14
16
|
let output = gitCommandResult.stdout.trim();
|
|
15
17
|
// strip output of extra quotation marks ("")
|
|
16
18
|
if (output[0] == '"' && output[output.length - 1] == '"')
|
|
@@ -18,14 +20,7 @@ export default async function getCommitMessages(settings) {
|
|
|
18
20
|
return [output];
|
|
19
21
|
}
|
|
20
22
|
if (!from && fromLastTag) {
|
|
21
|
-
const output = await x("git", [
|
|
22
|
-
"describe",
|
|
23
|
-
"--abbrev=40",
|
|
24
|
-
"--always",
|
|
25
|
-
"--first-parent",
|
|
26
|
-
"--long",
|
|
27
|
-
"--tags",
|
|
28
|
-
], { nodeOptions: { cwd } });
|
|
23
|
+
const output = await x("git", ["describe", "--abbrev=40", "--always", "--first-parent", "--long", "--tags"], { nodeOptions: { cwd } });
|
|
29
24
|
const stdout = output.stdout.trim();
|
|
30
25
|
if (stdout.length === 40) {
|
|
31
26
|
// Hash only means no last tag. Use that as the from ref which
|
|
@@ -42,8 +37,13 @@ export default async function getCommitMessages(settings) {
|
|
|
42
37
|
}
|
|
43
38
|
let gitOptions = { from, to };
|
|
44
39
|
if (gitLogArgs) {
|
|
40
|
+
const { values, positionals } = parseArgs({
|
|
41
|
+
args: gitLogArgs.split(" "),
|
|
42
|
+
strict: false,
|
|
43
|
+
});
|
|
45
44
|
gitOptions = {
|
|
46
|
-
...
|
|
45
|
+
...values,
|
|
46
|
+
_: positionals,
|
|
47
47
|
from,
|
|
48
48
|
to,
|
|
49
49
|
};
|
package/lib/read.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAY7B,sBAAsB;AACtB,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAC9C,QAAiC;IAEjC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;IAClE,IAAI,IAAI,GAAG,QAAQ,CAAC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AI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;QAClC,CAAC;IACF,CAAC;IAED,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAC1C,IAAI,UAAU,EAAE,CAAC;QAChB,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;YACzC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC;YAC3B,MAAM,EAAE,KAAK;SACb,CAAC,CAAC;QACH,UAAU,GAAG;YACZ,GAAG,MAAM;YACT,CAAC,EAAE,WAAW;YACd,IAAI;YACJ,EAAE;SACF,CAAC;IACH,CAAC;IAED,OAAO,iBAAiB,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,52 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commitlint/read",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"version": "21.0.1",
|
|
4
|
+
"gitHead": "db8d7d6461d721fe2561ce4307e4069eaf6dcc8c",
|
|
5
5
|
"description": "Read commit messages from a specified range or last edit",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
6
|
+
"keywords": [
|
|
7
|
+
"commitlint",
|
|
8
|
+
"conventional-changelog",
|
|
9
|
+
"core",
|
|
10
|
+
"library"
|
|
10
11
|
],
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"
|
|
12
|
+
"homepage": "https://commitlint.js.org/",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/conventional-changelog/commitlint/issues"
|
|
14
15
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Mario Nebl",
|
|
19
|
+
"email": "hello@herebecode.com"
|
|
17
20
|
},
|
|
18
21
|
"repository": {
|
|
19
22
|
"type": "git",
|
|
20
23
|
"url": "https://github.com/conventional-changelog/commitlint.git",
|
|
21
24
|
"directory": "@commitlint/read"
|
|
22
25
|
},
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
},
|
|
26
|
-
"homepage": "https://commitlint.js.org/",
|
|
27
|
-
"keywords": [
|
|
28
|
-
"conventional-changelog",
|
|
29
|
-
"commitlint",
|
|
30
|
-
"library",
|
|
31
|
-
"core"
|
|
26
|
+
"files": [
|
|
27
|
+
"lib/"
|
|
32
28
|
],
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"@commitlint/test": "^20.4.3",
|
|
40
|
-
"@commitlint/utils": "^20.0.0",
|
|
41
|
-
"@types/git-raw-commits": "^5.0.0",
|
|
42
|
-
"@types/minimist": "^1.2.4"
|
|
29
|
+
"type": "module",
|
|
30
|
+
"main": "lib/read.js",
|
|
31
|
+
"types": "lib/read.d.ts",
|
|
32
|
+
"scripts": {
|
|
33
|
+
"deps": "dep-check",
|
|
34
|
+
"pkg": "pkg-check --skip-import"
|
|
43
35
|
},
|
|
44
36
|
"dependencies": {
|
|
45
|
-
"@commitlint/top-level": "^
|
|
46
|
-
"@commitlint/types": "^
|
|
37
|
+
"@commitlint/top-level": "^21.0.1",
|
|
38
|
+
"@commitlint/types": "^21.0.1",
|
|
47
39
|
"git-raw-commits": "^5.0.0",
|
|
48
|
-
"minimist": "^1.2.8",
|
|
49
40
|
"tinyexec": "^1.0.0"
|
|
50
41
|
},
|
|
51
|
-
"
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@commitlint/test": "^21.0.1",
|
|
44
|
+
"@commitlint/utils": "^21.0.1",
|
|
45
|
+
"@types/git-raw-commits": "^5.0.0"
|
|
46
|
+
},
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=22.12.0"
|
|
49
|
+
}
|
|
52
50
|
}
|