@soybeanjs/changelog 0.3.25 → 0.4.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/dist/index.d.ts +93 -91
- package/dist/index.js +495 -1642
- package/package.json +18 -18
- package/dist/index.cjs +0 -2543
- package/dist/index.d.cts +0 -139
- package/dist/prompt-BN7TR4PR.js +0 -756
package/dist/index.d.ts
CHANGED
|
@@ -1,109 +1,111 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
1
2
|
/** The commit author */
|
|
2
3
|
interface GitCommitAuthor {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/** The author name */
|
|
5
|
+
name: string;
|
|
6
|
+
/** The author email */
|
|
7
|
+
email: string;
|
|
7
8
|
}
|
|
8
9
|
/** The raw git commit */
|
|
9
10
|
interface RawGitCommit {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
/** The commit message */
|
|
12
|
+
message: string;
|
|
13
|
+
/** The commit body */
|
|
14
|
+
body: string;
|
|
15
|
+
/** The commit hash */
|
|
16
|
+
shortHash: string;
|
|
17
|
+
/** The commit author */
|
|
18
|
+
author: GitCommitAuthor;
|
|
18
19
|
}
|
|
19
20
|
/** The reference of the commit */
|
|
20
21
|
interface Reference {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
/** The reference type */
|
|
23
|
+
type: 'hash' | 'issue' | 'pull-request';
|
|
24
|
+
/** The reference value */
|
|
25
|
+
value: string;
|
|
25
26
|
}
|
|
26
27
|
/** The resolved github author */
|
|
27
28
|
interface ResolvedAuthor extends GitCommitAuthor {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
/** The git commit of the author */
|
|
30
|
+
commits: string[];
|
|
31
|
+
/** The github logged username of the author */
|
|
32
|
+
login: string;
|
|
32
33
|
}
|
|
33
34
|
/** Git commit config */
|
|
34
35
|
interface GitCommit extends RawGitCommit {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
/** The commit description */
|
|
37
|
+
description: string;
|
|
38
|
+
/** The commit scope type */
|
|
39
|
+
type: string;
|
|
40
|
+
/** The commit scope */
|
|
41
|
+
scope: string;
|
|
42
|
+
/** The commit references */
|
|
43
|
+
references: Reference[];
|
|
44
|
+
/** The commit authors */
|
|
45
|
+
authors: GitCommitAuthor[];
|
|
46
|
+
/** The resolved authors */
|
|
47
|
+
resolvedAuthors: ResolvedAuthor[];
|
|
48
|
+
/** The commit breaking changes */
|
|
49
|
+
isBreaking: boolean;
|
|
49
50
|
}
|
|
50
51
|
/** Github config */
|
|
51
52
|
interface GithubConfig {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
/**
|
|
54
|
+
* The github repository name
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* soybeanjs / changelog;
|
|
58
|
+
*/
|
|
59
|
+
repo: string;
|
|
60
|
+
/** The github token */
|
|
61
|
+
token: string;
|
|
61
62
|
}
|
|
62
63
|
interface ChangelogOption {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
64
|
+
/**
|
|
65
|
+
* The directory of the project
|
|
66
|
+
*
|
|
67
|
+
* @default process.cwd()
|
|
68
|
+
*/
|
|
69
|
+
cwd: string;
|
|
70
|
+
/** The commit scope types */
|
|
71
|
+
types: Record<string, string>;
|
|
72
|
+
/** Github config */
|
|
73
|
+
github: GithubConfig;
|
|
74
|
+
/** The commit hash or tag */
|
|
75
|
+
from: string;
|
|
76
|
+
/** The commit hash or tag */
|
|
77
|
+
to: string;
|
|
78
|
+
/** The whole commit tags */
|
|
79
|
+
tags: string[];
|
|
80
|
+
/** The commit tag and date map */
|
|
81
|
+
tagDateMap: Map<string, string>;
|
|
82
|
+
/** Whether to capitalize the first letter of the commit type */
|
|
83
|
+
capitalize: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Use emojis in section titles
|
|
86
|
+
*
|
|
87
|
+
* @default true
|
|
88
|
+
*/
|
|
89
|
+
emoji: boolean;
|
|
90
|
+
/** The section titles */
|
|
91
|
+
titles: {
|
|
92
|
+
/** The title of breaking changes section */
|
|
93
|
+
breakingChanges: string;
|
|
94
|
+
};
|
|
95
|
+
/** The output file path of the changelog */
|
|
96
|
+
output: string;
|
|
97
|
+
/**
|
|
98
|
+
* Whether to regenerate the changelog if it already exists
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* the changelog already exists the content of v0.0.1, but you want to regenerate it
|
|
102
|
+
*/
|
|
103
|
+
regenerate: boolean;
|
|
104
|
+
/** Mark the release as prerelease */
|
|
105
|
+
prerelease?: boolean;
|
|
105
106
|
}
|
|
106
|
-
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/index.d.ts
|
|
107
109
|
/**
|
|
108
110
|
* Get the changelog markdown by two git tags
|
|
109
111
|
*
|
|
@@ -111,9 +113,9 @@ interface ChangelogOption {
|
|
|
111
113
|
* @param showTitle Whither show the title
|
|
112
114
|
*/
|
|
113
115
|
declare function getChangelogMarkdown(options?: Partial<ChangelogOption>, showTitle?: boolean): Promise<{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
markdown: string;
|
|
117
|
+
commits: GitCommit[];
|
|
118
|
+
options: ChangelogOption;
|
|
117
119
|
}>;
|
|
118
120
|
/**
|
|
119
121
|
* Get the changelog markdown by the total git tags
|
|
@@ -135,5 +137,5 @@ declare function generateChangelog(options?: Partial<ChangelogOption>): Promise<
|
|
|
135
137
|
* @param showProgress Whither show the progress bar
|
|
136
138
|
*/
|
|
137
139
|
declare function generateTotalChangelog(options?: Partial<ChangelogOption>, showProgress?: boolean): Promise<void>;
|
|
138
|
-
|
|
139
|
-
export { type ChangelogOption, generateChangelog, generateTotalChangelog, getChangelogMarkdown, getTotalChangelogMarkdown };
|
|
140
|
+
//#endregion
|
|
141
|
+
export { type ChangelogOption, generateChangelog, generateTotalChangelog, getChangelogMarkdown, getTotalChangelogMarkdown };
|