@modern-js/plugin-changeset 2.40.0 → 2.42.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/cjs/commands/releaseNote.js +10 -10
- package/dist/esm/commands/releaseNote.js +10 -10
- package/dist/types/commands/bump.d.ts +5 -5
- package/dist/types/commands/change.d.ts +3 -3
- package/dist/types/commands/index.d.ts +1 -1
- package/dist/types/commands/pre.d.ts +1 -1
- package/dist/types/commands/release.d.ts +6 -6
- package/dist/types/commands/releaseNote.d.ts +32 -32
- package/dist/types/commands/status.d.ts +4 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/locale/en.d.ts +37 -37
- package/dist/types/locale/index.d.ts +73 -73
- package/dist/types/locale/zh.d.ts +37 -37
- package/dist/types/utils/changeset.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +8 -8
|
@@ -70,18 +70,18 @@ const CommitTypeZhTitle = {
|
|
|
70
70
|
};
|
|
71
71
|
function getCommitType(message) {
|
|
72
72
|
if (message.startsWith("perf")) {
|
|
73
|
-
return
|
|
73
|
+
return "performance";
|
|
74
74
|
}
|
|
75
75
|
if (message.startsWith("feat")) {
|
|
76
|
-
return
|
|
76
|
+
return "features";
|
|
77
77
|
}
|
|
78
78
|
if (message.startsWith("fix") || message.startsWith("hotfix")) {
|
|
79
|
-
return
|
|
79
|
+
return "bugFix";
|
|
80
80
|
}
|
|
81
81
|
if (message.startsWith("docs")) {
|
|
82
|
-
return
|
|
82
|
+
return "doc";
|
|
83
83
|
}
|
|
84
|
-
return
|
|
84
|
+
return "other";
|
|
85
85
|
}
|
|
86
86
|
const AuthorMap = /* @__PURE__ */ new Map();
|
|
87
87
|
async function getReleaseInfo(commit, commitObj, repo, authToken) {
|
|
@@ -155,23 +155,23 @@ async function genReleaseNote(options) {
|
|
|
155
155
|
return "";
|
|
156
156
|
}
|
|
157
157
|
const releaseNote = {
|
|
158
|
-
[
|
|
158
|
+
["performance"]: {
|
|
159
159
|
en: [],
|
|
160
160
|
zh: []
|
|
161
161
|
},
|
|
162
|
-
[
|
|
162
|
+
["features"]: {
|
|
163
163
|
en: [],
|
|
164
164
|
zh: []
|
|
165
165
|
},
|
|
166
|
-
[
|
|
166
|
+
["bugFix"]: {
|
|
167
167
|
en: [],
|
|
168
168
|
zh: []
|
|
169
169
|
},
|
|
170
|
-
[
|
|
170
|
+
["doc"]: {
|
|
171
171
|
en: [],
|
|
172
172
|
zh: []
|
|
173
173
|
},
|
|
174
|
-
[
|
|
174
|
+
["other"]: {
|
|
175
175
|
en: [],
|
|
176
176
|
zh: []
|
|
177
177
|
}
|
|
@@ -29,18 +29,18 @@ const CommitTypeZhTitle = {
|
|
|
29
29
|
};
|
|
30
30
|
function getCommitType(message) {
|
|
31
31
|
if (message.startsWith("perf")) {
|
|
32
|
-
return
|
|
32
|
+
return "performance";
|
|
33
33
|
}
|
|
34
34
|
if (message.startsWith("feat")) {
|
|
35
|
-
return
|
|
35
|
+
return "features";
|
|
36
36
|
}
|
|
37
37
|
if (message.startsWith("fix") || message.startsWith("hotfix")) {
|
|
38
|
-
return
|
|
38
|
+
return "bugFix";
|
|
39
39
|
}
|
|
40
40
|
if (message.startsWith("docs")) {
|
|
41
|
-
return
|
|
41
|
+
return "doc";
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return "other";
|
|
44
44
|
}
|
|
45
45
|
const AuthorMap = /* @__PURE__ */ new Map();
|
|
46
46
|
async function getReleaseInfo(commit, commitObj, repo, authToken) {
|
|
@@ -114,23 +114,23 @@ async function genReleaseNote(options) {
|
|
|
114
114
|
return "";
|
|
115
115
|
}
|
|
116
116
|
const releaseNote = {
|
|
117
|
-
[
|
|
117
|
+
["performance"]: {
|
|
118
118
|
en: [],
|
|
119
119
|
zh: []
|
|
120
120
|
},
|
|
121
|
-
[
|
|
121
|
+
["features"]: {
|
|
122
122
|
en: [],
|
|
123
123
|
zh: []
|
|
124
124
|
},
|
|
125
|
-
[
|
|
125
|
+
["bugFix"]: {
|
|
126
126
|
en: [],
|
|
127
127
|
zh: []
|
|
128
128
|
},
|
|
129
|
-
[
|
|
129
|
+
["doc"]: {
|
|
130
130
|
en: [],
|
|
131
131
|
zh: []
|
|
132
132
|
},
|
|
133
|
-
[
|
|
133
|
+
["other"]: {
|
|
134
134
|
en: [],
|
|
135
135
|
zh: []
|
|
136
136
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
interface BumpOptions {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
snapshot: boolean | string;
|
|
3
|
+
canary: boolean;
|
|
4
|
+
preid: string;
|
|
5
|
+
ignore: string[];
|
|
6
6
|
}
|
|
7
7
|
export declare function bump(options: BumpOptions): Promise<void>;
|
|
8
|
-
export {};
|
|
8
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function pre(type: 'enter' | 'exit', tag?: string): Promise<void>;
|
|
1
|
+
export declare function pre(type: 'enter' | 'exit', tag?: string): Promise<void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
interface ReleaseOptions {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
tag: string;
|
|
3
|
+
ignoreScripts: boolean;
|
|
4
|
+
gitChecks: boolean;
|
|
5
|
+
otp: string;
|
|
6
|
+
provenance: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare function release(options: ReleaseOptions): Promise<void>;
|
|
9
|
-
export {};
|
|
9
|
+
export {};
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
export declare enum CommitType {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
Performance = "performance",
|
|
3
|
+
Features = "features",
|
|
4
|
+
BugFix = "bugFix",
|
|
5
|
+
Doc = "doc",
|
|
6
|
+
Other = "other"
|
|
7
7
|
}
|
|
8
8
|
export interface Commit {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
id: string;
|
|
10
|
+
type: CommitType;
|
|
11
|
+
repository?: string;
|
|
12
|
+
pullRequestId?: string;
|
|
13
|
+
author?: string;
|
|
14
|
+
message: string;
|
|
15
|
+
summary: string;
|
|
16
|
+
summary_zh: string;
|
|
17
|
+
[key: string]: string | undefined;
|
|
18
18
|
}
|
|
19
19
|
export interface Changes {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
en: Commit[];
|
|
21
|
+
zh: Commit[];
|
|
22
22
|
}
|
|
23
23
|
export type ReleaseNote = Record<CommitType, Changes>;
|
|
24
24
|
interface ReleaseNoteOptions {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
repo?: string;
|
|
26
|
+
custom?: string;
|
|
27
|
+
authToken?: string;
|
|
28
28
|
}
|
|
29
29
|
export type CustomReleaseNoteFunction = {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
getReleaseInfo?: (commit: string, commitObj: Commit) => Commit | Promise<Commit>;
|
|
31
|
+
getReleaseNoteLine?: (commit: Commit, lang?: 'en' | 'zh') => string | Promise<string>;
|
|
32
32
|
} | undefined;
|
|
33
33
|
export declare const ChangesTitle = "What's Changed";
|
|
34
34
|
export declare const ChangesZhTitle = "\u66F4\u65B0\u5185\u5BB9";
|
|
35
35
|
export declare const CommitTypeTitle: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
performance: string;
|
|
37
|
+
features: string;
|
|
38
|
+
bugFix: string;
|
|
39
|
+
doc: string;
|
|
40
|
+
other: string;
|
|
41
41
|
};
|
|
42
42
|
export declare const CommitTypeZhTitle: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
performance: string;
|
|
44
|
+
features: string;
|
|
45
|
+
bugFix: string;
|
|
46
|
+
doc: string;
|
|
47
|
+
other: string;
|
|
48
48
|
};
|
|
49
49
|
export declare function getCommitType(message: string): CommitType;
|
|
50
50
|
export declare function getReleaseInfo(commit: string, commitObj: Commit, repo?: string, authToken?: string): Promise<Commit>;
|
|
51
51
|
export declare function getReleaseNoteLine(commit: Commit, customReleaseNoteFunction?: CustomReleaseNoteFunction, lang?: 'en' | 'zh'): string | Promise<string>;
|
|
52
52
|
export declare function genReleaseNote(options: ReleaseNoteOptions): Promise<string>;
|
|
53
|
-
export {};
|
|
53
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
export declare const EN_LOCALE: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
command: {
|
|
3
|
+
change: {
|
|
4
|
+
describe: string;
|
|
5
|
+
empty: string;
|
|
6
|
+
open: string;
|
|
7
|
+
no_packages: string;
|
|
8
|
+
};
|
|
9
|
+
bump: {
|
|
10
|
+
describe: string;
|
|
11
|
+
canary: string;
|
|
12
|
+
preid: string;
|
|
13
|
+
snapshot: string;
|
|
14
|
+
ignore: string;
|
|
15
|
+
};
|
|
16
|
+
pre: {
|
|
17
|
+
describe: string;
|
|
18
|
+
};
|
|
19
|
+
release: {
|
|
20
|
+
describe: string;
|
|
21
|
+
tag: string;
|
|
22
|
+
otp: string;
|
|
23
|
+
ignore_scripts: string;
|
|
24
|
+
no_git_checks: string;
|
|
25
|
+
provenance: string;
|
|
26
|
+
};
|
|
27
|
+
status: {
|
|
28
|
+
describe: string;
|
|
29
|
+
verbose: string;
|
|
30
|
+
output: string;
|
|
31
|
+
since: string;
|
|
32
|
+
};
|
|
33
|
+
gen_release_note: {
|
|
34
|
+
describe: string;
|
|
35
|
+
repo: string;
|
|
36
|
+
custom: string;
|
|
37
|
+
};
|
|
8
38
|
};
|
|
9
|
-
|
|
10
|
-
describe: string;
|
|
11
|
-
canary: string;
|
|
12
|
-
preid: string;
|
|
13
|
-
snapshot: string;
|
|
14
|
-
ignore: string;
|
|
15
|
-
};
|
|
16
|
-
pre: {
|
|
17
|
-
describe: string;
|
|
18
|
-
};
|
|
19
|
-
release: {
|
|
20
|
-
describe: string;
|
|
21
|
-
tag: string;
|
|
22
|
-
otp: string;
|
|
23
|
-
ignore_scripts: string;
|
|
24
|
-
no_git_checks: string;
|
|
25
|
-
provenance: string;
|
|
26
|
-
};
|
|
27
|
-
status: {
|
|
28
|
-
describe: string;
|
|
29
|
-
verbose: string;
|
|
30
|
-
output: string;
|
|
31
|
-
since: string;
|
|
32
|
-
};
|
|
33
|
-
gen_release_note: {
|
|
34
|
-
describe: string;
|
|
35
|
-
repo: string;
|
|
36
|
-
custom: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
};
|
|
39
|
+
};
|
|
@@ -1,80 +1,80 @@
|
|
|
1
1
|
import { I18n } from '@modern-js/plugin-i18n';
|
|
2
2
|
declare const i18n: I18n;
|
|
3
3
|
declare const localeKeys: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
command: {
|
|
5
|
+
change: {
|
|
6
|
+
describe: string;
|
|
7
|
+
empty: string;
|
|
8
|
+
open: string;
|
|
9
|
+
no_packages: string;
|
|
10
|
+
};
|
|
11
|
+
bump: {
|
|
12
|
+
describe: string;
|
|
13
|
+
canary: string;
|
|
14
|
+
preid: string;
|
|
15
|
+
snapshot: string;
|
|
16
|
+
ignore: string;
|
|
17
|
+
};
|
|
18
|
+
pre: {
|
|
19
|
+
describe: string;
|
|
20
|
+
};
|
|
21
|
+
release: {
|
|
22
|
+
describe: string;
|
|
23
|
+
tag: string;
|
|
24
|
+
otp: string;
|
|
25
|
+
ignore_scripts: string;
|
|
26
|
+
no_git_checks: string;
|
|
27
|
+
provenance: string;
|
|
28
|
+
};
|
|
29
|
+
status: {
|
|
30
|
+
describe: string;
|
|
31
|
+
verbose: string;
|
|
32
|
+
output: string;
|
|
33
|
+
since: string;
|
|
34
|
+
};
|
|
35
|
+
gen_release_note: {
|
|
36
|
+
describe: string;
|
|
37
|
+
repo: string;
|
|
38
|
+
custom: string;
|
|
39
|
+
};
|
|
10
40
|
};
|
|
11
|
-
bump: {
|
|
12
|
-
describe: string;
|
|
13
|
-
canary: string;
|
|
14
|
-
preid: string;
|
|
15
|
-
snapshot: string;
|
|
16
|
-
ignore: string;
|
|
17
|
-
};
|
|
18
|
-
pre: {
|
|
19
|
-
describe: string;
|
|
20
|
-
};
|
|
21
|
-
release: {
|
|
22
|
-
describe: string;
|
|
23
|
-
tag: string;
|
|
24
|
-
otp: string;
|
|
25
|
-
ignore_scripts: string;
|
|
26
|
-
no_git_checks: string;
|
|
27
|
-
provenance: string;
|
|
28
|
-
};
|
|
29
|
-
status: {
|
|
30
|
-
describe: string;
|
|
31
|
-
verbose: string;
|
|
32
|
-
output: string;
|
|
33
|
-
since: string;
|
|
34
|
-
};
|
|
35
|
-
gen_release_note: {
|
|
36
|
-
describe: string;
|
|
37
|
-
repo: string;
|
|
38
|
-
custom: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
41
|
} | {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
42
|
+
command: {
|
|
43
|
+
change: {
|
|
44
|
+
describe: string;
|
|
45
|
+
empty: string;
|
|
46
|
+
open: string;
|
|
47
|
+
no_packages: string;
|
|
48
|
+
};
|
|
49
|
+
bump: {
|
|
50
|
+
describe: string;
|
|
51
|
+
canary: string;
|
|
52
|
+
preid: string;
|
|
53
|
+
snapshot: string;
|
|
54
|
+
ignore: string;
|
|
55
|
+
};
|
|
56
|
+
pre: {
|
|
57
|
+
describe: string;
|
|
58
|
+
};
|
|
59
|
+
release: {
|
|
60
|
+
describe: string;
|
|
61
|
+
tag: string;
|
|
62
|
+
otp: string;
|
|
63
|
+
ignore_scripts: string;
|
|
64
|
+
no_git_checks: string;
|
|
65
|
+
provenance: string;
|
|
66
|
+
};
|
|
67
|
+
status: {
|
|
68
|
+
describe: string;
|
|
69
|
+
verbose: string;
|
|
70
|
+
output: string;
|
|
71
|
+
since: string;
|
|
72
|
+
};
|
|
73
|
+
gen_release_note: {
|
|
74
|
+
describe: string;
|
|
75
|
+
repo: string;
|
|
76
|
+
custom: string;
|
|
77
|
+
};
|
|
77
78
|
};
|
|
78
|
-
};
|
|
79
79
|
};
|
|
80
|
-
export { i18n, localeKeys };
|
|
80
|
+
export { i18n, localeKeys };
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
export declare const ZH_LOCALE: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
command: {
|
|
3
|
+
change: {
|
|
4
|
+
describe: string;
|
|
5
|
+
empty: string;
|
|
6
|
+
open: string;
|
|
7
|
+
no_packages: string;
|
|
8
|
+
};
|
|
9
|
+
bump: {
|
|
10
|
+
describe: string;
|
|
11
|
+
canary: string;
|
|
12
|
+
preid: string;
|
|
13
|
+
snapshot: string;
|
|
14
|
+
ignore: string;
|
|
15
|
+
};
|
|
16
|
+
pre: {
|
|
17
|
+
describe: string;
|
|
18
|
+
};
|
|
19
|
+
release: {
|
|
20
|
+
describe: string;
|
|
21
|
+
tag: string;
|
|
22
|
+
otp: string;
|
|
23
|
+
ignore_scripts: string;
|
|
24
|
+
no_git_checks: string;
|
|
25
|
+
provenance: string;
|
|
26
|
+
};
|
|
27
|
+
status: {
|
|
28
|
+
describe: string;
|
|
29
|
+
verbose: string;
|
|
30
|
+
output: string;
|
|
31
|
+
since: string;
|
|
32
|
+
};
|
|
33
|
+
gen_release_note: {
|
|
34
|
+
describe: string;
|
|
35
|
+
repo: string;
|
|
36
|
+
custom: string;
|
|
37
|
+
};
|
|
8
38
|
};
|
|
9
|
-
|
|
10
|
-
describe: string;
|
|
11
|
-
canary: string;
|
|
12
|
-
preid: string;
|
|
13
|
-
snapshot: string;
|
|
14
|
-
ignore: string;
|
|
15
|
-
};
|
|
16
|
-
pre: {
|
|
17
|
-
describe: string;
|
|
18
|
-
};
|
|
19
|
-
release: {
|
|
20
|
-
describe: string;
|
|
21
|
-
tag: string;
|
|
22
|
-
otp: string;
|
|
23
|
-
ignore_scripts: string;
|
|
24
|
-
no_git_checks: string;
|
|
25
|
-
provenance: string;
|
|
26
|
-
};
|
|
27
|
-
status: {
|
|
28
|
-
describe: string;
|
|
29
|
-
verbose: string;
|
|
30
|
-
output: string;
|
|
31
|
-
since: string;
|
|
32
|
-
};
|
|
33
|
-
gen_release_note: {
|
|
34
|
-
describe: string;
|
|
35
|
-
repo: string;
|
|
36
|
-
custom: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
};
|
|
39
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { execa } from '@modern-js/utils';
|
|
2
2
|
export declare const CHANGESET_PATH: string;
|
|
3
|
-
export declare function execaWithStreamLog(command: string, args: string[]): execa.ExecaChildProcess<string>;
|
|
3
|
+
export declare function execaWithStreamLog(command: string, args: string[]): execa.ExecaChildProcess<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './changeset';
|
|
1
|
+
export * from './changeset';
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.42.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
"@changesets/git": "^2.0.0",
|
|
51
51
|
"@changesets/read": "^0.5.9",
|
|
52
52
|
"resolve-from": "^5.0.0",
|
|
53
|
-
"axios": "^1.
|
|
54
|
-
"@swc/helpers": "0.5.
|
|
55
|
-
"@modern-js/plugin-i18n": "2.
|
|
56
|
-
"@modern-js/utils": "2.
|
|
53
|
+
"axios": "^1.6.0",
|
|
54
|
+
"@swc/helpers": "0.5.3",
|
|
55
|
+
"@modern-js/plugin-i18n": "2.42.0",
|
|
56
|
+
"@modern-js/utils": "2.42.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/jest": "^29",
|
|
60
60
|
"@types/node": "^14",
|
|
61
61
|
"typescript": "^5",
|
|
62
62
|
"jest": "^29",
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@scripts/jest-config": "2.
|
|
63
|
+
"@scripts/build": "2.42.0",
|
|
64
|
+
"@modern-js/core": "2.42.0",
|
|
65
|
+
"@scripts/jest-config": "2.42.0"
|
|
66
66
|
},
|
|
67
67
|
"sideEffects": false,
|
|
68
68
|
"publishConfig": {
|