relizy 1.4.6 → 1.4.7
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/cli.mjs +1 -1
- package/dist/index.d.mts +87 -6
- package/dist/index.d.ts +87 -6
- package/dist/index.mjs +1 -1
- package/dist/shared/{relizy.CzL6Efad.mjs → relizy.d-S4lcvu.mjs} +303 -33
- package/package.json +20 -20
package/dist/cli.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import process from 'node:process';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { printBanner, logger } from '@maz-ui/node';
|
|
7
7
|
import { Command } from 'commander';
|
|
8
|
-
import {
|
|
8
|
+
import { ay as isInCI, az as getCIName, b as bump, c as changelog, g as publish, e as providerRelease, h as social, p as prComment, r as release } from './shared/relizy.d-S4lcvu.mjs';
|
|
9
9
|
import 'node:child_process';
|
|
10
10
|
import '@maz-ui/utils';
|
|
11
11
|
import 'c12';
|
package/dist/index.d.mts
CHANGED
|
@@ -69,6 +69,7 @@ declare function getDefaultConfig(): {
|
|
|
69
69
|
ai: AIConfig;
|
|
70
70
|
logLevel: LogLevel;
|
|
71
71
|
safetyCheck: boolean;
|
|
72
|
+
detectRewrittenTags: boolean;
|
|
72
73
|
};
|
|
73
74
|
/**
|
|
74
75
|
* Merge user types with defaults: each user-defined entry replaces the default entirely.
|
|
@@ -210,6 +211,44 @@ declare function getCurrentGitBranch(cwd: string): string;
|
|
|
210
211
|
declare function getCurrentGitRef(cwd: string): string;
|
|
211
212
|
declare function getShortCommitSha(cwd: string, length?: number): string;
|
|
212
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Returns true when `ancestor` is an ancestor of `descendant` (i.e. reachable
|
|
216
|
+
* from it). Uses `git merge-base --is-ancestor`, which exits 0 when true and
|
|
217
|
+
* non-zero otherwise. Any error (e.g. unknown ref) is treated as "not an
|
|
218
|
+
* ancestor".
|
|
219
|
+
*/
|
|
220
|
+
declare function isAncestor(ancestor: string, descendant: string, cwd?: string): Promise<boolean>;
|
|
221
|
+
/**
|
|
222
|
+
* Returns the subject (first line) of the commit a ref points to, or null.
|
|
223
|
+
*/
|
|
224
|
+
declare function getCommitSubject(ref: string, cwd?: string): Promise<string | null>;
|
|
225
|
+
/**
|
|
226
|
+
* Find the most recent commit reachable from `to` whose subject matches
|
|
227
|
+
* `subject` literally. Used to locate the "twin" of a release commit that was
|
|
228
|
+
* rewritten by a rebase (the orphaned tag still points to the old commit).
|
|
229
|
+
*/
|
|
230
|
+
declare function findReachableCommitBySubject(subject: string, to: string, cwd?: string): Promise<string | null>;
|
|
231
|
+
/**
|
|
232
|
+
* Returns true when a tag with the given name exists locally.
|
|
233
|
+
*/
|
|
234
|
+
declare function tagExists(tag: string, cwd?: string): Promise<boolean>;
|
|
235
|
+
/**
|
|
236
|
+
* Move an annotated tag to a different commit locally (force). Never rewrites
|
|
237
|
+
* any commit; only the tag pointer moves.
|
|
238
|
+
*/
|
|
239
|
+
declare function retagAnnotatedLocal({ tag, commit, message, signed, cwd, logLevel, }: {
|
|
240
|
+
tag: string;
|
|
241
|
+
commit: string;
|
|
242
|
+
message: string;
|
|
243
|
+
signed?: boolean;
|
|
244
|
+
cwd?: string;
|
|
245
|
+
logLevel?: LogLevel;
|
|
246
|
+
}): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Force-push a single tag to origin. Used only after explicit confirmation.
|
|
249
|
+
*/
|
|
250
|
+
declare function pushTagForce(tag: string, cwd?: string, logLevel?: LogLevel): Promise<void>;
|
|
251
|
+
|
|
213
252
|
declare function github(options: ProviderReleaseOptions): Promise<PostedRelease[]>;
|
|
214
253
|
|
|
215
254
|
interface GitlabRelease {
|
|
@@ -377,13 +416,14 @@ interface RootPackage extends ReadPackage {
|
|
|
377
416
|
commits: GitCommit[];
|
|
378
417
|
newVersion?: string;
|
|
379
418
|
}
|
|
380
|
-
declare function getRootPackage({ config, force, from, to, suffix, changelog, }: {
|
|
419
|
+
declare function getRootPackage({ config, force, from, to, suffix, changelog, dryRun, }: {
|
|
381
420
|
config: ResolvedRelizyConfig;
|
|
382
421
|
force: boolean;
|
|
383
422
|
from: string;
|
|
384
423
|
to: string;
|
|
385
424
|
suffix: string | undefined;
|
|
386
425
|
changelog: boolean;
|
|
426
|
+
dryRun?: boolean;
|
|
387
427
|
}): Promise<RootPackage>;
|
|
388
428
|
declare function readPackages({ cwd, patterns, ignorePackageNames, includePrivates, }: {
|
|
389
429
|
cwd: string;
|
|
@@ -391,21 +431,42 @@ declare function readPackages({ cwd, patterns, ignorePackageNames, includePrivat
|
|
|
391
431
|
ignorePackageNames: NonNullable<ResolvedRelizyConfig['monorepo']>['ignorePackageNames'];
|
|
392
432
|
includePrivates?: boolean;
|
|
393
433
|
}): ReadPackage[];
|
|
394
|
-
declare function getPackages({ config, suffix, force, includeAll, }: {
|
|
434
|
+
declare function getPackages({ config, suffix, force, includeAll, dryRun, }: {
|
|
395
435
|
config: ResolvedRelizyConfig;
|
|
396
436
|
suffix: string | undefined;
|
|
397
437
|
force: boolean;
|
|
398
438
|
includeAll?: boolean;
|
|
439
|
+
dryRun?: boolean;
|
|
399
440
|
}): Promise<PackageBase[]>;
|
|
400
|
-
declare function getPackageCommits({ pkg, from, to, config, changelog, }: {
|
|
441
|
+
declare function getPackageCommits({ pkg, from, to, config, changelog, dryRun, }: {
|
|
401
442
|
pkg: ReadPackage;
|
|
402
443
|
from: string;
|
|
403
444
|
to: string;
|
|
404
445
|
config: ResolvedRelizyConfig;
|
|
405
446
|
changelog: boolean;
|
|
447
|
+
dryRun?: boolean;
|
|
406
448
|
}): Promise<GitCommit[]>;
|
|
407
449
|
declare function hasLernaJson(rootDir: string): boolean;
|
|
408
450
|
|
|
451
|
+
/** Test helper: clear the per-process decision cache. */
|
|
452
|
+
declare function resetRewrittenTagCache(): void;
|
|
453
|
+
/**
|
|
454
|
+
* Ensure the resolved `from` tag is reachable from `to`. When it is not (a
|
|
455
|
+
* rewritten / orphaned tag), explain the situation and either prompt the user
|
|
456
|
+
* or auto-correct, depending on the configured strategy. Returns the effective
|
|
457
|
+
* `from` to use (the original tag, the rebound tag, or the equivalent commit
|
|
458
|
+
* SHA for an ephemeral correction).
|
|
459
|
+
*
|
|
460
|
+
* No commit is ever rewritten; the only mutation possible is moving a tag.
|
|
461
|
+
*/
|
|
462
|
+
declare function reconcileFromTag({ from, to, config, dryRun, }: {
|
|
463
|
+
from: string;
|
|
464
|
+
to: string;
|
|
465
|
+
config: ResolvedRelizyConfig;
|
|
466
|
+
pkg?: ReadPackage;
|
|
467
|
+
dryRun?: boolean;
|
|
468
|
+
}): Promise<string>;
|
|
469
|
+
|
|
409
470
|
/**
|
|
410
471
|
* Get Slack token from config
|
|
411
472
|
* Priority: social.slack.credentials > config.tokens.slack > environment variables (handled in config.ts)
|
|
@@ -563,11 +624,12 @@ declare function isBumpedPackage(pkg: PackageBase): pkg is PackageBase & {
|
|
|
563
624
|
declare function filterOutPrivatePackages<T extends {
|
|
564
625
|
private: boolean;
|
|
565
626
|
}>(packages: T[]): T[];
|
|
566
|
-
declare function getPackagesOrBumpedPackages({ config, bumpResult, suffix, force, }: {
|
|
627
|
+
declare function getPackagesOrBumpedPackages({ config, bumpResult, suffix, force, dryRun, }: {
|
|
567
628
|
config: ResolvedRelizyConfig;
|
|
568
629
|
bumpResult: BumpResultTruthy | undefined;
|
|
569
630
|
suffix: string | undefined;
|
|
570
631
|
force: boolean;
|
|
632
|
+
dryRun?: boolean;
|
|
571
633
|
}): Promise<PackageBase[]>;
|
|
572
634
|
|
|
573
635
|
declare function isGraduatingToStableBetweenVersion(version: string, newVersion: string): boolean;
|
|
@@ -1764,6 +1826,7 @@ type HookConfig = {
|
|
|
1764
1826
|
* Relizy configuration
|
|
1765
1827
|
* @see https://relizy.dev/config/overview
|
|
1766
1828
|
*/
|
|
1829
|
+
type OnRewrittenTag = 'prompt' | 'ephemeral' | 'rebind' | 'error';
|
|
1767
1830
|
interface RelizyConfig extends Partial<Omit<ChangelogConfig$1, 'output' | 'templates' | 'publish' | 'types' | 'tokens'>> {
|
|
1768
1831
|
/**
|
|
1769
1832
|
* Project name
|
|
@@ -1845,6 +1908,24 @@ interface RelizyConfig extends Partial<Omit<ChangelogConfig$1, 'output' | 'templ
|
|
|
1845
1908
|
* @default true
|
|
1846
1909
|
*/
|
|
1847
1910
|
safetyCheck?: boolean;
|
|
1911
|
+
/**
|
|
1912
|
+
* Detect when the resolved `from` tag points to a commit that is no longer
|
|
1913
|
+
* reachable from `to` (typically because the history was rebased after the
|
|
1914
|
+
* tag was created). When enabled, relizy explains the situation and either
|
|
1915
|
+
* prompts or auto-corrects, avoiding bloated changelogs and over-bumping.
|
|
1916
|
+
* @default true
|
|
1917
|
+
*/
|
|
1918
|
+
detectRewrittenTags?: boolean;
|
|
1919
|
+
/**
|
|
1920
|
+
* Strategy applied when a rewritten/orphaned `from` tag is detected.
|
|
1921
|
+
* Defaults to `prompt` interactively, or `ephemeral` when non-interactive
|
|
1922
|
+
* (`--yes` / no TTY / CI).
|
|
1923
|
+
* - `prompt`: interactive selection.
|
|
1924
|
+
* - `ephemeral`: use the reachable equivalent commit for this run only.
|
|
1925
|
+
* - `rebind`: move the local tag onto the equivalent commit (no push).
|
|
1926
|
+
* - `error`: throw and stop.
|
|
1927
|
+
*/
|
|
1928
|
+
onRewrittenTag?: OnRewrittenTag;
|
|
1848
1929
|
}
|
|
1849
1930
|
|
|
1850
1931
|
declare function bump(options?: Partial<BumpOptions>): Promise<BumpResult>;
|
|
@@ -1897,5 +1978,5 @@ declare function socialSafetyCheck({ config }: {
|
|
|
1897
1978
|
}): Promise<void>;
|
|
1898
1979
|
declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
|
|
1899
1980
|
|
|
1900
|
-
export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, findGitHubPR, findGitLabMR, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, hasLernaJson, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, readPackageJson, readPackages, release, resolveTags, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
1901
|
-
export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, SlackCredentials, SlackOptions, SlackPackageEntry, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode };
|
|
1981
|
+
export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, release, resetRewrittenTagCache, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
1982
|
+
export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, SlackCredentials, SlackOptions, SlackPackageEntry, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode };
|
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ declare function getDefaultConfig(): {
|
|
|
69
69
|
ai: AIConfig;
|
|
70
70
|
logLevel: LogLevel;
|
|
71
71
|
safetyCheck: boolean;
|
|
72
|
+
detectRewrittenTags: boolean;
|
|
72
73
|
};
|
|
73
74
|
/**
|
|
74
75
|
* Merge user types with defaults: each user-defined entry replaces the default entirely.
|
|
@@ -210,6 +211,44 @@ declare function getCurrentGitBranch(cwd: string): string;
|
|
|
210
211
|
declare function getCurrentGitRef(cwd: string): string;
|
|
211
212
|
declare function getShortCommitSha(cwd: string, length?: number): string;
|
|
212
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Returns true when `ancestor` is an ancestor of `descendant` (i.e. reachable
|
|
216
|
+
* from it). Uses `git merge-base --is-ancestor`, which exits 0 when true and
|
|
217
|
+
* non-zero otherwise. Any error (e.g. unknown ref) is treated as "not an
|
|
218
|
+
* ancestor".
|
|
219
|
+
*/
|
|
220
|
+
declare function isAncestor(ancestor: string, descendant: string, cwd?: string): Promise<boolean>;
|
|
221
|
+
/**
|
|
222
|
+
* Returns the subject (first line) of the commit a ref points to, or null.
|
|
223
|
+
*/
|
|
224
|
+
declare function getCommitSubject(ref: string, cwd?: string): Promise<string | null>;
|
|
225
|
+
/**
|
|
226
|
+
* Find the most recent commit reachable from `to` whose subject matches
|
|
227
|
+
* `subject` literally. Used to locate the "twin" of a release commit that was
|
|
228
|
+
* rewritten by a rebase (the orphaned tag still points to the old commit).
|
|
229
|
+
*/
|
|
230
|
+
declare function findReachableCommitBySubject(subject: string, to: string, cwd?: string): Promise<string | null>;
|
|
231
|
+
/**
|
|
232
|
+
* Returns true when a tag with the given name exists locally.
|
|
233
|
+
*/
|
|
234
|
+
declare function tagExists(tag: string, cwd?: string): Promise<boolean>;
|
|
235
|
+
/**
|
|
236
|
+
* Move an annotated tag to a different commit locally (force). Never rewrites
|
|
237
|
+
* any commit; only the tag pointer moves.
|
|
238
|
+
*/
|
|
239
|
+
declare function retagAnnotatedLocal({ tag, commit, message, signed, cwd, logLevel, }: {
|
|
240
|
+
tag: string;
|
|
241
|
+
commit: string;
|
|
242
|
+
message: string;
|
|
243
|
+
signed?: boolean;
|
|
244
|
+
cwd?: string;
|
|
245
|
+
logLevel?: LogLevel;
|
|
246
|
+
}): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Force-push a single tag to origin. Used only after explicit confirmation.
|
|
249
|
+
*/
|
|
250
|
+
declare function pushTagForce(tag: string, cwd?: string, logLevel?: LogLevel): Promise<void>;
|
|
251
|
+
|
|
213
252
|
declare function github(options: ProviderReleaseOptions): Promise<PostedRelease[]>;
|
|
214
253
|
|
|
215
254
|
interface GitlabRelease {
|
|
@@ -377,13 +416,14 @@ interface RootPackage extends ReadPackage {
|
|
|
377
416
|
commits: GitCommit[];
|
|
378
417
|
newVersion?: string;
|
|
379
418
|
}
|
|
380
|
-
declare function getRootPackage({ config, force, from, to, suffix, changelog, }: {
|
|
419
|
+
declare function getRootPackage({ config, force, from, to, suffix, changelog, dryRun, }: {
|
|
381
420
|
config: ResolvedRelizyConfig;
|
|
382
421
|
force: boolean;
|
|
383
422
|
from: string;
|
|
384
423
|
to: string;
|
|
385
424
|
suffix: string | undefined;
|
|
386
425
|
changelog: boolean;
|
|
426
|
+
dryRun?: boolean;
|
|
387
427
|
}): Promise<RootPackage>;
|
|
388
428
|
declare function readPackages({ cwd, patterns, ignorePackageNames, includePrivates, }: {
|
|
389
429
|
cwd: string;
|
|
@@ -391,21 +431,42 @@ declare function readPackages({ cwd, patterns, ignorePackageNames, includePrivat
|
|
|
391
431
|
ignorePackageNames: NonNullable<ResolvedRelizyConfig['monorepo']>['ignorePackageNames'];
|
|
392
432
|
includePrivates?: boolean;
|
|
393
433
|
}): ReadPackage[];
|
|
394
|
-
declare function getPackages({ config, suffix, force, includeAll, }: {
|
|
434
|
+
declare function getPackages({ config, suffix, force, includeAll, dryRun, }: {
|
|
395
435
|
config: ResolvedRelizyConfig;
|
|
396
436
|
suffix: string | undefined;
|
|
397
437
|
force: boolean;
|
|
398
438
|
includeAll?: boolean;
|
|
439
|
+
dryRun?: boolean;
|
|
399
440
|
}): Promise<PackageBase[]>;
|
|
400
|
-
declare function getPackageCommits({ pkg, from, to, config, changelog, }: {
|
|
441
|
+
declare function getPackageCommits({ pkg, from, to, config, changelog, dryRun, }: {
|
|
401
442
|
pkg: ReadPackage;
|
|
402
443
|
from: string;
|
|
403
444
|
to: string;
|
|
404
445
|
config: ResolvedRelizyConfig;
|
|
405
446
|
changelog: boolean;
|
|
447
|
+
dryRun?: boolean;
|
|
406
448
|
}): Promise<GitCommit[]>;
|
|
407
449
|
declare function hasLernaJson(rootDir: string): boolean;
|
|
408
450
|
|
|
451
|
+
/** Test helper: clear the per-process decision cache. */
|
|
452
|
+
declare function resetRewrittenTagCache(): void;
|
|
453
|
+
/**
|
|
454
|
+
* Ensure the resolved `from` tag is reachable from `to`. When it is not (a
|
|
455
|
+
* rewritten / orphaned tag), explain the situation and either prompt the user
|
|
456
|
+
* or auto-correct, depending on the configured strategy. Returns the effective
|
|
457
|
+
* `from` to use (the original tag, the rebound tag, or the equivalent commit
|
|
458
|
+
* SHA for an ephemeral correction).
|
|
459
|
+
*
|
|
460
|
+
* No commit is ever rewritten; the only mutation possible is moving a tag.
|
|
461
|
+
*/
|
|
462
|
+
declare function reconcileFromTag({ from, to, config, dryRun, }: {
|
|
463
|
+
from: string;
|
|
464
|
+
to: string;
|
|
465
|
+
config: ResolvedRelizyConfig;
|
|
466
|
+
pkg?: ReadPackage;
|
|
467
|
+
dryRun?: boolean;
|
|
468
|
+
}): Promise<string>;
|
|
469
|
+
|
|
409
470
|
/**
|
|
410
471
|
* Get Slack token from config
|
|
411
472
|
* Priority: social.slack.credentials > config.tokens.slack > environment variables (handled in config.ts)
|
|
@@ -563,11 +624,12 @@ declare function isBumpedPackage(pkg: PackageBase): pkg is PackageBase & {
|
|
|
563
624
|
declare function filterOutPrivatePackages<T extends {
|
|
564
625
|
private: boolean;
|
|
565
626
|
}>(packages: T[]): T[];
|
|
566
|
-
declare function getPackagesOrBumpedPackages({ config, bumpResult, suffix, force, }: {
|
|
627
|
+
declare function getPackagesOrBumpedPackages({ config, bumpResult, suffix, force, dryRun, }: {
|
|
567
628
|
config: ResolvedRelizyConfig;
|
|
568
629
|
bumpResult: BumpResultTruthy | undefined;
|
|
569
630
|
suffix: string | undefined;
|
|
570
631
|
force: boolean;
|
|
632
|
+
dryRun?: boolean;
|
|
571
633
|
}): Promise<PackageBase[]>;
|
|
572
634
|
|
|
573
635
|
declare function isGraduatingToStableBetweenVersion(version: string, newVersion: string): boolean;
|
|
@@ -1764,6 +1826,7 @@ type HookConfig = {
|
|
|
1764
1826
|
* Relizy configuration
|
|
1765
1827
|
* @see https://relizy.dev/config/overview
|
|
1766
1828
|
*/
|
|
1829
|
+
type OnRewrittenTag = 'prompt' | 'ephemeral' | 'rebind' | 'error';
|
|
1767
1830
|
interface RelizyConfig extends Partial<Omit<ChangelogConfig$1, 'output' | 'templates' | 'publish' | 'types' | 'tokens'>> {
|
|
1768
1831
|
/**
|
|
1769
1832
|
* Project name
|
|
@@ -1845,6 +1908,24 @@ interface RelizyConfig extends Partial<Omit<ChangelogConfig$1, 'output' | 'templ
|
|
|
1845
1908
|
* @default true
|
|
1846
1909
|
*/
|
|
1847
1910
|
safetyCheck?: boolean;
|
|
1911
|
+
/**
|
|
1912
|
+
* Detect when the resolved `from` tag points to a commit that is no longer
|
|
1913
|
+
* reachable from `to` (typically because the history was rebased after the
|
|
1914
|
+
* tag was created). When enabled, relizy explains the situation and either
|
|
1915
|
+
* prompts or auto-corrects, avoiding bloated changelogs and over-bumping.
|
|
1916
|
+
* @default true
|
|
1917
|
+
*/
|
|
1918
|
+
detectRewrittenTags?: boolean;
|
|
1919
|
+
/**
|
|
1920
|
+
* Strategy applied when a rewritten/orphaned `from` tag is detected.
|
|
1921
|
+
* Defaults to `prompt` interactively, or `ephemeral` when non-interactive
|
|
1922
|
+
* (`--yes` / no TTY / CI).
|
|
1923
|
+
* - `prompt`: interactive selection.
|
|
1924
|
+
* - `ephemeral`: use the reachable equivalent commit for this run only.
|
|
1925
|
+
* - `rebind`: move the local tag onto the equivalent commit (no push).
|
|
1926
|
+
* - `error`: throw and stop.
|
|
1927
|
+
*/
|
|
1928
|
+
onRewrittenTag?: OnRewrittenTag;
|
|
1848
1929
|
}
|
|
1849
1930
|
|
|
1850
1931
|
declare function bump(options?: Partial<BumpOptions>): Promise<BumpResult>;
|
|
@@ -1897,5 +1978,5 @@ declare function socialSafetyCheck({ config }: {
|
|
|
1897
1978
|
}): Promise<void>;
|
|
1898
1979
|
declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
|
|
1899
1980
|
|
|
1900
|
-
export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, findGitHubPR, findGitLabMR, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, hasLernaJson, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, readPackageJson, readPackages, release, resolveTags, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
1901
|
-
export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, SlackCredentials, SlackOptions, SlackPackageEntry, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode };
|
|
1981
|
+
export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, release, resetRewrittenTagCache, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
1982
|
+
export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, SlackCredentials, SlackOptions, SlackPackageEntry, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { as as NEW_PACKAGE_MARKER, a5 as PR_COMMENT_MARKER, S as buildChangelogBody, a as buildCommentBody, R as buildCompareLink, U as buildContributors, b as bump, aG as capReleaseTypeForZeroMajor, c as changelog, v as checkGitStatusIfDirty, T as collectContributorNames, a1 as collectPackageBumps, aU as confirmBump, B as createCommitAndTags, P as createGitlabRelease, k as defineConfig, y as detectGitProvider, X as detectPackageManager, a4 as detectPullRequest, Y as determinePublishTag, aI as determineReleaseType, aH as determineSemverChange, aB as executeBuildCmd, aA as executeFormatCmd, ax as executeHook, q as expandPackagesToBumpWithDependents, al as extractChangelogSummary, aM as extractVersionFromPackageTag, aX as extractVersionFromTag, x as fetchGitTags, aD as filterOutPrivatePackages, a2 as findGitHubPR, a3 as findGitLabMR, K as findReachableCommitBySubject, ah as formatChangelogForSlack, ai as formatPackagesForSlack, aj as formatSlackMessage, av as formatTweetMessage, i as generateChangelog, V as generateMarkDown, $ as getAuthCommand, aV as getBumpedIndependentPackages, aT as getBumpedPackageIndependently, az as getCIName, aY as getCanaryVersion, J as getCommitSubject, F as getCurrentGitBranch, G as getCurrentGitRef, j as getDefaultConfig, o as getDependentsOf, E as getFirstCommit, u as getGitStatus, an as getIndependentTag, ar as getLastPackageTag, aq as getLastRepoTag, ao as getLastStableTag, ap as getLastTag, A as getModifiedReleaseFilePatterns, ab as getPackageCommits, n as getPackageDependencies, aK as getPackageNewVersion, aa as getPackages, aE as getPackagesOrBumpedPackages, _ as getPackagesToPublishInIndependentMode, Z as getPackagesToPublishInSelectiveMode, aR as getPreid, am as getReleaseUrl, a8 as getRootPackage, H as getShortCommitSha, af as getSlackToken, ag as getSlackWebhookUrl, au as getTwitterCredentials, O as github, Q as gitlab, ac as hasLernaJson, I as isAncestor, aC as isBumpedPackage, aS as isChangedPreid, aQ as isGraduating, aF as isGraduatingToStableBetweenVersion, ay as isInCI, aN as isPrerelease, aP as isPrereleaseReleaseType, aO as isStableReleaseType, aZ as isTagVersionCompatibleWithCurrent, l as loadRelizyConfig, m as mergeTypes, W as parseChangelogMarkdown, z as parseGitRemoteUrl, a6 as postPrComment, ak as postReleaseToSlack, aw as postReleaseToTwitter, p as prComment, e as providerRelease, d as providerReleaseSafetyCheck, g as publish, a0 as publishPackage, f as publishSafetyCheck, C as pushCommitAndTags, N as pushTagForce, a7 as readPackageJson, a9 as readPackages, ae as reconcileFromTag, r as release, ad as resetRewrittenTagCache, at as resolveTags, M as retagAnnotatedLocal, D as rollbackModifiedFiles, aW as shouldFilterPrereleaseTags, h as social, s as socialSafetyCheck, L as tagExists, t as topologicalSort, aL as updateLernaVersion, w as writeChangelogToFile, aJ as writeVersion } from './shared/relizy.d-S4lcvu.mjs';
|
|
2
2
|
import '@maz-ui/node';
|
|
3
3
|
import 'node:child_process';
|
|
4
4
|
import 'node:process';
|
|
@@ -7,7 +7,7 @@ import { getGitDiff, parseCommits, resolveRepoConfig, getRepoConfig, formatCompa
|
|
|
7
7
|
import { defu } from 'defu';
|
|
8
8
|
import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
9
9
|
import path, { join, relative, sep } from 'node:path';
|
|
10
|
-
import { confirm, input } from '@inquirer/prompts';
|
|
10
|
+
import { select, confirm, input } from '@inquirer/prompts';
|
|
11
11
|
import fastGlob from 'fast-glob';
|
|
12
12
|
import * as semver from 'semver';
|
|
13
13
|
import { convert } from 'convert-gitmoji';
|
|
@@ -131,6 +131,250 @@ function topologicalSort(packages) {
|
|
|
131
131
|
return sorted;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
function shellSingleQuote(value) {
|
|
135
|
+
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
136
|
+
}
|
|
137
|
+
async function isAncestor(ancestor, descendant, cwd) {
|
|
138
|
+
try {
|
|
139
|
+
await execPromise(
|
|
140
|
+
`git merge-base --is-ancestor ${shellSingleQuote(ancestor)} ${shellSingleQuote(descendant)}`,
|
|
141
|
+
{ cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
|
|
142
|
+
);
|
|
143
|
+
return true;
|
|
144
|
+
} catch {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
async function getCommitSubject(ref, cwd) {
|
|
149
|
+
try {
|
|
150
|
+
const { stdout } = await execPromise(
|
|
151
|
+
`git log -1 --format=%s ${shellSingleQuote(ref)}`,
|
|
152
|
+
{ cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
|
|
153
|
+
);
|
|
154
|
+
return stdout.trim() || null;
|
|
155
|
+
} catch {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
async function findReachableCommitBySubject(subject, to, cwd) {
|
|
160
|
+
try {
|
|
161
|
+
const { stdout } = await execPromise(
|
|
162
|
+
`git log ${shellSingleQuote(to)} --grep=${shellSingleQuote(subject)} --fixed-strings --format=%H -n 1`,
|
|
163
|
+
{ cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
|
|
164
|
+
);
|
|
165
|
+
return stdout.trim().split("\n")[0]?.trim() || null;
|
|
166
|
+
} catch {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async function tagExists(tag, cwd) {
|
|
171
|
+
try {
|
|
172
|
+
const tagRef = `refs/tags/${tag}`;
|
|
173
|
+
await execPromise(
|
|
174
|
+
`git rev-parse --verify --quiet ${shellSingleQuote(tagRef)}`,
|
|
175
|
+
{ cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
|
|
176
|
+
);
|
|
177
|
+
return true;
|
|
178
|
+
} catch {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
async function retagAnnotatedLocal({
|
|
183
|
+
tag,
|
|
184
|
+
commit,
|
|
185
|
+
message,
|
|
186
|
+
signed,
|
|
187
|
+
cwd,
|
|
188
|
+
logLevel
|
|
189
|
+
}) {
|
|
190
|
+
const sign = signed ? "-s " : "";
|
|
191
|
+
await execPromise(
|
|
192
|
+
`git tag -f ${sign}-a ${shellSingleQuote(tag)} ${shellSingleQuote(commit)} -m ${shellSingleQuote(message)}`,
|
|
193
|
+
{ cwd, logLevel, noStderr: true, noStdout: true }
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
async function pushTagForce(tag, cwd, logLevel) {
|
|
197
|
+
await execPromise(
|
|
198
|
+
`git push origin ${shellSingleQuote(tag)} --force`,
|
|
199
|
+
{ cwd, logLevel, noStderr: true, noStdout: true }
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const sessionCache = /* @__PURE__ */ new Map();
|
|
204
|
+
function resetRewrittenTagCache() {
|
|
205
|
+
sessionCache.clear();
|
|
206
|
+
}
|
|
207
|
+
function short(sha) {
|
|
208
|
+
return sha.slice(0, 9);
|
|
209
|
+
}
|
|
210
|
+
function extractVersionFromRef(ref) {
|
|
211
|
+
const atIndex = ref.lastIndexOf("@");
|
|
212
|
+
const candidate = atIndex >= 0 ? ref.slice(atIndex + 1) : ref;
|
|
213
|
+
return candidate.startsWith("v") ? candidate.slice(1) : candidate;
|
|
214
|
+
}
|
|
215
|
+
function resolveStrategy(config) {
|
|
216
|
+
const isTTY = Boolean(process$1.stdout?.isTTY);
|
|
217
|
+
const strategy = config.onRewrittenTag ?? (!config.bump?.yes && isTTY ? "prompt" : "ephemeral");
|
|
218
|
+
if (strategy === "prompt" && !isTTY) {
|
|
219
|
+
return "ephemeral";
|
|
220
|
+
}
|
|
221
|
+
return strategy;
|
|
222
|
+
}
|
|
223
|
+
function buildExplanation({
|
|
224
|
+
from,
|
|
225
|
+
to,
|
|
226
|
+
twin,
|
|
227
|
+
subject
|
|
228
|
+
}) {
|
|
229
|
+
const lines = [
|
|
230
|
+
`\u26A0\uFE0F Tag "${from}" points to a commit that is no longer in the history of "${to}".`,
|
|
231
|
+
`It was most likely rewritten by a "git rebase" after the tag was created.`,
|
|
232
|
+
`Generating a changelog from it would span the whole divergent range (often the entire history since the last stable release, with duplicated commits) instead of the real changes.`
|
|
233
|
+
];
|
|
234
|
+
if (twin) {
|
|
235
|
+
const subjectSuffix = subject ? ` ("${subject}")` : "";
|
|
236
|
+
lines.push(`Equivalent commit found on "${to}": ${short(twin)}${subjectSuffix}.`);
|
|
237
|
+
} else {
|
|
238
|
+
lines.push(`No equivalent commit could be found on "${to}".`);
|
|
239
|
+
}
|
|
240
|
+
lines.push(`Tip: never rebase "develop"/"main" (commits that are tagged or pushed are immutable). Integrate branches via merge or fast-forward instead.`);
|
|
241
|
+
return lines.join("\n");
|
|
242
|
+
}
|
|
243
|
+
async function rebind({
|
|
244
|
+
from,
|
|
245
|
+
twin,
|
|
246
|
+
config,
|
|
247
|
+
dryRun,
|
|
248
|
+
push
|
|
249
|
+
}) {
|
|
250
|
+
const message = config.templates?.tagMessage?.replaceAll("{{newVersion}}", extractVersionFromRef(from)) || from;
|
|
251
|
+
if (dryRun) {
|
|
252
|
+
logger.info(`[dry-run] git tag -f -a ${from} ${short(twin)} -m "${message}" (re-bind orphaned tag)`);
|
|
253
|
+
if (push) {
|
|
254
|
+
logger.info(`[dry-run] git push origin ${from} --force`);
|
|
255
|
+
}
|
|
256
|
+
return from;
|
|
257
|
+
}
|
|
258
|
+
await retagAnnotatedLocal({
|
|
259
|
+
tag: from,
|
|
260
|
+
commit: twin,
|
|
261
|
+
message,
|
|
262
|
+
signed: config.signTags,
|
|
263
|
+
cwd: config.cwd,
|
|
264
|
+
logLevel: config.logLevel
|
|
265
|
+
});
|
|
266
|
+
logger.success(`Re-bound tag "${from}" -> ${short(twin)} locally.`);
|
|
267
|
+
if (push) {
|
|
268
|
+
await pushTagForce(from, config.cwd, config.logLevel);
|
|
269
|
+
logger.success(`Force-pushed tag "${from}" to origin.`);
|
|
270
|
+
} else {
|
|
271
|
+
logger.info(`To publish the corrected tag later: git push origin ${from} --force`);
|
|
272
|
+
}
|
|
273
|
+
return from;
|
|
274
|
+
}
|
|
275
|
+
async function promptOrphan({
|
|
276
|
+
from,
|
|
277
|
+
twin,
|
|
278
|
+
config,
|
|
279
|
+
dryRun,
|
|
280
|
+
explanation
|
|
281
|
+
}) {
|
|
282
|
+
logger.warn(explanation);
|
|
283
|
+
const choices = [];
|
|
284
|
+
if (twin) {
|
|
285
|
+
choices.push({ name: `Use equivalent commit ${short(twin)} for this run only (recommended, non-destructive)`, value: "ephemeral" });
|
|
286
|
+
choices.push({ name: `Re-bind tag "${from}" -> ${short(twin)} locally (push it manually later)`, value: "rebind-local" });
|
|
287
|
+
choices.push({ name: `Re-bind tag "${from}" -> ${short(twin)} locally AND force-push to origin`, value: "rebind-push" });
|
|
288
|
+
}
|
|
289
|
+
choices.push({ name: `Keep the orphaned tag (changelog will span the full divergent range)`, value: "keep" });
|
|
290
|
+
choices.push({ name: `Abort`, value: "abort" });
|
|
291
|
+
let answer;
|
|
292
|
+
try {
|
|
293
|
+
answer = await select({
|
|
294
|
+
message: `How should relizy handle the rewritten tag "${from}"?`,
|
|
295
|
+
choices,
|
|
296
|
+
default: twin ? "ephemeral" : "keep"
|
|
297
|
+
});
|
|
298
|
+
} catch (error) {
|
|
299
|
+
const userHasExited = error instanceof Error && error.name === "ExitPromptError";
|
|
300
|
+
logger.log("");
|
|
301
|
+
logger.fail(userHasExited ? "Cancelled" : "Error while resolving rewritten tag");
|
|
302
|
+
process$1.exit(userHasExited ? 0 : 1);
|
|
303
|
+
}
|
|
304
|
+
switch (answer) {
|
|
305
|
+
case "ephemeral":
|
|
306
|
+
logger.info(`Using equivalent commit ${short(twin)} as the changelog base for this run.`);
|
|
307
|
+
return twin;
|
|
308
|
+
case "rebind-local":
|
|
309
|
+
return rebind({ from, twin, config, dryRun, push: false });
|
|
310
|
+
case "rebind-push": {
|
|
311
|
+
const confirmed = await confirm({
|
|
312
|
+
message: `Force-push tag "${from}" to origin? This rewrites the already-published tag.`,
|
|
313
|
+
default: false
|
|
314
|
+
}).catch(() => false);
|
|
315
|
+
if (!confirmed) {
|
|
316
|
+
logger.info("Skipping force-push; re-binding the tag locally only.");
|
|
317
|
+
return rebind({ from, twin, config, dryRun, push: false });
|
|
318
|
+
}
|
|
319
|
+
return rebind({ from, twin, config, dryRun, push: true });
|
|
320
|
+
}
|
|
321
|
+
case "keep":
|
|
322
|
+
logger.warn(`Keeping orphaned tag "${from}"; the changelog range may be incorrect.`);
|
|
323
|
+
return from;
|
|
324
|
+
case "abort":
|
|
325
|
+
default:
|
|
326
|
+
logger.log("");
|
|
327
|
+
logger.fail("Aborted. Re-bind the tag or fix your history, then retry.");
|
|
328
|
+
process$1.exit(0);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
async function reconcileFromTag({
|
|
332
|
+
from,
|
|
333
|
+
to,
|
|
334
|
+
config,
|
|
335
|
+
dryRun = false
|
|
336
|
+
}) {
|
|
337
|
+
if (config.detectRewrittenTags === false || !from || from === to) {
|
|
338
|
+
return from;
|
|
339
|
+
}
|
|
340
|
+
const cwd = config.cwd;
|
|
341
|
+
if (!await tagExists(from, cwd)) {
|
|
342
|
+
return from;
|
|
343
|
+
}
|
|
344
|
+
const cached = sessionCache.get(from);
|
|
345
|
+
if (cached !== void 0) {
|
|
346
|
+
return cached;
|
|
347
|
+
}
|
|
348
|
+
if (await isAncestor(from, to, cwd)) {
|
|
349
|
+
sessionCache.set(from, from);
|
|
350
|
+
return from;
|
|
351
|
+
}
|
|
352
|
+
const subject = await getCommitSubject(from, cwd);
|
|
353
|
+
const twin = subject ? await findReachableCommitBySubject(subject, to, cwd) : null;
|
|
354
|
+
const explanation = buildExplanation({ from, to, twin, subject });
|
|
355
|
+
const strategy = resolveStrategy(config);
|
|
356
|
+
let result;
|
|
357
|
+
if (strategy === "error") {
|
|
358
|
+
logger.error(explanation);
|
|
359
|
+
throw new Error(`Tag "${from}" was rewritten (rebased) and is no longer reachable from "${to}". Re-bind the tag or fix your history.`);
|
|
360
|
+
} else if (strategy === "prompt") {
|
|
361
|
+
result = await promptOrphan({ from, twin, config, dryRun, explanation });
|
|
362
|
+
} else if (!twin) {
|
|
363
|
+
logger.warn(explanation);
|
|
364
|
+
logger.warn(`Falling back to the original tag "${from}"; the changelog range may be incorrect.`);
|
|
365
|
+
result = from;
|
|
366
|
+
} else if (strategy === "rebind") {
|
|
367
|
+
logger.warn(explanation);
|
|
368
|
+
result = await rebind({ from, twin, config, dryRun, push: false });
|
|
369
|
+
} else {
|
|
370
|
+
logger.warn(explanation);
|
|
371
|
+
logger.info(`Using equivalent commit ${short(twin)} as the changelog base for this run (tag "${from}" left untouched).`);
|
|
372
|
+
result = twin;
|
|
373
|
+
}
|
|
374
|
+
sessionCache.set(from, result);
|
|
375
|
+
return result;
|
|
376
|
+
}
|
|
377
|
+
|
|
134
378
|
function getFirstPackageCommitHash(packagePath, cwd) {
|
|
135
379
|
const relativePath = relative(cwd, packagePath);
|
|
136
380
|
try {
|
|
@@ -175,7 +419,8 @@ async function getRootPackage({
|
|
|
175
419
|
from,
|
|
176
420
|
to,
|
|
177
421
|
suffix,
|
|
178
|
-
changelog
|
|
422
|
+
changelog,
|
|
423
|
+
dryRun = false
|
|
179
424
|
}) {
|
|
180
425
|
try {
|
|
181
426
|
const packageJson = readPackageJson(config.cwd);
|
|
@@ -187,7 +432,8 @@ async function getRootPackage({
|
|
|
187
432
|
from,
|
|
188
433
|
to,
|
|
189
434
|
config,
|
|
190
|
-
changelog
|
|
435
|
+
changelog,
|
|
436
|
+
dryRun
|
|
191
437
|
});
|
|
192
438
|
let newVersion;
|
|
193
439
|
if (config.monorepo?.versionMode !== "independent") {
|
|
@@ -296,7 +542,8 @@ async function getPackages({
|
|
|
296
542
|
config,
|
|
297
543
|
suffix,
|
|
298
544
|
force,
|
|
299
|
-
includeAll = false
|
|
545
|
+
includeAll = false,
|
|
546
|
+
dryRun = false
|
|
300
547
|
}) {
|
|
301
548
|
const patterns = config.monorepo?.packages;
|
|
302
549
|
const readedPackages = readPackages({
|
|
@@ -349,7 +596,8 @@ async function getPackages({
|
|
|
349
596
|
from,
|
|
350
597
|
to,
|
|
351
598
|
config,
|
|
352
|
-
changelog: false
|
|
599
|
+
changelog: false,
|
|
600
|
+
dryRun
|
|
353
601
|
});
|
|
354
602
|
foundPaths.add(matchPath);
|
|
355
603
|
const dependencies = getPackageDependencies({
|
|
@@ -427,19 +675,21 @@ async function getPackageCommits({
|
|
|
427
675
|
from,
|
|
428
676
|
to,
|
|
429
677
|
config,
|
|
430
|
-
changelog
|
|
678
|
+
changelog,
|
|
679
|
+
dryRun = false
|
|
431
680
|
}) {
|
|
432
681
|
logger.debug(`Analyzing commits for ${pkg.name} since ${from} to ${to}`);
|
|
433
|
-
let actualFrom
|
|
682
|
+
let actualFrom;
|
|
434
683
|
if (from === NEW_PACKAGE_MARKER) {
|
|
435
684
|
const firstPackageCommit = getFirstPackageCommitHash(pkg.path, config.cwd);
|
|
436
|
-
if (firstPackageCommit) {
|
|
437
|
-
logger.debug(`${pkg.name} is a new package, using first package commit: ${firstPackageCommit.slice(0, 8)}`);
|
|
438
|
-
actualFrom = `${firstPackageCommit}^`;
|
|
439
|
-
} else {
|
|
685
|
+
if (!firstPackageCommit) {
|
|
440
686
|
logger.debug(`${pkg.name} has no commits yet, returning empty`);
|
|
441
687
|
return [];
|
|
442
688
|
}
|
|
689
|
+
logger.debug(`${pkg.name} is a new package, using first package commit: ${firstPackageCommit.slice(0, 8)}`);
|
|
690
|
+
actualFrom = `${firstPackageCommit}^`;
|
|
691
|
+
} else {
|
|
692
|
+
actualFrom = await reconcileFromTag({ from, to, config, dryRun });
|
|
443
693
|
}
|
|
444
694
|
const changelogConfig = {
|
|
445
695
|
...config,
|
|
@@ -1536,7 +1786,8 @@ async function getPackagesOrBumpedPackages({
|
|
|
1536
1786
|
config,
|
|
1537
1787
|
bumpResult,
|
|
1538
1788
|
suffix,
|
|
1539
|
-
force
|
|
1789
|
+
force,
|
|
1790
|
+
dryRun = false
|
|
1540
1791
|
}) {
|
|
1541
1792
|
if (bumpResult?.bumpedPackages && bumpResult.bumpedPackages.length > 0) {
|
|
1542
1793
|
return bumpResult.bumpedPackages;
|
|
@@ -1544,7 +1795,8 @@ async function getPackagesOrBumpedPackages({
|
|
|
1544
1795
|
return await getPackages({
|
|
1545
1796
|
config,
|
|
1546
1797
|
suffix,
|
|
1547
|
-
force
|
|
1798
|
+
force,
|
|
1799
|
+
dryRun
|
|
1548
1800
|
});
|
|
1549
1801
|
}
|
|
1550
1802
|
|
|
@@ -1975,7 +2227,8 @@ function getDefaultConfig() {
|
|
|
1975
2227
|
}
|
|
1976
2228
|
},
|
|
1977
2229
|
logLevel: "default",
|
|
1978
|
-
safetyCheck: true
|
|
2230
|
+
safetyCheck: true,
|
|
2231
|
+
detectRewrittenTags: true
|
|
1979
2232
|
};
|
|
1980
2233
|
}
|
|
1981
2234
|
function resolveTemplateDefaults(config) {
|
|
@@ -2680,7 +2933,8 @@ async function generateChangelog({
|
|
|
2680
2933
|
from: gitFromRef,
|
|
2681
2934
|
to: gitToRef,
|
|
2682
2935
|
config: { ...config, from: gitFromRef, to: gitToRef },
|
|
2683
|
-
changelog: true
|
|
2936
|
+
changelog: true,
|
|
2937
|
+
dryRun
|
|
2684
2938
|
});
|
|
2685
2939
|
const displayConfig = { ...config, from: displayFromTag, to: displayToTag };
|
|
2686
2940
|
const parts = await renderChangelogParts({
|
|
@@ -3035,7 +3289,8 @@ async function githubIndependentMode({
|
|
|
3035
3289
|
config,
|
|
3036
3290
|
bumpResult,
|
|
3037
3291
|
suffix,
|
|
3038
|
-
force
|
|
3292
|
+
force,
|
|
3293
|
+
dryRun
|
|
3039
3294
|
}));
|
|
3040
3295
|
logger.info(`Creating ${packages.length} GitHub release(s)`);
|
|
3041
3296
|
const postedReleases = [];
|
|
@@ -3156,7 +3411,8 @@ async function github(options) {
|
|
|
3156
3411
|
suffix: options.suffix,
|
|
3157
3412
|
changelog: true,
|
|
3158
3413
|
from,
|
|
3159
|
-
to
|
|
3414
|
+
to,
|
|
3415
|
+
dryRun
|
|
3160
3416
|
});
|
|
3161
3417
|
return await githubUnified({
|
|
3162
3418
|
config,
|
|
@@ -3243,7 +3499,8 @@ async function gitlabIndependentMode({
|
|
|
3243
3499
|
config,
|
|
3244
3500
|
bumpResult,
|
|
3245
3501
|
suffix,
|
|
3246
|
-
force
|
|
3502
|
+
force,
|
|
3503
|
+
dryRun
|
|
3247
3504
|
}));
|
|
3248
3505
|
logger.info(`Creating ${packages.length} GitLab release(s) for independent packages`);
|
|
3249
3506
|
logger.debug("Getting current branch...");
|
|
@@ -3417,7 +3674,8 @@ async function gitlab(options = {}) {
|
|
|
3417
3674
|
suffix: options.suffix,
|
|
3418
3675
|
changelog: true,
|
|
3419
3676
|
from,
|
|
3420
|
-
to
|
|
3677
|
+
to,
|
|
3678
|
+
dryRun
|
|
3421
3679
|
});
|
|
3422
3680
|
logger.debug(`Root package: ${getIndependentTag({ name: rootPackage.name, version: newVersion })}`);
|
|
3423
3681
|
return await gitlabUnified({
|
|
@@ -4265,7 +4523,8 @@ async function bumpUnifiedMode({
|
|
|
4265
4523
|
from,
|
|
4266
4524
|
to,
|
|
4267
4525
|
suffix,
|
|
4268
|
-
changelog: false
|
|
4526
|
+
changelog: false,
|
|
4527
|
+
dryRun
|
|
4269
4528
|
});
|
|
4270
4529
|
const currentVersion = rootPackage.version;
|
|
4271
4530
|
const newVersion = rootPackage.newVersion;
|
|
@@ -4279,7 +4538,8 @@ async function bumpUnifiedMode({
|
|
|
4279
4538
|
config,
|
|
4280
4539
|
suffix,
|
|
4281
4540
|
force,
|
|
4282
|
-
includeAll: true
|
|
4541
|
+
includeAll: true,
|
|
4542
|
+
dryRun
|
|
4283
4543
|
});
|
|
4284
4544
|
if (packages.length === 0) {
|
|
4285
4545
|
logger.debug("No packages to bump");
|
|
@@ -4349,7 +4609,8 @@ async function bumpSelectiveMode({
|
|
|
4349
4609
|
from,
|
|
4350
4610
|
to,
|
|
4351
4611
|
suffix,
|
|
4352
|
-
changelog: false
|
|
4612
|
+
changelog: false,
|
|
4613
|
+
dryRun
|
|
4353
4614
|
});
|
|
4354
4615
|
const currentVersion = rootPackage.version;
|
|
4355
4616
|
const newVersion = rootPackage.newVersion;
|
|
@@ -4362,7 +4623,8 @@ async function bumpSelectiveMode({
|
|
|
4362
4623
|
const packages = await getPackages({
|
|
4363
4624
|
config,
|
|
4364
4625
|
suffix,
|
|
4365
|
-
force
|
|
4626
|
+
force,
|
|
4627
|
+
dryRun
|
|
4366
4628
|
});
|
|
4367
4629
|
if (packages.length === 0) {
|
|
4368
4630
|
logger.debug("No packages to bump");
|
|
@@ -4430,7 +4692,8 @@ async function bumpIndependentMode({
|
|
|
4430
4692
|
const packagesToBump = await getPackages({
|
|
4431
4693
|
config,
|
|
4432
4694
|
suffix,
|
|
4433
|
-
force
|
|
4695
|
+
force,
|
|
4696
|
+
dryRun
|
|
4434
4697
|
});
|
|
4435
4698
|
if (packagesToBump.length === 0) {
|
|
4436
4699
|
logger.debug("No packages to bump");
|
|
@@ -4483,7 +4746,7 @@ async function bumpCanaryMode({
|
|
|
4483
4746
|
logger.debug("Starting bump in canary mode");
|
|
4484
4747
|
if (config.monorepo?.versionMode === "independent") {
|
|
4485
4748
|
const sha2 = getShortCommitSha(config.cwd);
|
|
4486
|
-
const packages2 = await getPackages({ config, suffix: void 0, force: false });
|
|
4749
|
+
const packages2 = await getPackages({ config, suffix: void 0, force: false, dryRun });
|
|
4487
4750
|
if (packages2.length === 0) {
|
|
4488
4751
|
logger.debug("No packages to bump");
|
|
4489
4752
|
return { bumped: false };
|
|
@@ -4506,7 +4769,8 @@ async function bumpCanaryMode({
|
|
|
4506
4769
|
from,
|
|
4507
4770
|
to,
|
|
4508
4771
|
config,
|
|
4509
|
-
changelog: false
|
|
4772
|
+
changelog: false,
|
|
4773
|
+
dryRun
|
|
4510
4774
|
});
|
|
4511
4775
|
const releaseType = determineSemverChange(commits, config.types);
|
|
4512
4776
|
const sha = getShortCommitSha(config.cwd);
|
|
@@ -4523,7 +4787,8 @@ async function bumpCanaryMode({
|
|
|
4523
4787
|
config,
|
|
4524
4788
|
suffix: void 0,
|
|
4525
4789
|
force: false,
|
|
4526
|
-
includeAll: isUnified
|
|
4790
|
+
includeAll: isUnified,
|
|
4791
|
+
dryRun
|
|
4527
4792
|
});
|
|
4528
4793
|
if (packages.length === 0) {
|
|
4529
4794
|
logger.debug("No packages to bump");
|
|
@@ -4772,7 +5037,8 @@ async function generateSimpleRootChangelog({
|
|
|
4772
5037
|
suffix,
|
|
4773
5038
|
changelog: true,
|
|
4774
5039
|
from: fromTag,
|
|
4775
|
-
to
|
|
5040
|
+
to,
|
|
5041
|
+
dryRun
|
|
4776
5042
|
});
|
|
4777
5043
|
logger.debug(`Generating ${rootPackage.name} changelog (${fromTag}...${to})`);
|
|
4778
5044
|
const rootChangelog = await generateChangelog({
|
|
@@ -4821,7 +5087,8 @@ async function changelog(options = {}) {
|
|
|
4821
5087
|
config,
|
|
4822
5088
|
bumpResult: options.bumpResult,
|
|
4823
5089
|
suffix: options.suffix,
|
|
4824
|
-
force: options.force ?? false
|
|
5090
|
+
force: options.force ?? false,
|
|
5091
|
+
dryRun
|
|
4825
5092
|
});
|
|
4826
5093
|
if (config.changelog?.rootChangelog && config.monorepo?.versionMode) {
|
|
4827
5094
|
if (config.monorepo.versionMode === "independent") {
|
|
@@ -5314,7 +5581,8 @@ async function publish(options = {}) {
|
|
|
5314
5581
|
config,
|
|
5315
5582
|
bumpResult: options.bumpResult,
|
|
5316
5583
|
suffix: options.suffix,
|
|
5317
|
-
force: options.force ?? false
|
|
5584
|
+
force: options.force ?? false,
|
|
5585
|
+
dryRun
|
|
5318
5586
|
});
|
|
5319
5587
|
const packages = filterOutPrivatePackages(discoveredPackages);
|
|
5320
5588
|
if (discoveredPackages.length !== packages.length) {
|
|
@@ -5644,7 +5912,8 @@ async function social(options = {}) {
|
|
|
5644
5912
|
suffix: void 0,
|
|
5645
5913
|
changelog: true,
|
|
5646
5914
|
from: fromTag,
|
|
5647
|
-
to
|
|
5915
|
+
to,
|
|
5916
|
+
dryRun
|
|
5648
5917
|
});
|
|
5649
5918
|
const minifiedBody = await generateChangelog({
|
|
5650
5919
|
pkg: { ...rootPackage, fromTag },
|
|
@@ -5716,7 +5985,8 @@ ${twitterChangelog}`);
|
|
|
5716
5985
|
from: fromTag,
|
|
5717
5986
|
to: "HEAD",
|
|
5718
5987
|
config,
|
|
5719
|
-
changelog: true
|
|
5988
|
+
changelog: true,
|
|
5989
|
+
dryRun
|
|
5720
5990
|
});
|
|
5721
5991
|
const slackResponse = await handleSlackPost({
|
|
5722
5992
|
config,
|
|
@@ -6095,4 +6365,4 @@ Git provider: ${provider}`);
|
|
|
6095
6365
|
}
|
|
6096
6366
|
}
|
|
6097
6367
|
|
|
6098
|
-
export {
|
|
6368
|
+
export { getAuthCommand as $, getModifiedReleaseFilePatterns as A, createCommitAndTags as B, pushCommitAndTags as C, rollbackModifiedFiles as D, getFirstCommit as E, getCurrentGitBranch as F, getCurrentGitRef as G, getShortCommitSha as H, isAncestor as I, getCommitSubject as J, findReachableCommitBySubject as K, tagExists as L, retagAnnotatedLocal as M, pushTagForce as N, github as O, createGitlabRelease as P, gitlab as Q, buildCompareLink as R, buildChangelogBody as S, collectContributorNames as T, buildContributors as U, generateMarkDown as V, parseChangelogMarkdown as W, detectPackageManager as X, determinePublishTag as Y, getPackagesToPublishInSelectiveMode as Z, getPackagesToPublishInIndependentMode as _, buildCommentBody as a, publishPackage as a0, collectPackageBumps as a1, findGitHubPR as a2, findGitLabMR as a3, detectPullRequest as a4, PR_COMMENT_MARKER as a5, postPrComment as a6, readPackageJson as a7, getRootPackage as a8, readPackages as a9, executeFormatCmd as aA, executeBuildCmd as aB, isBumpedPackage as aC, filterOutPrivatePackages as aD, getPackagesOrBumpedPackages as aE, isGraduatingToStableBetweenVersion as aF, capReleaseTypeForZeroMajor as aG, determineSemverChange as aH, determineReleaseType as aI, writeVersion as aJ, getPackageNewVersion as aK, updateLernaVersion as aL, extractVersionFromPackageTag as aM, isPrerelease as aN, isStableReleaseType as aO, isPrereleaseReleaseType as aP, isGraduating as aQ, getPreid as aR, isChangedPreid as aS, getBumpedPackageIndependently as aT, confirmBump as aU, getBumpedIndependentPackages as aV, shouldFilterPrereleaseTags as aW, extractVersionFromTag as aX, getCanaryVersion as aY, isTagVersionCompatibleWithCurrent as aZ, getPackages as aa, getPackageCommits as ab, hasLernaJson as ac, resetRewrittenTagCache as ad, reconcileFromTag as ae, getSlackToken as af, getSlackWebhookUrl as ag, formatChangelogForSlack as ah, formatPackagesForSlack as ai, formatSlackMessage as aj, postReleaseToSlack as ak, extractChangelogSummary as al, getReleaseUrl as am, getIndependentTag as an, getLastStableTag as ao, getLastTag as ap, getLastRepoTag as aq, getLastPackageTag as ar, NEW_PACKAGE_MARKER as as, resolveTags as at, getTwitterCredentials as au, formatTweetMessage as av, postReleaseToTwitter as aw, executeHook as ax, isInCI as ay, getCIName as az, bump as b, changelog as c, providerReleaseSafetyCheck as d, providerRelease as e, publishSafetyCheck as f, publish as g, social as h, generateChangelog as i, getDefaultConfig as j, defineConfig as k, loadRelizyConfig as l, mergeTypes as m, getPackageDependencies as n, getDependentsOf as o, prComment as p, expandPackagesToBumpWithDependents as q, release as r, socialSafetyCheck as s, topologicalSort as t, getGitStatus as u, checkGitStatusIfDirty as v, writeChangelogToFile as w, fetchGitTags as x, detectGitProvider as y, parseGitRemoteUrl as z };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "relizy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.7",
|
|
5
5
|
"description": "Changelogen adapter for monorepo management with unified and independent versioning",
|
|
6
6
|
"author": "Louis Mazel <me@loicmazuel.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@slack/web-api": "^7.0.0",
|
|
59
|
-
"@yoloship/claude-sdk": "^0.
|
|
59
|
+
"@yoloship/claude-sdk": "^0.2.0-beta.6",
|
|
60
60
|
"twitter-api-v2": "^1.20.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependenciesMeta": {
|
|
@@ -71,40 +71,40 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@inquirer/prompts": "^8.
|
|
74
|
+
"@inquirer/prompts": "^8.5.2",
|
|
75
75
|
"@maz-ui/node": "4.6.1",
|
|
76
76
|
"@maz-ui/utils": "^4.7.6",
|
|
77
77
|
"c12": "^3.3.3",
|
|
78
78
|
"changelogen": "^0.6.2",
|
|
79
|
-
"commander": "^
|
|
79
|
+
"commander": "^15.0.0",
|
|
80
80
|
"convert-gitmoji": "^0.1.5",
|
|
81
81
|
"defu": "6.1.7",
|
|
82
82
|
"fast-glob": "^3.3.2",
|
|
83
83
|
"node-fetch-native": "^1.6.7",
|
|
84
|
-
"semver": "^7.
|
|
84
|
+
"semver": "^7.8.3"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@commitlint/cli": "^
|
|
88
|
-
"@commitlint/config-conventional": "
|
|
89
|
-
"@commitlint/cz-commitlint": "^
|
|
90
|
-
"@commitlint/types": "^
|
|
87
|
+
"@commitlint/cli": "^21.0.2",
|
|
88
|
+
"@commitlint/config-conventional": "21.0.2",
|
|
89
|
+
"@commitlint/cz-commitlint": "^21.0.2",
|
|
90
|
+
"@commitlint/types": "^21.0.1",
|
|
91
91
|
"@maz-ui/eslint-config": "^4.9.1",
|
|
92
|
-
"@slack/web-api": "7.
|
|
93
|
-
"@types/node": "^25.
|
|
92
|
+
"@slack/web-api": "7.16.0",
|
|
93
|
+
"@types/node": "^25.9.2",
|
|
94
94
|
"@types/semver": "^7.7.1",
|
|
95
|
-
"@vitest/coverage-v8": "^4.1.
|
|
96
|
-
"@yoloship/claude-sdk": "0.
|
|
95
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
96
|
+
"@yoloship/claude-sdk": "0.2.0-beta.6",
|
|
97
97
|
"cross-env": "10.1.0",
|
|
98
|
-
"eslint": "^10.
|
|
98
|
+
"eslint": "^10.4.1",
|
|
99
99
|
"husky": "9.1.7",
|
|
100
|
-
"jiti": "2.
|
|
101
|
-
"lint-staged": "^
|
|
102
|
-
"memfs": "^4.57.
|
|
103
|
-
"tsx": "^4.
|
|
100
|
+
"jiti": "2.7.0",
|
|
101
|
+
"lint-staged": "^17.0.7",
|
|
102
|
+
"memfs": "^4.57.6",
|
|
103
|
+
"tsx": "^4.22.4",
|
|
104
104
|
"twitter-api-v2": "^1.29.0",
|
|
105
|
-
"typescript": "^
|
|
105
|
+
"typescript": "^6.0.3",
|
|
106
106
|
"unbuild": "^3.6.1",
|
|
107
|
-
"vitest": "^4.1.
|
|
107
|
+
"vitest": "^4.1.8"
|
|
108
108
|
},
|
|
109
109
|
"lint-staged": {
|
|
110
110
|
"*.{js,jsx,ts,tsx,mjs,mts,cjs,md,yml,json}": [
|