@williamthorsen/release-kit 5.2.0 → 5.3.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/CHANGELOG.md +69 -25
- package/README.md +238 -44
- package/cliff.toml.template +4 -39
- package/dist/esm/.cache +1 -1
- package/dist/esm/bin/release-kit.js +59 -0
- package/dist/esm/buildChangelogEntries.js +6 -0
- package/dist/esm/buildEmptyReleaseEntry.d.ts +2 -0
- package/dist/esm/buildEmptyReleaseEntry.js +16 -0
- package/dist/esm/changelogJsonFile.d.ts +2 -0
- package/dist/esm/changelogJsonFile.js +11 -1
- package/dist/esm/changelogJsonUtils.d.ts +2 -1
- package/dist/esm/changelogJsonUtils.js +9 -0
- package/dist/esm/changelogOverrides.d.ts +53 -0
- package/dist/esm/changelogOverrides.js +424 -0
- package/dist/esm/checkWorkTypesDrift.js +3 -2
- package/dist/esm/createGithubReleaseCommand.js +0 -9
- package/dist/esm/defaults.js +1 -1
- package/dist/esm/generateChangelogs.d.ts +0 -3
- package/dist/esm/generateChangelogs.js +1 -35
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/loadConfig.d.ts +1 -1
- package/dist/esm/releasePrepare.js +68 -11
- package/dist/esm/releasePrepareMono.js +103 -56
- package/dist/esm/releasePrepareProject.d.ts +4 -1
- package/dist/esm/releasePrepareProject.js +74 -18
- package/dist/esm/renderChangelogMarkdown.d.ts +12 -0
- package/dist/esm/renderChangelogMarkdown.js +32 -0
- package/dist/esm/renderReleaseNotes.js +6 -1
- package/dist/esm/resolveReleaseNotesConfig.js +3 -1
- package/dist/esm/runGitCliff.d.ts +1 -0
- package/dist/esm/runGitCliff.js +7 -0
- package/dist/esm/syncWorkTypes.js +3 -2
- package/dist/esm/types.d.ts +98 -31
- package/dist/esm/types.js +60 -0
- package/dist/esm/validateConfig.js +84 -345
- package/dist/esm/validateOverridesCommand.d.ts +13 -0
- package/dist/esm/validateOverridesCommand.js +119 -0
- package/dist/esm/work-types.json +23 -17
- package/dist/esm/work-types.schema.json +28 -1
- package/dist/esm/workTypesData.d.ts +8 -0
- package/dist/esm/workTypesData.js +20 -17
- package/dist/esm/workTypesUtils.d.ts +1 -0
- package/dist/esm/workTypesUtils.js +8 -0
- package/package.json +4 -3
- package/dist/esm/writeSyntheticChangelog.d.ts +0 -9
- package/dist/esm/writeSyntheticChangelog.js +0 -27
package/dist/esm/types.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
export type ReleaseType = 'major' | 'minor' | 'patch';
|
|
2
3
|
export type ChangelogAudience = 'all' | 'dev';
|
|
3
4
|
export interface ChangelogItem {
|
|
4
5
|
description: string;
|
|
5
6
|
body?: string;
|
|
6
7
|
breaking?: boolean;
|
|
8
|
+
hash?: string;
|
|
7
9
|
}
|
|
8
10
|
export interface ChangelogSection {
|
|
9
11
|
title: string;
|
|
@@ -20,12 +22,16 @@ export interface ChangelogJsonConfig {
|
|
|
20
22
|
outputPath: string;
|
|
21
23
|
devOnlySections: string[];
|
|
22
24
|
}
|
|
25
|
+
export interface ChangelogOverride {
|
|
26
|
+
audience?: 'all' | 'dev' | 'skip';
|
|
27
|
+
description?: string;
|
|
28
|
+
body?: string;
|
|
29
|
+
breaking?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export type ChangelogOverridesFile = Record<string, ChangelogOverride>;
|
|
23
32
|
export interface ReleaseNotesConfig {
|
|
24
33
|
shouldInjectIntoReadme: boolean;
|
|
25
34
|
}
|
|
26
|
-
export interface ProjectConfig {
|
|
27
|
-
tagPrefix?: string;
|
|
28
|
-
}
|
|
29
35
|
export interface ResolvedProjectConfig {
|
|
30
36
|
tagPrefix: string;
|
|
31
37
|
}
|
|
@@ -114,39 +120,100 @@ export interface PrepareResult {
|
|
|
114
120
|
}
|
|
115
121
|
export interface WorkTypeConfig {
|
|
116
122
|
header: string;
|
|
117
|
-
aliases?: string[];
|
|
123
|
+
aliases?: string[] | undefined;
|
|
118
124
|
}
|
|
119
125
|
export interface VersionPatterns {
|
|
120
126
|
major: string[];
|
|
121
127
|
minor: string[];
|
|
122
128
|
}
|
|
123
|
-
export
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
129
|
+
export declare const legacyIdentitySchema: z.ZodObject<{
|
|
130
|
+
name: z.ZodString;
|
|
131
|
+
tagPrefix: z.ZodString;
|
|
132
|
+
}, z.core.$strict>;
|
|
133
|
+
export type LegacyIdentity = z.infer<typeof legacyIdentitySchema>;
|
|
134
|
+
export declare const retiredPackageSchema: z.ZodObject<{
|
|
135
|
+
name: z.ZodString;
|
|
136
|
+
tagPrefix: z.ZodString;
|
|
137
|
+
successor: z.ZodOptional<z.ZodString>;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
export type RetiredPackage = z.infer<typeof retiredPackageSchema>;
|
|
140
|
+
export declare const workspaceOverrideSchema: z.ZodObject<{
|
|
141
|
+
dir: z.ZodString;
|
|
142
|
+
shouldExclude: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
legacyIdentities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
144
|
+
name: z.ZodString;
|
|
145
|
+
tagPrefix: z.ZodString;
|
|
146
|
+
}, z.core.$strict>>>;
|
|
147
|
+
}, z.core.$strict>;
|
|
148
|
+
export type WorkspaceOverride = z.infer<typeof workspaceOverrideSchema>;
|
|
149
|
+
export declare const projectConfigSchema: z.ZodObject<{
|
|
150
|
+
tagPrefix: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strict>;
|
|
152
|
+
export type ProjectConfig = z.infer<typeof projectConfigSchema>;
|
|
153
|
+
export declare const changelogJsonInputSchema: z.ZodObject<{
|
|
154
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
155
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
156
|
+
devOnlySections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
export declare const releaseNotesInputSchema: z.ZodObject<{
|
|
159
|
+
shouldInjectIntoReadme: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
}, z.core.$strict>;
|
|
161
|
+
export declare const workTypeConfigSchema: z.ZodObject<{
|
|
162
|
+
header: z.ZodString;
|
|
163
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
164
|
+
}, z.core.$strict>;
|
|
165
|
+
export declare const versionPatternsSchema: z.ZodObject<{
|
|
166
|
+
major: z.ZodArray<z.ZodString>;
|
|
167
|
+
minor: z.ZodArray<z.ZodString>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
export declare const breakingPolicyValueSchema: z.ZodEnum<{
|
|
170
|
+
optional: "optional";
|
|
171
|
+
forbidden: "forbidden";
|
|
172
|
+
required: "required";
|
|
173
|
+
}>;
|
|
174
|
+
export declare const releaseKitConfigSchema: z.ZodObject<{
|
|
175
|
+
breakingPolicies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
176
|
+
optional: "optional";
|
|
177
|
+
forbidden: "forbidden";
|
|
178
|
+
required: "required";
|
|
179
|
+
}>>>;
|
|
180
|
+
changelogJson: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
182
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
183
|
+
devOnlySections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
184
|
+
}, z.core.$strict>>;
|
|
185
|
+
cliffConfigPath: z.ZodOptional<z.ZodString>;
|
|
186
|
+
formatCommand: z.ZodOptional<z.ZodString>;
|
|
187
|
+
project: z.ZodOptional<z.ZodObject<{
|
|
188
|
+
tagPrefix: z.ZodOptional<z.ZodString>;
|
|
189
|
+
}, z.core.$strict>>;
|
|
190
|
+
releaseNotes: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
shouldInjectIntoReadme: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
+
}, z.core.$strict>>;
|
|
193
|
+
retiredPackages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
194
|
+
name: z.ZodString;
|
|
195
|
+
tagPrefix: z.ZodString;
|
|
196
|
+
successor: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, z.core.$strict>>>;
|
|
198
|
+
scopeAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
199
|
+
versionPatterns: z.ZodOptional<z.ZodObject<{
|
|
200
|
+
major: z.ZodArray<z.ZodString>;
|
|
201
|
+
minor: z.ZodArray<z.ZodString>;
|
|
202
|
+
}, z.core.$strict>>;
|
|
203
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
204
|
+
dir: z.ZodString;
|
|
205
|
+
shouldExclude: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
+
legacyIdentities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
207
|
+
name: z.ZodString;
|
|
208
|
+
tagPrefix: z.ZodString;
|
|
209
|
+
}, z.core.$strict>>>;
|
|
210
|
+
}, z.core.$strict>>>;
|
|
211
|
+
workTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
212
|
+
header: z.ZodString;
|
|
213
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
|
+
}, z.core.$strict>>>;
|
|
215
|
+
}, z.core.$strict>;
|
|
216
|
+
export type ReleaseKitConfig = z.infer<typeof releaseKitConfigSchema>;
|
|
150
217
|
export interface Commit {
|
|
151
218
|
message: string;
|
|
152
219
|
hash: string;
|
package/dist/esm/types.js
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const legacyIdentitySchema = z.object({
|
|
3
|
+
name: z.string().min(1),
|
|
4
|
+
tagPrefix: z.string().min(1)
|
|
5
|
+
}).strict();
|
|
6
|
+
const retiredPackageSchema = z.object({
|
|
7
|
+
name: z.string().min(1),
|
|
8
|
+
tagPrefix: z.string().min(1),
|
|
9
|
+
successor: z.string().min(1).optional()
|
|
10
|
+
}).strict();
|
|
11
|
+
const workspaceOverrideSchema = z.object({
|
|
12
|
+
dir: z.string().min(1),
|
|
13
|
+
shouldExclude: z.boolean().optional(),
|
|
14
|
+
legacyIdentities: z.array(legacyIdentitySchema).optional()
|
|
15
|
+
}).strict();
|
|
16
|
+
const projectConfigSchema = z.object({
|
|
17
|
+
tagPrefix: z.string().min(1).optional()
|
|
18
|
+
}).strict();
|
|
19
|
+
const changelogJsonInputSchema = z.object({
|
|
20
|
+
enabled: z.boolean().optional(),
|
|
21
|
+
outputPath: z.string().optional(),
|
|
22
|
+
devOnlySections: z.array(z.string()).optional()
|
|
23
|
+
}).strict();
|
|
24
|
+
const releaseNotesInputSchema = z.object({
|
|
25
|
+
shouldInjectIntoReadme: z.boolean().optional()
|
|
26
|
+
}).strict();
|
|
27
|
+
const workTypeConfigSchema = z.object({
|
|
28
|
+
header: z.string(),
|
|
29
|
+
aliases: z.array(z.string()).optional()
|
|
30
|
+
}).strict();
|
|
31
|
+
const versionPatternsSchema = z.object({
|
|
32
|
+
major: z.array(z.string()),
|
|
33
|
+
minor: z.array(z.string())
|
|
34
|
+
}).strict();
|
|
35
|
+
const breakingPolicyValueSchema = z.enum(["forbidden", "optional", "required"]);
|
|
36
|
+
const releaseKitConfigSchema = z.object({
|
|
37
|
+
breakingPolicies: z.record(z.string(), breakingPolicyValueSchema).optional(),
|
|
38
|
+
changelogJson: changelogJsonInputSchema.optional(),
|
|
39
|
+
cliffConfigPath: z.string().min(1).optional(),
|
|
40
|
+
formatCommand: z.string().min(1).optional(),
|
|
41
|
+
project: projectConfigSchema.optional(),
|
|
42
|
+
releaseNotes: releaseNotesInputSchema.optional(),
|
|
43
|
+
retiredPackages: z.array(retiredPackageSchema).optional(),
|
|
44
|
+
scopeAliases: z.record(z.string(), z.string()).optional(),
|
|
45
|
+
versionPatterns: versionPatternsSchema.optional(),
|
|
46
|
+
workspaces: z.array(workspaceOverrideSchema).optional(),
|
|
47
|
+
workTypes: z.record(z.string(), workTypeConfigSchema).optional()
|
|
48
|
+
}).strict();
|
|
49
|
+
export {
|
|
50
|
+
breakingPolicyValueSchema,
|
|
51
|
+
changelogJsonInputSchema,
|
|
52
|
+
legacyIdentitySchema,
|
|
53
|
+
projectConfigSchema,
|
|
54
|
+
releaseKitConfigSchema,
|
|
55
|
+
releaseNotesInputSchema,
|
|
56
|
+
retiredPackageSchema,
|
|
57
|
+
versionPatternsSchema,
|
|
58
|
+
workTypeConfigSchema,
|
|
59
|
+
workspaceOverrideSchema
|
|
60
|
+
};
|