relizy 1.7.0 → 1.8.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/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 { aC as isInCI, V as getCIName, h as bump, j as changelog, aT as publish, aR as providerRelease, ba as social, aQ as prComment, b0 as release } from './shared/relizy.uCxVVpbQ.mjs';
8
+ import { aD as isInCI, W as getCIName, h as bump, j as changelog, aV as publish, aT as providerRelease, bc as social, aS as prComment, b2 as release } from './shared/relizy.BljqIKug.mjs';
9
9
  import 'node:child_process';
10
10
  import '@maz-ui/utils/helpers/formatJson';
11
11
  import 'c12';
@@ -13,9 +13,9 @@ import 'changelogen';
13
13
  import 'defu';
14
14
  import '@inquirer/prompts';
15
15
  import 'micromatch';
16
+ import 'semver';
16
17
  import '@maz-ui/utils/helpers/getErrorMessage';
17
18
  import 'fast-glob';
18
- import 'semver';
19
19
  import '@maz-ui/utils/helpers/upperFirst';
20
20
  import 'convert-gitmoji';
21
21
  import 'node-fetch-native';
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { LogLevel } from '@maz-ui/node';
2
+ import { LanguageModel, CallSettings } from 'ai';
2
3
  import { RawGitCommit, GitCommit, ChangelogConfig as ChangelogConfig$1, SemverBumpType } from 'changelogen';
3
4
  import { ReleaseType } from 'semver';
4
5
  import { DeepPartial } from '@maz-ui/utils/ts-helpers/DeepPartial';
