@mnaoumov/typescript-dev-toolkit 6.0.2 → 6.1.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/README.md +18 -0
- package/dist/lib/cjs/version.cjs +65 -10
- package/dist/lib/cjs/version.d.cts +20 -0
- package/dist/lib/esm/version.d.mts +20 -0
- package/dist/lib/esm/version.mjs +65 -10
- package/package.json +21 -21
|
@@ -53,6 +53,13 @@ export interface PublishGitHubReleaseOptions {
|
|
|
53
53
|
* @default `true`
|
|
54
54
|
*/
|
|
55
55
|
readonly shouldCloseReleasedIssues?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether to require every asset to exist, require an existing remote tag, and verify the published
|
|
58
|
+
* non-draft release and its uploaded assets before closing issues.
|
|
59
|
+
*
|
|
60
|
+
* @default `false`
|
|
61
|
+
*/
|
|
62
|
+
readonly shouldVerifyRelease?: boolean;
|
|
56
63
|
}
|
|
57
64
|
/**
|
|
58
65
|
* Options for {@link updateChangelog}.
|
|
@@ -133,6 +140,16 @@ export interface UpdateVersionOptions {
|
|
|
133
140
|
* @default `true`
|
|
134
141
|
*/
|
|
135
142
|
readonly shouldEditChangelog?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Whether to publish and verify the GitHub release before pushing the version commit to the branch.
|
|
145
|
+
* Preparation and asset validation happen before any push. Only the release tag is pushed first;
|
|
146
|
+
* a failed preparation, publication or verification leaves the remote branch unchanged.
|
|
147
|
+
* Uses the `origin` remote and pushes the verified commit to the original branch without force.
|
|
148
|
+
* Ignored when {@link shouldRelease} is `false`.
|
|
149
|
+
*
|
|
150
|
+
* @default `false`
|
|
151
|
+
*/
|
|
152
|
+
readonly shouldPublishBeforePush?: boolean;
|
|
136
153
|
/**
|
|
137
154
|
* Whether to publish the release. When `false`, all local steps are executed (version bump,
|
|
138
155
|
* changelog, commit, tag), but the changes are not pushed and no GitHub release is published.
|
|
@@ -431,6 +448,9 @@ export declare function updateChangelog(newVersion: string, options?: UpdateChan
|
|
|
431
448
|
* 11. Prepares and publishes a GitHub release.
|
|
432
449
|
* 12. Closes the issues the release carries, with a link to it.
|
|
433
450
|
*
|
|
451
|
+
* With {@link UpdateVersionOptions.shouldPublishBeforePush}, preparation and asset validation precede
|
|
452
|
+
* the tag push. Publication and verification then precede the branch push, and issue closing remains last.
|
|
453
|
+
*
|
|
434
454
|
* @param versionUpdateType - The type of version update to perform (major, minor, patch, premajor, preminor, prepatch, prerelease, or x.y.z[-suffix]).
|
|
435
455
|
* @param options - The {@link UpdateVersionOptions} controlling the release behavior.
|
|
436
456
|
* @returns A {@link Promise} that resolves when the version update is complete.
|
|
@@ -53,6 +53,13 @@ export interface PublishGitHubReleaseOptions {
|
|
|
53
53
|
* @default `true`
|
|
54
54
|
*/
|
|
55
55
|
readonly shouldCloseReleasedIssues?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether to require every asset to exist, require an existing remote tag, and verify the published
|
|
58
|
+
* non-draft release and its uploaded assets before closing issues.
|
|
59
|
+
*
|
|
60
|
+
* @default `false`
|
|
61
|
+
*/
|
|
62
|
+
readonly shouldVerifyRelease?: boolean;
|
|
56
63
|
}
|
|
57
64
|
/**
|
|
58
65
|
* Options for {@link updateChangelog}.
|
|
@@ -133,6 +140,16 @@ export interface UpdateVersionOptions {
|
|
|
133
140
|
* @default `true`
|
|
134
141
|
*/
|
|
135
142
|
readonly shouldEditChangelog?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Whether to publish and verify the GitHub release before pushing the version commit to the branch.
|
|
145
|
+
* Preparation and asset validation happen before any push. Only the release tag is pushed first;
|
|
146
|
+
* a failed preparation, publication or verification leaves the remote branch unchanged.
|
|
147
|
+
* Uses the `origin` remote and pushes the verified commit to the original branch without force.
|
|
148
|
+
* Ignored when {@link shouldRelease} is `false`.
|
|
149
|
+
*
|
|
150
|
+
* @default `false`
|
|
151
|
+
*/
|
|
152
|
+
readonly shouldPublishBeforePush?: boolean;
|
|
136
153
|
/**
|
|
137
154
|
* Whether to publish the release. When `false`, all local steps are executed (version bump,
|
|
138
155
|
* changelog, commit, tag), but the changes are not pushed and no GitHub release is published.
|
|
@@ -431,6 +448,9 @@ export declare function updateChangelog(newVersion: string, options?: UpdateChan
|
|
|
431
448
|
* 11. Prepares and publishes a GitHub release.
|
|
432
449
|
* 12. Closes the issues the release carries, with a link to it.
|
|
433
450
|
*
|
|
451
|
+
* With {@link UpdateVersionOptions.shouldPublishBeforePush}, preparation and asset validation precede
|
|
452
|
+
* the tag push. Publication and verification then precede the branch push, and issue closing remains last.
|
|
453
|
+
*
|
|
434
454
|
* @param versionUpdateType - The type of version update to perform (major, minor, patch, premajor, preminor, prepatch, prerelease, or x.y.z[-suffix]).
|
|
435
455
|
* @param options - The {@link UpdateVersionOptions} controlling the release behavior.
|
|
436
456
|
* @returns A {@link Promise} that resolves when the version update is complete.
|