@@ -283,6 +284,16 @@ declare function findReachableCommitBySubject(subject: string, to: string, cwd?:
283
284
  * Returns true when a tag with the given name exists locally.
284
285
  */
285
286
  declare function tagExists(tag: string, cwd?: string): Promise<boolean>;
287
+ /**
288
+ * Returns the local tags, most recent first (`--sort=-creatordate`). With
289
+ * `pattern` (a `git tag --list` glob, e.g. `v*`), only the tags matching it are
290
+ * listed. Any error returns an empty list.
291
+ */
292
+ declare function listTags({ pattern, cwd, logLevel, }?: {
293
+ pattern?: string;
294
+ cwd?: string;
295
+ logLevel?: LogLevel;
296
+ }): Promise<string[]>;
286
297
  /**
287
298
  * Move an annotated tag to a different commit locally (force). Never rewrites
288
299
  * any commit; only the tag pointer moves.
@@ -752,9 +763,20 @@ declare function getLastTag({ logLevel, cwd }: {
752
763
  logLevel?: LogLevel;
753
764
  cwd?: string;
754
765
  }): Promise<string>;
766
+ /**
767
+ * Returns the version of a repository tag built from `templates.tagBody` (e.g. `v{{newVersion}}`),
768
+ * or null when the tag does not follow the template. This keeps the tags of other packages
769
+ * (e.g. `@scope/pkg@1.2.3` or `vue-utils@1.2.3` from an independent release in the same
770
+ * repository) out of the repository range.
771
+ */
772
+ declare function extractVersionFromRepoTag(tag: string, tagBody: string): string | null;
755
773
  declare function getLastRepoTag(options?: {
756
774
  onlyStable?: boolean;
757
775
  pkg?: ReadPackage;
776
+ /** Template of the repository tags (`templates.tagBody`) */
777
+ tagBody?: string;
778
+ /** Version before the bump, when higher than `pkg.version` (e.g. the root version for a sub-package) */
779
+ currentVersion?: string;
758
780
  logLevel?: LogLevel;
759
781
  cwd?: string;
760
782
  }): Promise<string | null>;
@@ -1823,7 +1845,7 @@ interface SlackSocialConfig {
1823
1845
  */
1824
1846
  noPackages?: boolean;
1825
1847
  }
1826
- type AIProviderName = 'claude-code';
1848
+ type AIProviderName = 'claude-code' | 'ai-sdk';
1827
1849
  interface ClaudeCodeProviderOptions {
1828
1850
  /**
1829
1851
  * Anthropic API key.
@@ -1841,6 +1863,19 @@ interface ClaudeCodeProviderOptions {
1841
1863
  */
1842
1864
  model?: string;
1843
1865
  }
1866
+ interface AiSdkProviderOptions {
1867
+ /**
1868
+ * Language model: an instance from a provider package (e.g. `openai('gpt-5-mini')`
1869
+ * from `@ai-sdk/openai`), or a model id of the Vercel AI Gateway (e.g. `'openai/gpt-5-mini'`).
1870
+ * @see https://ai-sdk.dev/providers/ai-sdk-providers
1871
+ */
1872
+ model: LanguageModel;
1873
+ /**
1874
+ * Reasoning effort, for the models that support it.
1875
+ * Not sent when unset: the default of the provider applies.
1876
+ */
1877
+ reasoning?: CallSettings['reasoning'];
1878
+ }
1844
1879
  type AIPromptTarget = 'providerRelease' | 'twitter' | 'slack';
1845
1880
  type AISystemPromptOverrides = Partial<Record<AIPromptTarget, string>>;
1846
1881
  interface AITargetConfig {
@@ -1871,6 +1906,7 @@ interface AIConfig {
1871
1906
  */
1872
1907
  providers?: {
1873
1908
  'claude-code'?: ClaudeCodeProviderOptions;
1909
+ 'ai-sdk'?: AiSdkProviderOptions;
1874
1910
  };
1875
1911
  /**
1876
1912
  * Output language (ISO 639-1 code or plain English name).
@@ -2355,5 +2391,5 @@ declare function socialSafetyCheck({ config }: {
2355
2391
  }): Promise<void>;
2356
2392
  declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
2357
2393
 
2358
- export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, assertBranchUpToDateWithRemote, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, 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, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitChangedFiles, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, globDirsAbsolute, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
2359
- export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, RegistryTarget, 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 };
2394
+ export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, assertBranchUpToDateWithRemote, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromRepoTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitChangedFiles, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, globDirsAbsolute, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, listTags, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
2395
+ export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, AiSdkProviderOptions, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, RegistryTarget, 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
@@ -1,4 +1,5 @@
1
1
  import { LogLevel } from '@maz-ui/node';
2
+ import { LanguageModel, CallSettings } from 'ai';
2
3
  import { RawGitCommit, GitCommit, ChangelogConfig as ChangelogConfig$1, SemverBumpType } from 'changelogen';
3
4
  import { ReleaseType } from 'semver';
4
5
  import { DeepPartial } from '@maz-ui/utils/ts-helpers/DeepPartial';
@@ -283,6 +284,16 @@ declare function findReachableCommitBySubject(subject: string, to: string, cwd?:
283
284
  * Returns true when a tag with the given name exists locally.
284
285
  */
285
286
  declare function tagExists(tag: string, cwd?: string): Promise<boolean>;
287
+ /**
288
+ * Returns the local tags, most recent first (`--sort=-creatordate`). With
289
+ * `pattern` (a `git tag --list` glob, e.g. `v*`), only the tags matching it are
290
+ * listed. Any error returns an empty list.
291
+ */
292
+ declare function listTags({ pattern, cwd, logLevel, }?: {
293
+ pattern?: string;
294
+ cwd?: string;
295
+ logLevel?: LogLevel;
296
+ }): Promise<string[]>;
286
297
  /**
287
298
  * Move an annotated tag to a different commit locally (force). Never rewrites
288
299
  * any commit; only the tag pointer moves.
@@ -752,9 +763,20 @@ declare function getLastTag({ logLevel, cwd }: {
752
763
  logLevel?: LogLevel;
753
764
  cwd?: string;
754
765
  }): Promise<string>;
766
+ /**
767
+ * Returns the version of a repository tag built from `templates.tagBody` (e.g. `v{{newVersion}}`),
768
+ * or null when the tag does not follow the template. This keeps the tags of other packages
769
+ * (e.g. `@scope/pkg@1.2.3` or `vue-utils@1.2.3` from an independent release in the same
770
+ * repository) out of the repository range.
771
+ */
772
+ declare function extractVersionFromRepoTag(tag: string, tagBody: string): string | null;
755
773
  declare function getLastRepoTag(options?: {
756
774
  onlyStable?: boolean;
757
775
  pkg?: ReadPackage;
776
+ /** Template of the repository tags (`templates.tagBody`) */
777
+ tagBody?: string;
778
+ /** Version before the bump, when higher than `pkg.version` (e.g. the root version for a sub-package) */
779
+ currentVersion?: string;
758
780
  logLevel?: LogLevel;
759
781
  cwd?: string;
760
782
  }): Promise<string | null>;
@@ -1823,7 +1845,7 @@ interface SlackSocialConfig {
1823
1845
  */
1824
1846
  noPackages?: boolean;
1825
1847
  }
1826
- type AIProviderName = 'claude-code';
1848
+ type AIProviderName = 'claude-code' | 'ai-sdk';
1827
1849
  interface ClaudeCodeProviderOptions {
1828
1850
  /**
1829
1851
  * Anthropic API key.
@@ -1841,6 +1863,19 @@ interface ClaudeCodeProviderOptions {
1841
1863
  */
1842
1864
  model?: string;
1843
1865
  }
1866
+ interface AiSdkProviderOptions {
1867
+ /**
1868
+ * Language model: an instance from a provider package (e.g. `openai('gpt-5-mini')`
1869
+ * from `@ai-sdk/openai`), or a model id of the Vercel AI Gateway (e.g. `'openai/gpt-5-mini'`).
1870
+ * @see https://ai-sdk.dev/providers/ai-sdk-providers
1871
+ */
1872
+ model: LanguageModel;
1873
+ /**
1874
+ * Reasoning effort, for the models that support it.
1875
+ * Not sent when unset: the default of the provider applies.
1876
+ */
1877
+ reasoning?: CallSettings['reasoning'];
1878
+ }
1844
1879
  type AIPromptTarget = 'providerRelease' | 'twitter' | 'slack';
1845
1880
  type AISystemPromptOverrides = Partial<Record<AIPromptTarget, string>>;
1846
1881
  interface AITargetConfig {
@@ -1871,6 +1906,7 @@ interface AIConfig {
1871
1906
  */
1872
1907
  providers?: {
1873
1908
  'claude-code'?: ClaudeCodeProviderOptions;
1909
+ 'ai-sdk'?: AiSdkProviderOptions;
1874
1910
  };
1875
1911
  /**
1876
1912
  * Output language (ISO 639-1 code or plain English name).
@@ -2355,5 +2391,5 @@ declare function socialSafetyCheck({ config }: {
2355
2391
  }): Promise<void>;
2356
2392
  declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
2357
2393
 
2358
- export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, assertBranchUpToDateWithRemote, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, 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, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitChangedFiles, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, globDirsAbsolute, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
2359
- export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, RegistryTarget, 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 };
2394
+ export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, assertBranchUpToDateWithRemote, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromRepoTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitChangedFiles, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, globDirsAbsolute, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, listTags, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
2395
+ export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, AiSdkProviderOptions, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, RegistryTarget, 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 { N as NEW_PACKAGE_MARKER, P as PR_COMMENT_MARKER, a as assertBranchUpToDateWithRemote, b as assertReleaseTagsAvailable, c as buildChangelogBody, d as buildCommentBody, e as buildCompareLink, f as buildContributors, g as buildReleaseSummary, h as bump, i as capReleaseTypeForZeroMajor, j as changelog, k as checkGitStatusIfDirty, l as collectContributorNames, m as collectPackageBumps, n as confirmBump, o as createCommitAndTags, p as createGitlabRelease, q as defineConfig, r as detectGitProvider, s as detectPackageManager, t as detectPullRequest, u as determinePublishTag, v as determineReleaseType, w as determineSemverChange, x as executeBuildCmd, y as executeFormatCmd, z as executeHook, A as expandPackagesToBumpWithDependents, B as extractChangelogSummary, C as extractVersionFromPackageTag, D as extractVersionFromTag, E as fetchGitTags, F as filterOutPrivatePackages, G as filterPrivatePackagesUnlessIncluded, H as findGitHubPR, I as findGitLabMR, J as findReachableCommitBySubject, K as formatChangelogForSlack, L as formatPackagesForSlack, M as formatSlackMessage, O as formatTweetMessage, Q as generateChangelog, R as generateMarkDown, S as getAuthCommand, T as getBumpedIndependentPackages, U as getBumpedPackageIndependently, V as getCIName, W as getCanaryVersion, X as getCommitChangedFiles, Y as getCommitSubject, Z as getCurrentGitBranch, _ as getCurrentGitRef, $ as getDefaultConfig, a0 as getDependentsOf, a1 as getFirstCommit, a2 as getGitDiff, a3 as getGitStatus, a4 as getGitUpstream, a5 as getIndependentTag, a6 as getLastPackageTag, a7 as getLastRepoTag, a8 as getLastStableTag, a9 as getLastTag, aa as getModifiedReleaseFilePatterns, ab as getNewPackageCompareBase, ac as getNpmRegistry, ad as getPackageCommits, ae as getPackageDependencies, af as getPackageNewVersion, ag as getPackages, ah as getPackagesOrBumpedPackages, ai as getPackagesToPublishInIndependentMode, aj as getPackagesToPublishInSelectiveMode, ak as getPreid, al as getReleaseTagNames, am as getReleaseUrl, an as getRootPackage, ao as getShortCommitSha, ap as getSlackToken, aq as getSlackWebhookUrl, ar as getTwitterCredentials, as as github, at as gitlab, au as globDirsAbsolute, av as hasLernaJson, aw as isAncestor, ax as isBumpedPackage, ay as isChangedPreid, az as isCommitOnlyInIgnoredPackages, aA as isGraduating, aB as isGraduatingToStableBetweenVersion, aC as isInCI, aD as isPrerelease, aE as isPrereleaseReleaseType, aF as isStableReleaseType, aG as isTagVersionCompatibleWithCurrent, aH as isVersionAlreadyPublishedError, aI as isVersionPublished, aJ as loadRelizyConfig, aK as mergeTypes, aL as parseChangelogMarkdown, aM as parseGitRemoteUrl, aN as postPrComment, aO as postReleaseToSlack, aP as postReleaseToTwitter, aQ as prComment, aR as providerRelease, aS as providerReleaseSafetyCheck, aT as publish, aU as publishPackage, aV as publishSafetyCheck, aW as pushCommitAndTags, aX as pushTagForce, aY as readPackageJson, aZ as readPackages, a_ as reconcileFromTag, a$ as redactSecrets, b0 as release, b1 as resetRewrittenTagCache, b2 as resolveAllConfiguredRegistryTargets, b3 as resolveIgnoredPackagePaths, b4 as resolveRegistryTargetsForPackage, b5 as resolveRegistryTargetsForPackages, b6 as resolveTags, b7 as retagAnnotatedLocal, b8 as rollbackModifiedFiles, b9 as shouldFilterPrereleaseTags, ba as social, bb as socialSafetyCheck, bc as tagExists, bd as topologicalSort, be as tryPostPrComment, bf as updateLernaVersion, bg as withRegistryNpmrc, bh as writeChangelogToFile, bi as writeVersion } from './shared/relizy.uCxVVpbQ.mjs';
1
+ export { N as NEW_PACKAGE_MARKER, P as PR_COMMENT_MARKER, a as assertBranchUpToDateWithRemote, b as assertReleaseTagsAvailable, c as buildChangelogBody, d as buildCommentBody, e as buildCompareLink, f as buildContributors, g as buildReleaseSummary, h as bump, i as capReleaseTypeForZeroMajor, j as changelog, k as checkGitStatusIfDirty, l as collectContributorNames, m as collectPackageBumps, n as confirmBump, o as createCommitAndTags, p as createGitlabRelease, q as defineConfig, r as detectGitProvider, s as detectPackageManager, t as detectPullRequest, u as determinePublishTag, v as determineReleaseType, w as determineSemverChange, x as executeBuildCmd, y as executeFormatCmd, z as executeHook, A as expandPackagesToBumpWithDependents, B as extractChangelogSummary, C as extractVersionFromPackageTag, D as extractVersionFromRepoTag, E as extractVersionFromTag, F as fetchGitTags, G as filterOutPrivatePackages, H as filterPrivatePackagesUnlessIncluded, I as findGitHubPR, J as findGitLabMR, K as findReachableCommitBySubject, L as formatChangelogForSlack, M as formatPackagesForSlack, O as formatSlackMessage, Q as formatTweetMessage, R as generateChangelog, S as generateMarkDown, T as getAuthCommand, U as getBumpedIndependentPackages, V as getBumpedPackageIndependently, W as getCIName, X as getCanaryVersion, Y as getCommitChangedFiles, Z as getCommitSubject, _ as getCurrentGitBranch, $ as getCurrentGitRef, a0 as getDefaultConfig, a1 as getDependentsOf, a2 as getFirstCommit, a3 as getGitDiff, a4 as getGitStatus, a5 as getGitUpstream, a6 as getIndependentTag, a7 as getLastPackageTag, a8 as getLastRepoTag, a9 as getLastStableTag, aa as getLastTag, ab as getModifiedReleaseFilePatterns, ac as getNewPackageCompareBase, ad as getNpmRegistry, ae as getPackageCommits, af as getPackageDependencies, ag as getPackageNewVersion, ah as getPackages, ai as getPackagesOrBumpedPackages, aj as getPackagesToPublishInIndependentMode, ak as getPackagesToPublishInSelectiveMode, al as getPreid, am as getReleaseTagNames, an as getReleaseUrl, ao as getRootPackage, ap as getShortCommitSha, aq as getSlackToken, ar as getSlackWebhookUrl, as as getTwitterCredentials, at as github, au as gitlab, av as globDirsAbsolute, aw as hasLernaJson, ax as isAncestor, ay as isBumpedPackage, az as isChangedPreid, aA as isCommitOnlyInIgnoredPackages, aB as isGraduating, aC as isGraduatingToStableBetweenVersion, aD as isInCI, aE as isPrerelease, aF as isPrereleaseReleaseType, aG as isStableReleaseType, aH as isTagVersionCompatibleWithCurrent, aI as isVersionAlreadyPublishedError, aJ as isVersionPublished, aK as listTags, aL as loadRelizyConfig, aM as mergeTypes, aN as parseChangelogMarkdown, aO as parseGitRemoteUrl, aP as postPrComment, aQ as postReleaseToSlack, aR as postReleaseToTwitter, aS as prComment, aT as providerRelease, aU as providerReleaseSafetyCheck, aV as publish, aW as publishPackage, aX as publishSafetyCheck, aY as pushCommitAndTags, aZ as pushTagForce, a_ as readPackageJson, a$ as readPackages, b0 as reconcileFromTag, b1 as redactSecrets, b2 as release, b3 as resetRewrittenTagCache, b4 as resolveAllConfiguredRegistryTargets, b5 as resolveIgnoredPackagePaths, b6 as resolveRegistryTargetsForPackage, b7 as resolveRegistryTargetsForPackages, b8 as resolveTags, b9 as retagAnnotatedLocal, ba as rollbackModifiedFiles, bb as shouldFilterPrereleaseTags, bc as social, bd as socialSafetyCheck, be as tagExists, bf as topologicalSort, bg as tryPostPrComment, bh as updateLernaVersion, bi as withRegistryNpmrc, bj as writeChangelogToFile, bk as writeVersion } from './shared/relizy.BljqIKug.mjs';
2
2
  import '@maz-ui/node';
3
3
  import 'node:child_process';
4
4
  import 'node:process';
@@ -10,9 +10,9 @@ import 'node:fs';
10
10
  import 'node:path';
11
11
  import '@inquirer/prompts';
12
12
  import 'micromatch';
13
+ import 'semver';
13
14
  import '@maz-ui/utils/helpers/getErrorMessage';
14
15
  import 'fast-glob';
15
- import 'semver';
16
16
  import '@maz-ui/utils/helpers/upperFirst';
17
17
  import 'convert-gitmoji';
18
18
  import 'node-fetch-native';
@@ -1,4 +1,4 @@
1
- import { logger, execPromise } from '@maz-ui/node';
1
+ import { execPromise, logger } from '@maz-ui/node';
2
2
  import { execSync, spawnSync } from 'node:child_process';
3
3
  import process$1 from 'node:process';
4
4
  import { formatJson } from '@maz-ui/utils/helpers/formatJson';
@@ -9,13 +9,118 @@ import { existsSync, readFileSync, statSync, writeFileSync, rmSync } from 'node:
9
9
  import path, { join, relative, sep } from 'node:path';
10
10
  import { select, confirm, input } from '@inquirer/prompts';
11
11
  import micromatch from 'micromatch';
12
+ import * as semver from 'semver';
12
13
  import { getErrorMessage } from '@maz-ui/utils/helpers/getErrorMessage';
13
14
  import fastGlob from 'fast-glob';
14
- import * as semver from 'semver';
15
15
  import { upperFirst } from '@maz-ui/utils/helpers/upperFirst';
16
16
  import { convert } from 'convert-gitmoji';
17
17
  import { fetch as fetch$1 } from 'node-fetch-native';
18
18
 
19
+ function shellSingleQuote(value) {
20
+ return `'${value.replaceAll("'", "'\\''")}'`;
21
+ }
22
+ async function isAncestor(ancestor, descendant, cwd) {
23
+ try {
24
+ await execPromise(
25
+ `git merge-base --is-ancestor ${shellSingleQuote(ancestor)} ${shellSingleQuote(descendant)}`,
26
+ { cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
27
+ );
28
+ return true;
29
+ } catch {
30
+ return false;
31
+ }
32
+ }
33
+ async function getCommitSubject(ref, cwd) {
34
+ try {
35
+ const { stdout } = await execPromise(
36
+ `git log -1 --format=%s ${shellSingleQuote(ref)}`,
37
+ { cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
38
+ );
39
+ return stdout.trim() || null;
40
+ } catch {
41
+ return null;
42
+ }
43
+ }
44
+ async function findReachableCommitBySubject(subject, to, cwd) {
45
+ try {
46
+ const { stdout } = await execPromise(
47
+ `git log ${shellSingleQuote(to)} --grep=${shellSingleQuote(subject)} --fixed-strings --format=%H -n 1`,
48
+ { cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
49
+ );
50
+ return stdout.trim().split("\n")[0]?.trim() || null;
51
+ } catch {
52
+ return null;
53
+ }
54
+ }
55
+ async function tagExists(tag, cwd) {
56
+ try {
57
+ const tagRef = `refs/tags/${tag}`;
58
+ await execPromise(
59
+ `git rev-parse --verify --quiet ${shellSingleQuote(tagRef)}`,
60
+ { cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
61
+ );
62
+ return true;
63
+ } catch {
64
+ return false;
65
+ }
66
+ }
67
+ const LIST_TAGS_MAX_BUFFER = 64 * 1024 * 1024;
68
+ async function listTags({
69
+ pattern,
70
+ cwd,
71
+ logLevel
72
+ } = {}) {
73
+ const list = pattern ? ` --list ${shellSingleQuote(pattern)}` : "";
74
+ try {
75
+ const { stdout } = await execPromise(
76
+ `git tag${list} --sort=-creatordate`,
77
+ { cwd, logLevel, noStderr: true, noStdout: true, noSuccess: true, maxBuffer: LIST_TAGS_MAX_BUFFER }
78
+ );
79
+ return stdout.trim().split("\n").filter((tag) => tag.length > 0);
80
+ } catch {
81
+ return [];
82
+ }
83
+ }
84
+ async function retagAnnotatedLocal({
85
+ tag,
86
+ commit,
87
+ message,
88
+ signed,
89
+ cwd,
90
+ logLevel
91
+ }) {
92
+ const sign = signed ? "-s " : "";
93
+ await execPromise(
94
+ `git tag -f ${sign}-a ${shellSingleQuote(tag)} ${shellSingleQuote(commit)} -m ${shellSingleQuote(message)}`,
95
+ { cwd, logLevel, noStderr: true, noStdout: true }
96
+ );
97
+ }
98
+ async function pushTagForce(tag, cwd, logLevel) {
99
+ await execPromise(
100
+ `git push origin ${shellSingleQuote(tag)} --force`,
101
+ { cwd, logLevel, noStderr: true, noStdout: true }
102
+ );
103
+ }
104
+ const COMMIT_SEPARATOR = "";
105
+ const FIELD_SEPARATOR = "";
106
+ function getGitDiff(from, to = "HEAD", cwd) {
107
+ const range = from ? `${from}...${to}` : to;
108
+ const output = execSync(
109
+ `git --no-pager log "${range}" --pretty="%x1E%s%x1F%h%x1F%an%x1F%ae%n%b" --name-status`,
110
+ { cwd, encoding: "utf8" }
111
+ ).trim();
112
+ return output.split(COMMIT_SEPARATOR).slice(1).map((record) => {
113
+ const [firstLine = "", ...body] = record.split("\n");
114
+ const [message = "", shortHash = "", authorName = "", authorEmail = ""] = firstLine.split(FIELD_SEPARATOR);
115
+ return {
116
+ message,
117
+ shortHash,
118
+ author: { name: authorName, email: authorEmail },
119
+ body: body.join("\n")
120
+ };
121
+ });
122
+ }
123
+
19
124
  function getPackageDependencies({
20
125
  packagePath,
21
126
  allPackageNames,
@@ -134,94 +239,6 @@ function topologicalSort(packages) {
134
239
  return sorted;
135
240
  }
136
241
 
137
- function shellSingleQuote(value) {
138
- return `'${value.replaceAll("'", "'\\''")}'`;
139
- }
140
- async function isAncestor(ancestor, descendant, cwd) {
141
- try {
142
- await execPromise(
143
- `git merge-base --is-ancestor ${shellSingleQuote(ancestor)} ${shellSingleQuote(descendant)}`,
144
- { cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
145
- );
146
- return true;
147
- } catch {
148
- return false;
149
- }
150
- }
151
- async function getCommitSubject(ref, cwd) {
152
- try {
153
- const { stdout } = await execPromise(
154
- `git log -1 --format=%s ${shellSingleQuote(ref)}`,
155
- { cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
156
- );
157
- return stdout.trim() || null;
158
- } catch {
159
- return null;
160
- }
161
- }
162
- async function findReachableCommitBySubject(subject, to, cwd) {
163
- try {
164
- const { stdout } = await execPromise(
165
- `git log ${shellSingleQuote(to)} --grep=${shellSingleQuote(subject)} --fixed-strings --format=%H -n 1`,
166
- { cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
167
- );
168
- return stdout.trim().split("\n")[0]?.trim() || null;
169
- } catch {
170
- return null;
171
- }
172
- }
173
- async function tagExists(tag, cwd) {
174
- try {
175
- const tagRef = `refs/tags/${tag}`;
176
- await execPromise(
177
- `git rev-parse --verify --quiet ${shellSingleQuote(tagRef)}`,
178
- { cwd, noStderr: true, noStdout: true, noSuccess: true, noError: true }
179
- );
180
- return true;
181
- } catch {
182
- return false;
183
- }
184
- }
185
- async function retagAnnotatedLocal({
186
- tag,
187
- commit,
188
- message,
189
- signed,
190
- cwd,
191
- logLevel
192
- }) {
193
- const sign = signed ? "-s " : "";
194
- await execPromise(
195
- `git tag -f ${sign}-a ${shellSingleQuote(tag)} ${shellSingleQuote(commit)} -m ${shellSingleQuote(message)}`,
196
- { cwd, logLevel, noStderr: true, noStdout: true }
197
- );
198
- }
199
- async function pushTagForce(tag, cwd, logLevel) {
200
- await execPromise(
201
- `git push origin ${shellSingleQuote(tag)} --force`,
202
- { cwd, logLevel, noStderr: true, noStdout: true }
203
- );
204
- }
205
- const COMMIT_SEPARATOR = "";
206
- const FIELD_SEPARATOR = "";
207
- function getGitDiff(from, to = "HEAD", cwd) {
208
- const range = from ? `${from}...${to}` : to;
209
- const output = execSync(
210
- `git --no-pager log "${range}" --pretty="%x1E%s%x1F%h%x1F%an%x1F%ae%n%b" --name-status`,
211
- { cwd, encoding: "utf8" }
212
- ).trim();
213
- return output.split(COMMIT_SEPARATOR).slice(1).map((record) => {
214
- const [firstLine = "", ...body] = record.split("\n");
215
- const [message = "", shortHash = "", authorName = "", authorEmail = ""] = firstLine.split(FIELD_SEPARATOR);
216
- return {
217
- message,
218
- shortHash,
219
- author: { name: authorName, email: authorEmail },
220
- body: body.join("\n")
221
- };
222
- });
223
- }
224
-
225
242
  const sessionCache = /* @__PURE__ */ new Map();
226
243
  function resetRewrittenTagCache() {
227
244
  sessionCache.clear();
@@ -1104,7 +1121,7 @@ function updateLernaVersion({
1104
1121
  logger.fail(`Unable to update lerna.json: ${error}`);
1105
1122
  }
1106
1123
  }
1107
- function extractVersionFromPackageTag(tag) {
1124
+ function extractVersionFromPackageTag$1(tag) {
1108
1125
  const atIndex = tag.lastIndexOf("@");
1109
1126
  if (atIndex === -1) {
1110
1127
  return null;
@@ -1399,7 +1416,7 @@ function getIndependentTag({ version, name }) {
1399
1416
  }
1400
1417
  async function getLastStableTag({ logLevel, cwd }) {
1401
1418
  const { stdout } = await execPromise(
1402
- `git tag --sort=-creatordate | grep -E '^[^0-9]*[0-9]+\\.[0-9]+\\.[0-9]+$' | head -n 1`,
1419
+ `git tag --sort=-creatordate | grep -E '^[^0-9@]*[0-9]+\\.[0-9]+\\.[0-9]+$' | head -n 1`,
1403
1420
  {
1404
1421
  logLevel,
1405
1422
  noStderr: true,
@@ -1424,81 +1441,132 @@ async function getLastTag({ logLevel, cwd }) {
1424
1441
  logger.debug("Last tag:", lastTag || "No tags found");
1425
1442
  return lastTag;
1426
1443
  }
1427
- async function getAllRecentRepoTags(options) {
1428
- const limit = options?.limit;
1429
- try {
1430
- const { stdout } = await execPromise(
1431
- `git tag --sort=-creatordate | head -n ${limit}`,
1432
- {
1433
- logLevel: options?.logLevel,
1434
- noStderr: true,
1435
- noStdout: true,
1436
- noSuccess: true,
1437
- cwd: options?.cwd
1438
- }
1439
- );
1440
- const tags = stdout.trim().split("\n").filter((tag) => tag.length > 0);
1441
- logger.debug(`Retrieved ${tags.length} recent repo tags`);
1442
- return tags;
1443
- } catch {
1444
- return [];
1444
+ const NEW_VERSION_PLACEHOLDER = "{{newVersion}}";
1445
+ function parseTagVersion(value) {
1446
+ return /^\d/.test(value) ? semver.valid(value) : null;
1447
+ }
1448
+ function splitTagBody(tagBody) {
1449
+ const index = tagBody.indexOf(NEW_VERSION_PLACEHOLDER);
1450
+ if (index === -1) {
1451
+ return null;
1452
+ }
1453
+ return {
1454
+ prefix: tagBody.slice(0, index),
1455
+ suffix: tagBody.slice(index + NEW_VERSION_PLACEHOLDER.length)
1456
+ };
1457
+ }
1458
+ function extractVersionFromRepoTag(tag, tagBody) {
1459
+ const parts = splitTagBody(tagBody);
1460
+ if (!parts || !tag.startsWith(parts.prefix) || !tag.endsWith(parts.suffix)) {
1461
+ return null;
1462
+ }
1463
+ return parseTagVersion(tag.slice(parts.prefix.length, tag.length - parts.suffix.length));
1464
+ }
1465
+ function extractVersionFromLegacyRepoTag(tag) {
1466
+ return parseTagVersion(tag.startsWith("v") ? tag.slice(1) : tag);
1467
+ }
1468
+ function extractVersionFromPackageTag(tag, packageName) {
1469
+ const prefix = `${packageName}@`;
1470
+ return tag.startsWith(prefix) ? parseTagVersion(tag.slice(prefix.length)) : null;
1471
+ }
1472
+ async function getRepoTags({
1473
+ tagBody,
1474
+ logLevel,
1475
+ cwd
1476
+ }) {
1477
+ const templateTags = [];
1478
+ const legacyTags = [];
1479
+ const unrecognizedTags = [];
1480
+ for (const tag of await listTags({ logLevel, cwd })) {
1481
+ const templateVersion = tagBody ? extractVersionFromRepoTag(tag, tagBody) : null;
1482
+ if (templateVersion) {
1483
+ templateTags.push({ tag, version: templateVersion });
1484
+ continue;
1485
+ }
1486
+ const legacyVersion = extractVersionFromLegacyRepoTag(tag);
1487
+ if (legacyVersion) {
1488
+ legacyTags.push({ tag, version: legacyVersion });
1489
+ } else if (!tag.includes("@") && tag.split(/[^\d.]/).some((part) => semver.valid(part))) {
1490
+ unrecognizedTags.push(tag);
1491
+ }
1445
1492
  }
1493
+ logger.debug(`Retrieved ${templateTags.length} repo tags following "${tagBody}" and ${legacyTags.length} in the v1.2.3 or 1.2.3 format`);
1494
+ return { tags: [...templateTags, ...legacyTags], unrecognizedTags };
1446
1495
  }
1447
- async function getAllRecentPackageTags({
1496
+ async function getPackageTags({
1448
1497
  packageName,
1449
- limit = 50,
1450
1498
  logLevel,
1451
1499
  cwd
1452
1500
  }) {
1453
- try {
1454
- const escapedPackageName = packageName.replace(/[@/]/g, "\\$&");
1455
- const { stdout } = await execPromise(
1456
- `git tag --sort=-creatordate | grep -E '^${escapedPackageName}@' | head -n ${limit}`,
1457
- {
1458
- logLevel,
1459
- noStderr: true,
1460
- noStdout: true,
1461
- noSuccess: true,
1462
- cwd
1463
- }
1464
- );
1465
- const tags = stdout.trim().split("\n").filter((tag) => tag.length > 0);
1466
- logger.debug(`Retrieved ${tags.length} recent tags for package ${packageName}`);
1467
- return tags;
1468
- } catch {
1469
- return [];
1501
+ const tags = [];
1502
+ for (const tag of await listTags({ pattern: `${packageName}@*`, logLevel, cwd })) {
1503
+ const version = extractVersionFromPackageTag(tag, packageName);
1504
+ if (version) {
1505
+ tags.push({ tag, version });
1506
+ }
1470
1507
  }
1508
+ logger.debug(`Retrieved ${tags.length} tags for package ${packageName}`);
1509
+ return tags;
1471
1510
  }
1472
- function filterCompatibleTags({
1511
+ function selectPreviousTag({
1473
1512
  tags,
1474
- pkg,
1475
- onlyStable
1513
+ currentVersion,
1514
+ maxVersion,
1515
+ onlyStable,
1516
+ label
1476
1517
  }) {
1477
- const filtered = tags.filter((tag) => {
1478
- const tagVersion = extractVersionFromTag(tag, pkg.name);
1479
- if (!tagVersion) {
1480
- logger.debug(`Skipping tag ${tag}: cannot extract version`);
1481
- return false;
1482
- }
1483
- if (onlyStable && isPrerelease(tagVersion)) {
1484
- logger.debug(`Skipping tag ${tag}: prerelease version ${tagVersion} (onlyStable=${onlyStable})`);
1518
+ const candidates = tags.filter(({ tag, version }) => {
1519
+ if (!isTagVersionCompatibleWithCurrent(version, currentVersion)) {
1520
+ logger.debug(`Skipping tag ${tag}: version ${version} has higher major than current ${currentVersion}`);
1485
1521
  return false;
1486
1522
  }
1487
- if (!isTagVersionCompatibleWithCurrent(tagVersion, pkg.version)) {
1488
- logger.debug(`Skipping tag ${tag}: version ${tagVersion} has higher major than current ${pkg.version}`);
1523
+ if (semver.valid(maxVersion) && semver.gt(version, maxVersion)) {
1524
+ logger.debug(`Skipping tag ${tag}: version ${version} is higher than ${maxVersion}`);
1489
1525
  return false;
1490
1526
  }
1491
- logger.debug(`Tag ${tag} with version ${tagVersion} is compatible`);
1492
1527
  return true;
1493
1528
  });
1494
- logger.debug(`Filtered ${tags.length} tags down to ${filtered.length} compatible tags`);
1495
- return filtered;
1529
+ const highest = (list) => list.reduce(
1530
+ (best, candidate) => !best || semver.gt(candidate.version, best.version) ? candidate : best,
1531
+ null
1532
+ );
1533
+ if (onlyStable) {
1534
+ const stable = highest(candidates.filter(({ version }) => !isPrerelease(version)));
1535
+ if (stable) {
1536
+ logger.debug(`Previous ${label} tag: ${stable.tag}`);
1537
+ return stable.tag;
1538
+ }
1539
+ }
1540
+ const previous = highest(candidates);
1541
+ if (previous) {
1542
+ if (onlyStable) {
1543
+ logger.info(`No stable ${label} tag found for version ${currentVersion}, falling back to last prerelease tag: ${previous.tag}`);
1544
+ } else {
1545
+ logger.debug(`Previous ${label} tag: ${previous.tag}`);
1546
+ }
1547
+ return previous.tag;
1548
+ }
1549
+ logger.info(`No compatible ${label} tag found for version ${currentVersion}`);
1550
+ return null;
1551
+ }
1552
+ const warnedUnrecognizedTags = /* @__PURE__ */ new Set();
1553
+ function warnUnrecognizedTags({ tags, tagBody, cwd }) {
1554
+ const key = `${cwd}:${tagBody}`;
1555
+ if (tags.length === 0 || warnedUnrecognizedTags.has(key)) {
1556
+ return;
1557
+ }
1558
+ warnedUnrecognizedTags.add(key);
1559
+ logger.warn(
1560
+ `No previous release tag follows templates.tagBody "${tagBody}", but some tags look like one (${tags.slice(0, 3).join(", ")}). If the template was changed, pass the tag of the previous release with --from.`
1561
+ );
1496
1562
  }
1497
1563
  function getLastRepoTag(options) {
1498
1564
  if (options?.pkg) {
1499
1565
  return getLastRepoTagWithFiltering({
1500
1566
  pkg: options.pkg,
1501
1567
  onlyStable: options.onlyStable ?? false,
1568
+ tagBody: options.tagBody,
1569
+ maxVersion: options.currentVersion ?? options.pkg.version,
1502
1570
  logLevel: options.logLevel,
1503
1571
  cwd: options.cwd
1504
1572
  });
@@ -1511,40 +1579,24 @@ function getLastRepoTag(options) {
1511
1579
  async function getLastRepoTagWithFiltering({
1512
1580
  pkg,
1513
1581
  onlyStable,
1582
+ tagBody,
1583
+ maxVersion,
1514
1584
  logLevel,
1515
1585
  cwd
1516
1586
  }) {
1517
- const recentTags = await getAllRecentRepoTags({ limit: 50, logLevel, cwd });
1518
- if (recentTags.length === 0) {
1519
- logger.info("No tags found in repository");
1587
+ const { tags, unrecognizedTags } = await getRepoTags({ tagBody, logLevel, cwd });
1588
+ if (tags.length === 0) {
1589
+ logger.info("No release tags found in repository");
1590
+ warnUnrecognizedTags({ tags: unrecognizedTags, tagBody, cwd });
1520
1591
  return null;
1521
1592
  }
1522
- const compatibleTags = filterCompatibleTags({
1523
- tags: recentTags,
1524
- pkg,
1525
- onlyStable
1593
+ return selectPreviousTag({
1594
+ tags,
1595
+ currentVersion: pkg.version,
1596
+ maxVersion,
1597
+ onlyStable,
1598
+ label: "repo"
1526
1599
  });
1527
- if (compatibleTags.length > 0) {
1528
- const lastTag = compatibleTags[0];
1529
- logger.debug(`Last compatible repo tag: ${lastTag}`);
1530
- return lastTag;
1531
- }
1532
- if (onlyStable) {
1533
- const prereleaseFallback = filterCompatibleTags({
1534
- tags: recentTags,
1535
- pkg,
1536
- onlyStable: false
1537
- });
1538
- if (prereleaseFallback.length > 0) {
1539
- const fallbackTag = prereleaseFallback[0];
1540
- logger.info(
1541
- `No stable repo tag found for version ${pkg.version}, falling back to last prerelease tag: ${fallbackTag}`
1542
- );
1543
- return fallbackTag;
1544
- }
1545
- }
1546
- logger.info(`No compatible tags found for version ${pkg.version}`);
1547
- return null;
1548
1600
  }
1549
1601
  async function getLastPackageTag({
1550
1602
  pkg,
@@ -1590,42 +1642,18 @@ async function getLastPackageTagWithFiltering({
1590
1642
  logLevel,
1591
1643
  cwd
1592
1644
  }) {
1593
- const recentTags = await getAllRecentPackageTags({
1594
- packageName: pkg.name,
1595
- limit: 50,
1596
- logLevel,
1597
- cwd
1598
- });
1599
- if (recentTags.length === 0) {
1645
+ const tags = await getPackageTags({ packageName: pkg.name, logLevel, cwd });
1646
+ if (tags.length === 0) {
1600
1647
  logger.info(`No tags found for package ${pkg.name}`);
1601
1648
  return null;
1602
1649
  }
1603
- const compatibleTags = filterCompatibleTags({
1604
- tags: recentTags,
1605
- pkg,
1606
- onlyStable
1650
+ return selectPreviousTag({
1651
+ tags,
1652
+ currentVersion: pkg.version,
1653
+ maxVersion: pkg.version,
1654
+ onlyStable,
1655
+ label: `${pkg.name} package`
1607
1656
  });
1608
- if (compatibleTags.length > 0) {
1609
- const lastTag = compatibleTags[0];
1610
- logger.debug(`Last compatible package tag for ${pkg.name}: ${lastTag}`);
1611
- return lastTag;
1612
- }
1613
- if (onlyStable) {
1614
- const prereleaseFallback = filterCompatibleTags({
1615
- tags: recentTags,
1616
- pkg,
1617
- onlyStable: false
1618
- });
1619
- if (prereleaseFallback.length > 0) {
1620
- const fallbackTag = prereleaseFallback[0];
1621
- logger.info(
1622
- `No stable tags found for package ${pkg.name} with version ${pkg.version}, falling back to last prerelease tag: ${fallbackTag}`
1623
- );
1624
- return fallbackTag;
1625
- }
1626
- }
1627
- logger.info(`No compatible tags found for package ${pkg.name} with version ${pkg.version}`);
1628
- return null;
1629
1657
  }
1630
1658
  const NEW_PACKAGE_MARKER = "__NEW_PACKAGE__";
1631
1659
  async function resolveFromTagIndependent({
@@ -1648,6 +1676,18 @@ async function resolveFromTagIndependent({
1648
1676
  }
1649
1677
  return lastPackageTag;
1650
1678
  }
1679
+ function getRepoCurrentVersion({ cwd, pkg }) {
1680
+ let rootVersion = null;
1681
+ try {
1682
+ rootVersion = semver.valid(JSON.parse(readFileSync(join(cwd, "package.json"), "utf8")).version);
1683
+ } catch {
1684
+ logger.debug(`Cannot read the root version in ${cwd}, using the version of ${pkg.name}`);
1685
+ }
1686
+ if (!rootVersion || !semver.valid(pkg.version)) {
1687
+ return rootVersion || pkg.version;
1688
+ }
1689
+ return semver.gt(rootVersion, pkg.version) ? rootVersion : pkg.version;
1690
+ }
1651
1691
  async function resolveFromTagUnified({
1652
1692
  config,
1653
1693
  pkg,
@@ -1659,6 +1699,8 @@ async function resolveFromTagUnified({
1659
1699
  const lastRepoTag = await getLastRepoTag({
1660
1700
  pkg,
1661
1701
  onlyStable,
1702
+ tagBody: config.templates.tagBody,
1703
+ currentVersion: getRepoCurrentVersion({ cwd: config.cwd, pkg }),
1662
1704
  logLevel,
1663
1705
  cwd: config.cwd
1664
1706
  });
@@ -2536,7 +2578,8 @@ const SENSITIVE_KEYS = /* @__PURE__ */ new Set([
2536
2578
  "_authtoken"
2537
2579
  ]);
2538
2580
  const SECRET_CONTAINER_KEYS = /* @__PURE__ */ new Set(["tokens"]);
2539
- function redactValue(value, inSecretContainer, keyIsSensitive) {
2581
+ const CIRCULAR = "[Circular]";
2582
+ function redactValue(value, inSecretContainer, keyIsSensitive, ancestors) {
2540
2583
  if (typeof value === "string") {
2541
2584
  if (value === "") {
2542
2585
  return value;
@@ -2546,26 +2589,29 @@ function redactValue(value, inSecretContainer, keyIsSensitive) {
2546
2589
  }
2547
2590
  return value;
2548
2591
  }
2549
- if (Array.isArray(value)) {
2550
- return value.map((item) => redactValue(item, inSecretContainer, false));
2592
+ if (!value || typeof value !== "object") {
2593
+ return value;
2551
2594
  }
2552
- if (value && typeof value === "object") {
2553
- return redactObject(value, inSecretContainer);
2595
+ if (ancestors.has(value)) {
2596
+ return CIRCULAR;
2554
2597
  }
2555
- return value;
2598
+ ancestors.add(value);
2599
+ const result = Array.isArray(value) ? value.map((item) => redactValue(item, inSecretContainer, false, ancestors)) : redactObject(value, inSecretContainer, ancestors);
2600
+ ancestors.delete(value);
2601
+ return result;
2556
2602
  }
2557
- function redactObject(obj, inSecretContainer) {
2603
+ function redactObject(obj, inSecretContainer, ancestors) {
2558
2604
  const result = {};
2559
2605
  for (const [key, value] of Object.entries(obj)) {
2560
2606
  const lowerKey = key.toLowerCase();
2561
2607
  const childInContainer = inSecretContainer || SECRET_CONTAINER_KEYS.has(lowerKey);
2562
2608
  const keyIsSensitive = SENSITIVE_KEYS.has(lowerKey);
2563
- result[key] = redactValue(value, childInContainer, keyIsSensitive);
2609
+ result[key] = redactValue(value, childInContainer, keyIsSensitive, ancestors);
2564
2610
  }
2565
2611
  return result;
2566
2612
  }
2567
2613
  function redactSecrets(value) {
2568
- return redactValue(value, false, false);
2614
+ return redactValue(value, false, false, /* @__PURE__ */ new WeakSet());
2569
2615
  }
2570
2616
 
2571
2617
  function getDefaultConfig() {
@@ -3656,6 +3702,47 @@ const SLACK_PROMPT = `Format with Slack-compatible markdown: *bold*, _italic_, \
3656
3702
  Keep it concise \u2014 3 to 8 bullets maximum.
3657
3703
  If any breaking changes are present, lead with them.
3658
3704
  Tone: factual, oriented toward an internal team audience.`;
3705
+ function wrapChangelogPrompt(prompt) {
3706
+ return `<changelog>
3707
+ ${prompt}
3708
+ </changelog>
3709
+
3710
+ Rewrite the content inside the <changelog> tag per the rules in the system prompt. Output ONLY the rewritten content, with no preamble, no explanation, no surrounding tags.`;
3711
+ }
3712
+
3713
+ function getModel(config) {
3714
+ const model = config.ai?.providers?.["ai-sdk"]?.model;
3715
+ if (!model) {
3716
+ throw new Error(
3717
+ "No model configured for the ai-sdk provider. Set ai.providers['ai-sdk'].model, e.g. openai('gpt-5-mini') from @ai-sdk/openai."
3718
+ );
3719
+ }
3720
+ return model;
3721
+ }
3722
+ const aiSdkProvider = {
3723
+ name: "ai-sdk",
3724
+ async safetyCheck(config) {
3725
+ getModel(config);
3726
+ try {
3727
+ await import('ai');
3728
+ } catch {
3729
+ throw new Error("ai is not installed. Install it with: pnpm add -D ai");
3730
+ }
3731
+ },
3732
+ async generate(config, request) {
3733
+ const model = getModel(config);
3734
+ const { generateText } = await import('ai');
3735
+ const reasoning = config.ai?.providers?.["ai-sdk"]?.reasoning;
3736
+ const result = await generateText({
3737
+ model,
3738
+ instructions: request.systemPrompt,
3739
+ prompt: wrapChangelogPrompt(request.prompt),
3740
+ ...reasoning && { reasoning }
3741
+ });
3742
+ logger.verbose("AI SDK steps:", result.steps?.flatMap((step) => step.content.map((part) => part.type)).join(", "));
3743
+ return result.text.trim();
3744
+ }
3745
+ };
3659
3746
 
3660
3747
  function claudeBinaryAvailable() {
3661
3748
  try {
@@ -3699,16 +3786,11 @@ const claudeCodeProvider = {
3699
3786
  const { claudeRun } = await import('@yoloship/claude-sdk');
3700
3787
  const auth = resolveAuth(config);
3701
3788
  const model = config.ai?.providers?.["claude-code"]?.model;
3702
- const wrappedPrompt = `<changelog>
3703
- ${request.prompt}
3704
- </changelog>
3705
-
3706
- Rewrite the content inside the <changelog> tag per the rules in the system prompt. Output ONLY the rewritten content, with no preamble, no explanation, no surrounding tags.`;
3707
3789
  const hasAuth = !!(auth.apiKey || auth.oauthToken);
3708
3790
  const result = await claudeRun(
3709
3791
  {
3710
3792
  systemPrompt: request.systemPrompt,
3711
- prompt: wrappedPrompt,
3793
+ prompt: wrapChangelogPrompt(request.prompt),
3712
3794
  maxTurns: 1,
3713
3795
  effort: "low",
3714
3796
  disableSlashCommands: true,
@@ -3725,7 +3807,8 @@ Rewrite the content inside the <changelog> tag per the rules in the system promp
3725
3807
  };
3726
3808
 
3727
3809
  const providers = {
3728
- "claude-code": claudeCodeProvider
3810
+ "claude-code": claudeCodeProvider,
3811
+ "ai-sdk": aiSdkProvider
3729
3812
  };
3730
3813
  function getAIProvider(config) {
3731
3814
  const name = config.ai?.provider ?? "claude-code";
@@ -7184,4 +7267,4 @@ async function release(options = {}) {
7184
7267
  }
7185
7268
  }
7186
7269
 
7187
- export { getDefaultConfig as $, expandPackagesToBumpWithDependents as A, extractChangelogSummary as B, extractVersionFromPackageTag as C, extractVersionFromTag as D, fetchGitTags as E, filterOutPrivatePackages as F, filterPrivatePackagesUnlessIncluded as G, findGitHubPR as H, findGitLabMR as I, findReachableCommitBySubject as J, formatChangelogForSlack as K, formatPackagesForSlack as L, formatSlackMessage as M, NEW_PACKAGE_MARKER as N, formatTweetMessage as O, PR_COMMENT_MARKER as P, generateChangelog as Q, generateMarkDown as R, getAuthCommand as S, getBumpedIndependentPackages as T, getBumpedPackageIndependently as U, getCIName as V, getCanaryVersion as W, getCommitChangedFiles as X, getCommitSubject as Y, getCurrentGitBranch as Z, getCurrentGitRef as _, assertBranchUpToDateWithRemote as a, redactSecrets as a$, getDependentsOf as a0, getFirstCommit as a1, getGitDiff as a2, getGitStatus as a3, getGitUpstream as a4, getIndependentTag as a5, getLastPackageTag as a6, getLastRepoTag as a7, getLastStableTag as a8, getLastTag as a9, isGraduating as aA, isGraduatingToStableBetweenVersion as aB, isInCI as aC, isPrerelease as aD, isPrereleaseReleaseType as aE, isStableReleaseType as aF, isTagVersionCompatibleWithCurrent as aG, isVersionAlreadyPublishedError as aH, isVersionPublished as aI, loadRelizyConfig as aJ, mergeTypes as aK, parseChangelogMarkdown as aL, parseGitRemoteUrl as aM, postPrComment as aN, postReleaseToSlack as aO, postReleaseToTwitter as aP, prComment as aQ, providerRelease as aR, providerReleaseSafetyCheck as aS, publish as aT, publishPackage as aU, publishSafetyCheck as aV, pushCommitAndTags as aW, pushTagForce as aX, readPackageJson as aY, readPackages as aZ, reconcileFromTag as a_, getModifiedReleaseFilePatterns as aa, getNewPackageCompareBase as ab, getNpmRegistry as ac, getPackageCommits as ad, getPackageDependencies as ae, getPackageNewVersion as af, getPackages as ag, getPackagesOrBumpedPackages as ah, getPackagesToPublishInIndependentMode as ai, getPackagesToPublishInSelectiveMode as aj, getPreid as ak, getReleaseTagNames as al, getReleaseUrl as am, getRootPackage as an, getShortCommitSha as ao, getSlackToken as ap, getSlackWebhookUrl as aq, getTwitterCredentials as ar, github as as, gitlab as at, globDirsAbsolute as au, hasLernaJson as av, isAncestor as aw, isBumpedPackage as ax, isChangedPreid as ay, isCommitOnlyInIgnoredPackages as az, assertReleaseTagsAvailable as b, release as b0, resetRewrittenTagCache as b1, resolveAllConfiguredRegistryTargets as b2, resolveIgnoredPackagePaths as b3, resolveRegistryTargetsForPackage as b4, resolveRegistryTargetsForPackages as b5, resolveTags as b6, retagAnnotatedLocal as b7, rollbackModifiedFiles as b8, shouldFilterPrereleaseTags as b9, social as ba, socialSafetyCheck as bb, tagExists as bc, topologicalSort as bd, tryPostPrComment as be, updateLernaVersion as bf, withRegistryNpmrc as bg, writeChangelogToFile as bh, writeVersion as bi, buildChangelogBody as c, buildCommentBody as d, buildCompareLink as e, buildContributors as f, buildReleaseSummary as g, bump as h, capReleaseTypeForZeroMajor as i, changelog as j, checkGitStatusIfDirty as k, collectContributorNames as l, collectPackageBumps as m, confirmBump as n, createCommitAndTags as o, createGitlabRelease as p, defineConfig as q, detectGitProvider as r, detectPackageManager as s, detectPullRequest as t, determinePublishTag as u, determineReleaseType as v, determineSemverChange as w, executeBuildCmd as x, executeFormatCmd as y, executeHook as z };
7270
+ export { getCurrentGitRef as $, expandPackagesToBumpWithDependents as A, extractChangelogSummary as B, extractVersionFromPackageTag$1 as C, extractVersionFromRepoTag as D, extractVersionFromTag as E, fetchGitTags as F, filterOutPrivatePackages as G, filterPrivatePackagesUnlessIncluded as H, findGitHubPR as I, findGitLabMR as J, findReachableCommitBySubject as K, formatChangelogForSlack as L, formatPackagesForSlack as M, NEW_PACKAGE_MARKER as N, formatSlackMessage as O, PR_COMMENT_MARKER as P, formatTweetMessage as Q, generateChangelog as R, generateMarkDown as S, getAuthCommand as T, getBumpedIndependentPackages as U, getBumpedPackageIndependently as V, getCIName as W, getCanaryVersion as X, getCommitChangedFiles as Y, getCommitSubject as Z, getCurrentGitBranch as _, assertBranchUpToDateWithRemote as a, readPackages as a$, getDefaultConfig as a0, getDependentsOf as a1, getFirstCommit as a2, getGitDiff as a3, getGitStatus as a4, getGitUpstream as a5, getIndependentTag as a6, getLastPackageTag as a7, getLastRepoTag as a8, getLastStableTag as a9, isCommitOnlyInIgnoredPackages as aA, isGraduating as aB, isGraduatingToStableBetweenVersion as aC, isInCI as aD, isPrerelease as aE, isPrereleaseReleaseType as aF, isStableReleaseType as aG, isTagVersionCompatibleWithCurrent as aH, isVersionAlreadyPublishedError as aI, isVersionPublished as aJ, listTags as aK, loadRelizyConfig as aL, mergeTypes as aM, parseChangelogMarkdown as aN, parseGitRemoteUrl as aO, postPrComment as aP, postReleaseToSlack as aQ, postReleaseToTwitter as aR, prComment as aS, providerRelease as aT, providerReleaseSafetyCheck as aU, publish as aV, publishPackage as aW, publishSafetyCheck as aX, pushCommitAndTags as aY, pushTagForce as aZ, readPackageJson as a_, getLastTag as aa, getModifiedReleaseFilePatterns as ab, getNewPackageCompareBase as ac, getNpmRegistry as ad, getPackageCommits as ae, getPackageDependencies as af, getPackageNewVersion as ag, getPackages as ah, getPackagesOrBumpedPackages as ai, getPackagesToPublishInIndependentMode as aj, getPackagesToPublishInSelectiveMode as ak, getPreid as al, getReleaseTagNames as am, getReleaseUrl as an, getRootPackage as ao, getShortCommitSha as ap, getSlackToken as aq, getSlackWebhookUrl as ar, getTwitterCredentials as as, github as at, gitlab as au, globDirsAbsolute as av, hasLernaJson as aw, isAncestor as ax, isBumpedPackage as ay, isChangedPreid as az, assertReleaseTagsAvailable as b, reconcileFromTag as b0, redactSecrets as b1, release as b2, resetRewrittenTagCache as b3, resolveAllConfiguredRegistryTargets as b4, resolveIgnoredPackagePaths as b5, resolveRegistryTargetsForPackage as b6, resolveRegistryTargetsForPackages as b7, resolveTags as b8, retagAnnotatedLocal as b9, rollbackModifiedFiles as ba, shouldFilterPrereleaseTags as bb, social as bc, socialSafetyCheck as bd, tagExists as be, topologicalSort as bf, tryPostPrComment as bg, updateLernaVersion as bh, withRegistryNpmrc as bi, writeChangelogToFile as bj, writeVersion as bk, buildChangelogBody as c, buildCommentBody as d, buildCompareLink as e, buildContributors as f, buildReleaseSummary as g, bump as h, capReleaseTypeForZeroMajor as i, changelog as j, checkGitStatusIfDirty as k, collectContributorNames as l, collectPackageBumps as m, confirmBump as n, createCommitAndTags as o, createGitlabRelease as p, defineConfig as q, detectGitProvider as r, detectPackageManager as s, detectPullRequest as t, determinePublishTag as u, determineReleaseType as v, determineSemverChange as w, executeBuildCmd as x, executeFormatCmd as y, executeHook as z };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "relizy",
3
3
  "type": "module",
4
- "version": "1.7.0",
4
+ "version": "1.8.0",
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",
@@ -57,6 +57,7 @@
57
57
  "peerDependencies": {
58
58
  "@slack/web-api": "^7.0.0 || ^8.0.0",
59
59
  "@yoloship/claude-sdk": "^0.2.0-beta.6",
60
+ "ai": "^7.0.0",
60
61
  "twitter-api-v2": "^1.20.0"
61
62
  },
62
63
  "peerDependenciesMeta": {
@@ -66,6 +67,9 @@
66
67
  "@yoloship/claude-sdk": {
67
68
  "optional": true
68
69
  },
70
+ "ai": {
71
+ "optional": true
72
+ },
69
73
  "twitter-api-v2": {
70
74
  "optional": true
71
75
  }
@@ -96,6 +100,7 @@
96
100
  "@types/semver": "^7.8.0",
97
101
  "@vitest/coverage-v8": "^5.0.1",
98
102
  "@yoloship/claude-sdk": "0.2.0-beta.6",
103
+ "ai": "^7.0.128",
99
104
  "cross-env": "10.1.0",
100
105
  "eslint": "^10.11.0",
101
106
  "husky": "9.1.7",