relizy 1.10.0 → 1.11.1
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 +2 -1
- package/dist/index.d.mts +46 -14
- package/dist/index.d.ts +46 -14
- package/dist/index.mjs +2 -1
- package/dist/shared/{relizy.BY0-QHlV.mjs → relizy.BY26Mk10.mjs} +122 -44
- package/package.json +2 -1
package/dist/cli.mjs
CHANGED
|
@@ -5,12 +5,13 @@ 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, Option } from 'commander';
|
|
8
|
-
import {
|
|
8
|
+
import { b8 as isInCI, ad as getCIName, o as bump, q as changelog, bu as publish, bs as providerRelease, bU as social, u as commitlint, br as prComment, bE as release } from './shared/relizy.BY26Mk10.mjs';
|
|
9
9
|
import 'node:child_process';
|
|
10
10
|
import 'node:module';
|
|
11
11
|
import 'mdast-util-from-markdown';
|
|
12
12
|
import 'mdast-util-gfm';
|
|
13
13
|
import 'micromark-extension-gfm';
|
|
14
|
+
import 'confbox';
|
|
14
15
|
import 'fast-glob';
|
|
15
16
|
import 'changelogen';
|
|
16
17
|
import '@maz-ui/utils/helpers/formatJson';
|
package/dist/index.d.mts
CHANGED
|
@@ -157,10 +157,11 @@ interface ChangelogLinter {
|
|
|
157
157
|
lint: (markdown: string) => Promise<string[]>;
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
160
|
-
* The linter of the changelog entries of a project
|
|
161
|
-
* CHANGELOG.md files, otherwise a syntax check of the code blocks
|
|
160
|
+
* The linter of the changelog entries of a project. With `auto`, its ESLint when
|
|
161
|
+
* it lints the CHANGELOG.md files, otherwise a syntax check of the code blocks
|
|
162
|
+
* with oxc. Loaded once per cwd and choice.
|
|
162
163
|
*/
|
|
163
|
-
declare function getChangelogLinter(cwd: string): Promise<ChangelogLinter>;
|
|
164
|
+
declare function getChangelogLinter(cwd: string, choice?: CommitlintCodeBlocksLinter): Promise<ChangelogLinter>;
|
|
164
165
|
|
|
165
166
|
/** Character git uses for the comment lines of the edited messages */
|
|
166
167
|
declare function getCommentChar(cwd: string): string;
|
|
@@ -188,8 +189,9 @@ declare function getCommitsInRange({ from, to, cwd }: {
|
|
|
188
189
|
cwd: string;
|
|
189
190
|
}): RangeCommit[];
|
|
190
191
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
192
|
+
* Makes sure the start of the range is in the local history: in a shallow
|
|
193
|
+
* clone of the CI, the history and the tags are fetched. Throws a helpful
|
|
194
|
+
* error when it is still missing.
|
|
193
195
|
*/
|
|
194
196
|
declare function assertRefAvailable(ref: string, cwd: string): void;
|
|
195
197
|
interface PullRequestTitle {
|
|
@@ -270,9 +272,16 @@ interface WorkspacePackage {
|
|
|
270
272
|
/** Scopes designating the package: short name, full name and folder name */
|
|
271
273
|
scopes: string[];
|
|
272
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Package globs declared by the tools of the monorepo: the `workspaces` of the
|
|
277
|
+
* package.json (npm, yarn, bun, and Turborepo or Nx on top of them),
|
|
278
|
+
* `pnpm-workspace.yaml`, `lerna.json`, `rush.json` and the `workspace` of `deno.json`.
|
|
279
|
+
*/
|
|
280
|
+
declare function getPackageManagerWorkspaces(cwd: string): string[];
|
|
273
281
|
/**
|
|
274
282
|
* Packages of the monorepo, private ones included: a commit can touch a package
|
|
275
|
-
* that is never published. `
|
|
283
|
+
* that is never published. Besides `monorepo.packages`, the workspace of the
|
|
284
|
+
* package manager and `commitlint.packages` add the directories that relizy
|
|
276
285
|
* does not release (e.g. apps). `monorepo.ignored` is not applied: an ignored
|
|
277
286
|
* package is released by another config, it is still a valid scope.
|
|
278
287
|
* Empty in standalone mode without them.
|
|
@@ -317,7 +326,10 @@ interface RuleDefinition {
|
|
|
317
326
|
conventionalOnly?: boolean;
|
|
318
327
|
check: (context: RuleContext) => RuleProblem[] | Promise<RuleProblem[]>;
|
|
319
328
|
}
|
|
320
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* `type(scope)!: subject`, lowercase type, a space after the colon. Extra spaces
|
|
331
|
+
* are accepted: the changelog trims them.
|
|
332
|
+
*/
|
|
321
333
|
declare const STRICT_HEADER_PATTERN: RegExp;
|
|
322
334
|
/**
|
|
323
335
|
* The built-in rules, with their default severity and value.
|
|
@@ -935,11 +947,17 @@ declare function globDirsAbsolute(cwd: string, globs?: string[]): Set<string>;
|
|
|
935
947
|
*/
|
|
936
948
|
declare function resolveIgnoredPackagePaths(config: ResolvedRelizyConfig): string[];
|
|
937
949
|
/**
|
|
938
|
-
* Extract the changed file paths (POSIX) from a commit body
|
|
939
|
-
*
|
|
940
|
-
* (renames/copies use `R100\told\tnew` - the new path is the last field).
|
|
950
|
+
* Extract the changed file paths (POSIX) from a commit body (renames/copies:
|
|
951
|
+
* the new path, the last field of their `--name-status` line).
|
|
941
952
|
*/
|
|
942
953
|
declare function getCommitChangedFiles(commit: GitCommit): string[];
|
|
954
|
+
/**
|
|
955
|
+
* True when the commit changes a file of the package directory (POSIX, relative
|
|
956
|
+
* to the repository). Both paths of a rename or a copy count, so a file moved
|
|
957
|
+
* out of the package still belongs to its history. The directory is compared as
|
|
958
|
+
* a whole: `packages/components` does not match `packages/components-mcp/...`.
|
|
959
|
+
*/
|
|
960
|
+
declare function isCommitInPackage(commit: GitCommit, packageRelativePath: string): boolean;
|
|
943
961
|
/**
|
|
944
962
|
* True when EVERY changed file of the commit lives inside an ignored package.
|
|
945
963
|
* Such commits are excluded from the root (unified/selective) version bump and
|
|
@@ -2723,8 +2741,9 @@ interface CommitlintBuiltInRules {
|
|
|
2723
2741
|
*/
|
|
2724
2742
|
'scope-matches-files': never;
|
|
2725
2743
|
/**
|
|
2726
|
-
* The subject starts with a lowercase letter.
|
|
2727
|
-
*
|
|
2744
|
+
* The subject starts with a lowercase letter. Off by default: the changelog
|
|
2745
|
+
* capitalizes the subject anyway.
|
|
2746
|
+
* @default 'off'
|
|
2728
2747
|
*/
|
|
2729
2748
|
'subject-case': never;
|
|
2730
2749
|
/**
|
|
@@ -2824,6 +2843,13 @@ interface CommitlintCustomRuleContext {
|
|
|
2824
2843
|
*/
|
|
2825
2844
|
type CommitlintCustomRule = (commit: CommitlintCommit, context: CommitlintCustomRuleContext) => CommitlintCustomRuleOutcome | Promise<CommitlintCustomRuleOutcome>;
|
|
2826
2845
|
type CommitlintCustomRuleOutcome = boolean | string | [boolean, string?];
|
|
2846
|
+
/**
|
|
2847
|
+
* Tool checking the code blocks of the commit bodies (`body-changelog-lint`):
|
|
2848
|
+
* - `auto`: the ESLint of the project when it lints the CHANGELOG.md files, otherwise `oxc`;
|
|
2849
|
+
* - `eslint`: the ESLint of the project, an error when it does not lint the CHANGELOG.md files;
|
|
2850
|
+
* - `oxc`: a syntax check of the JavaScript, TypeScript and JSON code blocks.
|
|
2851
|
+
*/
|
|
2852
|
+
type CommitlintCodeBlocksLinter = 'auto' | 'eslint' | 'oxc';
|
|
2827
2853
|
interface CommitlintConfig {
|
|
2828
2854
|
/**
|
|
2829
2855
|
* Glob patterns of directories to treat as workspace packages for the scopes,
|
|
@@ -2865,6 +2891,12 @@ interface CommitlintConfig {
|
|
|
2865
2891
|
* @default false
|
|
2866
2892
|
*/
|
|
2867
2893
|
title?: boolean;
|
|
2894
|
+
/**
|
|
2895
|
+
* Tool checking the code blocks of the commit bodies, rendered as in the
|
|
2896
|
+
* changelogs (`body-changelog-lint`).
|
|
2897
|
+
* @default 'auto'
|
|
2898
|
+
*/
|
|
2899
|
+
codeBlocksLinter?: CommitlintCodeBlocksLinter;
|
|
2868
2900
|
/**
|
|
2869
2901
|
* URL printed with the errors, e.g. the commit guidelines of the team.
|
|
2870
2902
|
*/
|
|
@@ -3118,5 +3150,5 @@ declare function socialSafetyCheck({ config }: {
|
|
|
3118
3150
|
}): Promise<void>;
|
|
3119
3151
|
declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
|
|
3120
3152
|
|
|
3121
|
-
export { BUILT_IN_RULES, COMMITLINT_RULES_URL, NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, SLACK_HEADER_MAX_LENGTH, SLACK_MAX_BLOCKS, SLACK_RICH_TEXT_BLOCK_MAX_LENGTH, SLACK_RICH_TEXT_MESSAGE_MAX_LENGTH, SLACK_SECTION_MAX_LENGTH, SLACK_SUMMARY_MAX_LENGTH, STRICT_HEADER_PATTERN, assertBranchUpToDateWithRemote, assertRefAvailable, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, commitlint, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromRepoTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findPackageByScope, findReachableCommitBySubject, formatChangelogForSlack, formatCommitResult, formatGithubAnnotations, formatHowToFix, formatJsonReport, formatPackagesForSlack, formatReleaseEffect, formatSlackMessage, formatTextReport, formatTweetMessage, generateChangelog, generateMarkDown, getAllowedScopes, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getChangelogLinter, getChangelogTitle, getCommentChar, getCommitChangedFiles, getCommitMessageFile, getCommitSubject, getCommitsInRange, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOfFiles, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getPullRequestTitle, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getStagedFiles, getTwitterCredentials, getWorkspacePackages, github, gitlab, globDirsAbsolute, hasLernaJson, installCommitMsgHook, isAllowedCommit, isAncestor, isBumpedPackage, isChangedPreid, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isIgnoredCommitMessage, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, lintCommitMessage, listTags, loadRelizyConfig, markdownToSlackMrkdwn, markdownToSlackRichText, mergeTypes, normalizeRuleConfig, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readCommitMessageFile, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, renderChangelogEntry, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveDefaultRangeStart, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveSlackPostMaxLength, resolveTags, retagAnnotatedLocal, richTextToPlainText, rollbackModifiedFiles, shouldFilterPrereleaseTags, shouldUseColors, sliceSlackText, social, socialSafetyCheck, splitCommitMessage, stripGitComments, summarizeResults, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
|
|
3122
|
-
export type { AIConfig, AIExtraGuidelines, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, AiSdkProviderOptions, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogLinter, ChangelogOptions, ClaudeCodeProviderOptions, CommitMessageParts, CommitlintBuiltInRules, CommitlintCommit, CommitlintConfig, CommitlintCustomRule, CommitlintCustomRuleContext, CommitlintCustomRuleOutcome, CommitlintOptions, CommitlintProblem, CommitlintReport, CommitlintResult, CommitlintRuleConfig, CommitlintRuleLevel, CommitlintRuleName, CommitlintRulesConfig, CommitlintRunResult, CommitlintSuggestion, CommitlintSummary, ConfigType, DefaultRangeStart, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, InstalledHook, LintCommitMessageOptions, MonorepoConfig, NormalizedRuleConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, PullRequestTitle, RangeCommit, ReadPackage, Reference, RegistryTarget, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ReportEntry, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, RuleContext, RuleDefinition, RuleProblem, RuleSeverity, SlackChangelogFormat, SlackCredentials, SlackOptions, SlackPackageEntry, SlackRichTextBlock, SlackRichTextElement, SlackRichTextInline, SlackRichTextLink, SlackRichTextList, SlackRichTextPreformatted, SlackRichTextQuote, SlackRichTextSection, SlackRichTextStyle, SlackRichTextText, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode, WorkspacePackage };
|
|
3153
|
+
export { BUILT_IN_RULES, COMMITLINT_RULES_URL, NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, SLACK_HEADER_MAX_LENGTH, SLACK_MAX_BLOCKS, SLACK_RICH_TEXT_BLOCK_MAX_LENGTH, SLACK_RICH_TEXT_MESSAGE_MAX_LENGTH, SLACK_SECTION_MAX_LENGTH, SLACK_SUMMARY_MAX_LENGTH, STRICT_HEADER_PATTERN, assertBranchUpToDateWithRemote, assertRefAvailable, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, commitlint, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromRepoTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findPackageByScope, findReachableCommitBySubject, formatChangelogForSlack, formatCommitResult, formatGithubAnnotations, formatHowToFix, formatJsonReport, formatPackagesForSlack, formatReleaseEffect, formatSlackMessage, formatTextReport, formatTweetMessage, generateChangelog, generateMarkDown, getAllowedScopes, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getChangelogLinter, getChangelogTitle, getCommentChar, getCommitChangedFiles, getCommitMessageFile, getCommitSubject, getCommitsInRange, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageManagerWorkspaces, getPackageNewVersion, getPackages, getPackagesOfFiles, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getPullRequestTitle, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getStagedFiles, getTwitterCredentials, getWorkspacePackages, github, gitlab, globDirsAbsolute, hasLernaJson, installCommitMsgHook, isAllowedCommit, isAncestor, isBumpedPackage, isChangedPreid, isCommitInPackage, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isIgnoredCommitMessage, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, lintCommitMessage, listTags, loadRelizyConfig, markdownToSlackMrkdwn, markdownToSlackRichText, mergeTypes, normalizeRuleConfig, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readCommitMessageFile, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, renderChangelogEntry, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveDefaultRangeStart, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveSlackPostMaxLength, resolveTags, retagAnnotatedLocal, richTextToPlainText, rollbackModifiedFiles, shouldFilterPrereleaseTags, shouldUseColors, sliceSlackText, social, socialSafetyCheck, splitCommitMessage, stripGitComments, summarizeResults, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
|
|
3154
|
+
export type { AIConfig, AIExtraGuidelines, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, AiSdkProviderOptions, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogLinter, ChangelogOptions, ClaudeCodeProviderOptions, CommitMessageParts, CommitlintBuiltInRules, CommitlintCodeBlocksLinter, CommitlintCommit, CommitlintConfig, CommitlintCustomRule, CommitlintCustomRuleContext, CommitlintCustomRuleOutcome, CommitlintOptions, CommitlintProblem, CommitlintReport, CommitlintResult, CommitlintRuleConfig, CommitlintRuleLevel, CommitlintRuleName, CommitlintRulesConfig, CommitlintRunResult, CommitlintSuggestion, CommitlintSummary, ConfigType, DefaultRangeStart, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, InstalledHook, LintCommitMessageOptions, MonorepoConfig, NormalizedRuleConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, PullRequestTitle, RangeCommit, ReadPackage, Reference, RegistryTarget, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ReportEntry, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, RuleContext, RuleDefinition, RuleProblem, RuleSeverity, SlackChangelogFormat, SlackCredentials, SlackOptions, SlackPackageEntry, SlackRichTextBlock, SlackRichTextElement, SlackRichTextInline, SlackRichTextLink, SlackRichTextList, SlackRichTextPreformatted, SlackRichTextQuote, SlackRichTextSection, SlackRichTextStyle, SlackRichTextText, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode, WorkspacePackage };
|
package/dist/index.d.ts
CHANGED
|
@@ -157,10 +157,11 @@ interface ChangelogLinter {
|
|
|
157
157
|
lint: (markdown: string) => Promise<string[]>;
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
160
|
-
* The linter of the changelog entries of a project
|
|
161
|
-
* CHANGELOG.md files, otherwise a syntax check of the code blocks
|
|
160
|
+
* The linter of the changelog entries of a project. With `auto`, its ESLint when
|
|
161
|
+
* it lints the CHANGELOG.md files, otherwise a syntax check of the code blocks
|
|
162
|
+
* with oxc. Loaded once per cwd and choice.
|
|
162
163
|
*/
|
|
163
|
-
declare function getChangelogLinter(cwd: string): Promise<ChangelogLinter>;
|
|
164
|
+
declare function getChangelogLinter(cwd: string, choice?: CommitlintCodeBlocksLinter): Promise<ChangelogLinter>;
|
|
164
165
|
|
|
165
166
|
/** Character git uses for the comment lines of the edited messages */
|
|
166
167
|
declare function getCommentChar(cwd: string): string;
|
|
@@ -188,8 +189,9 @@ declare function getCommitsInRange({ from, to, cwd }: {
|
|
|
188
189
|
cwd: string;
|
|
189
190
|
}): RangeCommit[];
|
|
190
191
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
192
|
+
* Makes sure the start of the range is in the local history: in a shallow
|
|
193
|
+
* clone of the CI, the history and the tags are fetched. Throws a helpful
|
|
194
|
+
* error when it is still missing.
|
|
193
195
|
*/
|
|
194
196
|
declare function assertRefAvailable(ref: string, cwd: string): void;
|
|
195
197
|
interface PullRequestTitle {
|
|
@@ -270,9 +272,16 @@ interface WorkspacePackage {
|
|
|
270
272
|
/** Scopes designating the package: short name, full name and folder name */
|
|
271
273
|
scopes: string[];
|
|
272
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Package globs declared by the tools of the monorepo: the `workspaces` of the
|
|
277
|
+
* package.json (npm, yarn, bun, and Turborepo or Nx on top of them),
|
|
278
|
+
* `pnpm-workspace.yaml`, `lerna.json`, `rush.json` and the `workspace` of `deno.json`.
|
|
279
|
+
*/
|
|
280
|
+
declare function getPackageManagerWorkspaces(cwd: string): string[];
|
|
273
281
|
/**
|
|
274
282
|
* Packages of the monorepo, private ones included: a commit can touch a package
|
|
275
|
-
* that is never published. `
|
|
283
|
+
* that is never published. Besides `monorepo.packages`, the workspace of the
|
|
284
|
+
* package manager and `commitlint.packages` add the directories that relizy
|
|
276
285
|
* does not release (e.g. apps). `monorepo.ignored` is not applied: an ignored
|
|
277
286
|
* package is released by another config, it is still a valid scope.
|
|
278
287
|
* Empty in standalone mode without them.
|
|
@@ -317,7 +326,10 @@ interface RuleDefinition {
|
|
|
317
326
|
conventionalOnly?: boolean;
|
|
318
327
|
check: (context: RuleContext) => RuleProblem[] | Promise<RuleProblem[]>;
|
|
319
328
|
}
|
|
320
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* `type(scope)!: subject`, lowercase type, a space after the colon. Extra spaces
|
|
331
|
+
* are accepted: the changelog trims them.
|
|
332
|
+
*/
|
|
321
333
|
declare const STRICT_HEADER_PATTERN: RegExp;
|
|
322
334
|
/**
|
|
323
335
|
* The built-in rules, with their default severity and value.
|
|
@@ -935,11 +947,17 @@ declare function globDirsAbsolute(cwd: string, globs?: string[]): Set<string>;
|
|
|
935
947
|
*/
|
|
936
948
|
declare function resolveIgnoredPackagePaths(config: ResolvedRelizyConfig): string[];
|
|
937
949
|
/**
|
|
938
|
-
* Extract the changed file paths (POSIX) from a commit body
|
|
939
|
-
*
|
|
940
|
-
* (renames/copies use `R100\told\tnew` - the new path is the last field).
|
|
950
|
+
* Extract the changed file paths (POSIX) from a commit body (renames/copies:
|
|
951
|
+
* the new path, the last field of their `--name-status` line).
|
|
941
952
|
*/
|
|
942
953
|
declare function getCommitChangedFiles(commit: GitCommit): string[];
|
|
954
|
+
/**
|
|
955
|
+
* True when the commit changes a file of the package directory (POSIX, relative
|
|
956
|
+
* to the repository). Both paths of a rename or a copy count, so a file moved
|
|
957
|
+
* out of the package still belongs to its history. The directory is compared as
|
|
958
|
+
* a whole: `packages/components` does not match `packages/components-mcp/...`.
|
|
959
|
+
*/
|
|
960
|
+
declare function isCommitInPackage(commit: GitCommit, packageRelativePath: string): boolean;
|
|
943
961
|
/**
|
|
944
962
|
* True when EVERY changed file of the commit lives inside an ignored package.
|
|
945
963
|
* Such commits are excluded from the root (unified/selective) version bump and
|
|
@@ -2723,8 +2741,9 @@ interface CommitlintBuiltInRules {
|
|
|
2723
2741
|
*/
|
|
2724
2742
|
'scope-matches-files': never;
|
|
2725
2743
|
/**
|
|
2726
|
-
* The subject starts with a lowercase letter.
|
|
2727
|
-
*
|
|
2744
|
+
* The subject starts with a lowercase letter. Off by default: the changelog
|
|
2745
|
+
* capitalizes the subject anyway.
|
|
2746
|
+
* @default 'off'
|
|
2728
2747
|
*/
|
|
2729
2748
|
'subject-case': never;
|
|
2730
2749
|
/**
|
|
@@ -2824,6 +2843,13 @@ interface CommitlintCustomRuleContext {
|
|
|
2824
2843
|
*/
|
|
2825
2844
|
type CommitlintCustomRule = (commit: CommitlintCommit, context: CommitlintCustomRuleContext) => CommitlintCustomRuleOutcome | Promise<CommitlintCustomRuleOutcome>;
|
|
2826
2845
|
type CommitlintCustomRuleOutcome = boolean | string | [boolean, string?];
|
|
2846
|
+
/**
|
|
2847
|
+
* Tool checking the code blocks of the commit bodies (`body-changelog-lint`):
|
|
2848
|
+
* - `auto`: the ESLint of the project when it lints the CHANGELOG.md files, otherwise `oxc`;
|
|
2849
|
+
* - `eslint`: the ESLint of the project, an error when it does not lint the CHANGELOG.md files;
|
|
2850
|
+
* - `oxc`: a syntax check of the JavaScript, TypeScript and JSON code blocks.
|
|
2851
|
+
*/
|
|
2852
|
+
type CommitlintCodeBlocksLinter = 'auto' | 'eslint' | 'oxc';
|
|
2827
2853
|
interface CommitlintConfig {
|
|
2828
2854
|
/**
|
|
2829
2855
|
* Glob patterns of directories to treat as workspace packages for the scopes,
|
|
@@ -2865,6 +2891,12 @@ interface CommitlintConfig {
|
|
|
2865
2891
|
* @default false
|
|
2866
2892
|
*/
|
|
2867
2893
|
title?: boolean;
|
|
2894
|
+
/**
|
|
2895
|
+
* Tool checking the code blocks of the commit bodies, rendered as in the
|
|
2896
|
+
* changelogs (`body-changelog-lint`).
|
|
2897
|
+
* @default 'auto'
|
|
2898
|
+
*/
|
|
2899
|
+
codeBlocksLinter?: CommitlintCodeBlocksLinter;
|
|
2868
2900
|
/**
|
|
2869
2901
|
* URL printed with the errors, e.g. the commit guidelines of the team.
|
|
2870
2902
|
*/
|
|
@@ -3118,5 +3150,5 @@ declare function socialSafetyCheck({ config }: {
|
|
|
3118
3150
|
}): Promise<void>;
|
|
3119
3151
|
declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
|
|
3120
3152
|
|
|
3121
|
-
export { BUILT_IN_RULES, COMMITLINT_RULES_URL, NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, SLACK_HEADER_MAX_LENGTH, SLACK_MAX_BLOCKS, SLACK_RICH_TEXT_BLOCK_MAX_LENGTH, SLACK_RICH_TEXT_MESSAGE_MAX_LENGTH, SLACK_SECTION_MAX_LENGTH, SLACK_SUMMARY_MAX_LENGTH, STRICT_HEADER_PATTERN, assertBranchUpToDateWithRemote, assertRefAvailable, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, commitlint, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromRepoTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findPackageByScope, findReachableCommitBySubject, formatChangelogForSlack, formatCommitResult, formatGithubAnnotations, formatHowToFix, formatJsonReport, formatPackagesForSlack, formatReleaseEffect, formatSlackMessage, formatTextReport, formatTweetMessage, generateChangelog, generateMarkDown, getAllowedScopes, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getChangelogLinter, getChangelogTitle, getCommentChar, getCommitChangedFiles, getCommitMessageFile, getCommitSubject, getCommitsInRange, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOfFiles, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getPullRequestTitle, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getStagedFiles, getTwitterCredentials, getWorkspacePackages, github, gitlab, globDirsAbsolute, hasLernaJson, installCommitMsgHook, isAllowedCommit, isAncestor, isBumpedPackage, isChangedPreid, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isIgnoredCommitMessage, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, lintCommitMessage, listTags, loadRelizyConfig, markdownToSlackMrkdwn, markdownToSlackRichText, mergeTypes, normalizeRuleConfig, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readCommitMessageFile, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, renderChangelogEntry, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveDefaultRangeStart, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveSlackPostMaxLength, resolveTags, retagAnnotatedLocal, richTextToPlainText, rollbackModifiedFiles, shouldFilterPrereleaseTags, shouldUseColors, sliceSlackText, social, socialSafetyCheck, splitCommitMessage, stripGitComments, summarizeResults, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
|
|
3122
|
-
export type { AIConfig, AIExtraGuidelines, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, AiSdkProviderOptions, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogLinter, ChangelogOptions, ClaudeCodeProviderOptions, CommitMessageParts, CommitlintBuiltInRules, CommitlintCommit, CommitlintConfig, CommitlintCustomRule, CommitlintCustomRuleContext, CommitlintCustomRuleOutcome, CommitlintOptions, CommitlintProblem, CommitlintReport, CommitlintResult, CommitlintRuleConfig, CommitlintRuleLevel, CommitlintRuleName, CommitlintRulesConfig, CommitlintRunResult, CommitlintSuggestion, CommitlintSummary, ConfigType, DefaultRangeStart, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, InstalledHook, LintCommitMessageOptions, MonorepoConfig, NormalizedRuleConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, PullRequestTitle, RangeCommit, ReadPackage, Reference, RegistryTarget, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ReportEntry, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, RuleContext, RuleDefinition, RuleProblem, RuleSeverity, SlackChangelogFormat, SlackCredentials, SlackOptions, SlackPackageEntry, SlackRichTextBlock, SlackRichTextElement, SlackRichTextInline, SlackRichTextLink, SlackRichTextList, SlackRichTextPreformatted, SlackRichTextQuote, SlackRichTextSection, SlackRichTextStyle, SlackRichTextText, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode, WorkspacePackage };
|
|
3153
|
+
export { BUILT_IN_RULES, COMMITLINT_RULES_URL, NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, SLACK_HEADER_MAX_LENGTH, SLACK_MAX_BLOCKS, SLACK_RICH_TEXT_BLOCK_MAX_LENGTH, SLACK_RICH_TEXT_MESSAGE_MAX_LENGTH, SLACK_SECTION_MAX_LENGTH, SLACK_SUMMARY_MAX_LENGTH, STRICT_HEADER_PATTERN, assertBranchUpToDateWithRemote, assertRefAvailable, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, commitlint, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromRepoTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findPackageByScope, findReachableCommitBySubject, formatChangelogForSlack, formatCommitResult, formatGithubAnnotations, formatHowToFix, formatJsonReport, formatPackagesForSlack, formatReleaseEffect, formatSlackMessage, formatTextReport, formatTweetMessage, generateChangelog, generateMarkDown, getAllowedScopes, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getChangelogLinter, getChangelogTitle, getCommentChar, getCommitChangedFiles, getCommitMessageFile, getCommitSubject, getCommitsInRange, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageManagerWorkspaces, getPackageNewVersion, getPackages, getPackagesOfFiles, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getPullRequestTitle, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getStagedFiles, getTwitterCredentials, getWorkspacePackages, github, gitlab, globDirsAbsolute, hasLernaJson, installCommitMsgHook, isAllowedCommit, isAncestor, isBumpedPackage, isChangedPreid, isCommitInPackage, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isIgnoredCommitMessage, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, lintCommitMessage, listTags, loadRelizyConfig, markdownToSlackMrkdwn, markdownToSlackRichText, mergeTypes, normalizeRuleConfig, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readCommitMessageFile, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, renderChangelogEntry, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveDefaultRangeStart, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveSlackPostMaxLength, resolveTags, retagAnnotatedLocal, richTextToPlainText, rollbackModifiedFiles, shouldFilterPrereleaseTags, shouldUseColors, sliceSlackText, social, socialSafetyCheck, splitCommitMessage, stripGitComments, summarizeResults, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
|
|
3154
|
+
export type { AIConfig, AIExtraGuidelines, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, AiSdkProviderOptions, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogLinter, ChangelogOptions, ClaudeCodeProviderOptions, CommitMessageParts, CommitlintBuiltInRules, CommitlintCodeBlocksLinter, CommitlintCommit, CommitlintConfig, CommitlintCustomRule, CommitlintCustomRuleContext, CommitlintCustomRuleOutcome, CommitlintOptions, CommitlintProblem, CommitlintReport, CommitlintResult, CommitlintRuleConfig, CommitlintRuleLevel, CommitlintRuleName, CommitlintRulesConfig, CommitlintRunResult, CommitlintSuggestion, CommitlintSummary, ConfigType, DefaultRangeStart, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, InstalledHook, LintCommitMessageOptions, MonorepoConfig, NormalizedRuleConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, PullRequestTitle, RangeCommit, ReadPackage, Reference, RegistryTarget, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ReportEntry, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, RuleContext, RuleDefinition, RuleProblem, RuleSeverity, SlackChangelogFormat, SlackCredentials, SlackOptions, SlackPackageEntry, SlackRichTextBlock, SlackRichTextElement, SlackRichTextInline, SlackRichTextLink, SlackRichTextList, SlackRichTextPreformatted, SlackRichTextQuote, SlackRichTextSection, SlackRichTextStyle, SlackRichTextText, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode, WorkspacePackage };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BUILT_IN_RULES, C as COMMITLINT_RULES_URL, N as NEW_PACKAGE_MARKER, P as PR_COMMENT_MARKER, S as SLACK_HEADER_MAX_LENGTH, a as SLACK_MAX_BLOCKS, b as SLACK_RICH_TEXT_BLOCK_MAX_LENGTH, c as SLACK_RICH_TEXT_MESSAGE_MAX_LENGTH, d as SLACK_SECTION_MAX_LENGTH, e as SLACK_SUMMARY_MAX_LENGTH, f as STRICT_HEADER_PATTERN, g as assertBranchUpToDateWithRemote, h as assertRefAvailable, i as assertReleaseTagsAvailable, j as buildChangelogBody, k as buildCommentBody, l as buildCompareLink, m as buildContributors, n as buildReleaseSummary, o as bump, p as capReleaseTypeForZeroMajor, q as changelog, r as checkGitStatusIfDirty, s as collectContributorNames, t as collectPackageBumps, u as commitlint, v as confirmBump, w as createCommitAndTags, x as createGitlabRelease, y as defineConfig, z as detectGitProvider, A as detectPackageManager, D as detectPullRequest, E as determinePublishTag, F as determineReleaseType, G as determineSemverChange, H as executeBuildCmd, I as executeFormatCmd, J as executeHook, K as expandPackagesToBumpWithDependents, L as extractChangelogSummary, M as extractVersionFromPackageTag, O as extractVersionFromRepoTag, Q as extractVersionFromTag, R as fetchGitTags, T as filterOutPrivatePackages, U as filterPrivatePackagesUnlessIncluded, V as findGitHubPR, W as findGitLabMR, X as findPackageByScope, Y as findReachableCommitBySubject, Z as formatChangelogForSlack, _ as formatCommitResult, $ as formatGithubAnnotations, a0 as formatHowToFix, a1 as formatJsonReport, a2 as formatPackagesForSlack, a3 as formatReleaseEffect, a4 as formatSlackMessage, a5 as formatTextReport, a6 as formatTweetMessage, a7 as generateChangelog, a8 as generateMarkDown, a9 as getAllowedScopes, aa as getAuthCommand, ab as getBumpedIndependentPackages, ac as getBumpedPackageIndependently, ad as getCIName, ae as getCanaryVersion, af as getChangelogLinter, ag as getChangelogTitle, ah as getCommentChar, ai as getCommitChangedFiles, aj as getCommitMessageFile, ak as getCommitSubject, al as getCommitsInRange, am as getCurrentGitBranch, an as getCurrentGitRef, ao as getDefaultConfig, ap as getDependentsOf, aq as getFirstCommit, ar as getGitDiff, as as getGitStatus, at as getGitUpstream, au as getIndependentTag, av as getLastPackageTag, aw as getLastRepoTag, ax as getLastStableTag, ay as getLastTag, az as getModifiedReleaseFilePatterns, aA as getNewPackageCompareBase, aB as getNpmRegistry, aC as getPackageCommits, aD as getPackageDependencies, aE as
|
|
1
|
+
export { B as BUILT_IN_RULES, C as COMMITLINT_RULES_URL, N as NEW_PACKAGE_MARKER, P as PR_COMMENT_MARKER, S as SLACK_HEADER_MAX_LENGTH, a as SLACK_MAX_BLOCKS, b as SLACK_RICH_TEXT_BLOCK_MAX_LENGTH, c as SLACK_RICH_TEXT_MESSAGE_MAX_LENGTH, d as SLACK_SECTION_MAX_LENGTH, e as SLACK_SUMMARY_MAX_LENGTH, f as STRICT_HEADER_PATTERN, g as assertBranchUpToDateWithRemote, h as assertRefAvailable, i as assertReleaseTagsAvailable, j as buildChangelogBody, k as buildCommentBody, l as buildCompareLink, m as buildContributors, n as buildReleaseSummary, o as bump, p as capReleaseTypeForZeroMajor, q as changelog, r as checkGitStatusIfDirty, s as collectContributorNames, t as collectPackageBumps, u as commitlint, v as confirmBump, w as createCommitAndTags, x as createGitlabRelease, y as defineConfig, z as detectGitProvider, A as detectPackageManager, D as detectPullRequest, E as determinePublishTag, F as determineReleaseType, G as determineSemverChange, H as executeBuildCmd, I as executeFormatCmd, J as executeHook, K as expandPackagesToBumpWithDependents, L as extractChangelogSummary, M as extractVersionFromPackageTag, O as extractVersionFromRepoTag, Q as extractVersionFromTag, R as fetchGitTags, T as filterOutPrivatePackages, U as filterPrivatePackagesUnlessIncluded, V as findGitHubPR, W as findGitLabMR, X as findPackageByScope, Y as findReachableCommitBySubject, Z as formatChangelogForSlack, _ as formatCommitResult, $ as formatGithubAnnotations, a0 as formatHowToFix, a1 as formatJsonReport, a2 as formatPackagesForSlack, a3 as formatReleaseEffect, a4 as formatSlackMessage, a5 as formatTextReport, a6 as formatTweetMessage, a7 as generateChangelog, a8 as generateMarkDown, a9 as getAllowedScopes, aa as getAuthCommand, ab as getBumpedIndependentPackages, ac as getBumpedPackageIndependently, ad as getCIName, ae as getCanaryVersion, af as getChangelogLinter, ag as getChangelogTitle, ah as getCommentChar, ai as getCommitChangedFiles, aj as getCommitMessageFile, ak as getCommitSubject, al as getCommitsInRange, am as getCurrentGitBranch, an as getCurrentGitRef, ao as getDefaultConfig, ap as getDependentsOf, aq as getFirstCommit, ar as getGitDiff, as as getGitStatus, at as getGitUpstream, au as getIndependentTag, av as getLastPackageTag, aw as getLastRepoTag, ax as getLastStableTag, ay as getLastTag, az as getModifiedReleaseFilePatterns, aA as getNewPackageCompareBase, aB as getNpmRegistry, aC as getPackageCommits, aD as getPackageDependencies, aE as getPackageManagerWorkspaces, aF as getPackageNewVersion, aG as getPackages, aH as getPackagesOfFiles, aI as getPackagesOrBumpedPackages, aJ as getPackagesToPublishInIndependentMode, aK as getPackagesToPublishInSelectiveMode, aL as getPreid, aM as getPullRequestTitle, aN as getReleaseTagNames, aO as getReleaseUrl, aP as getRootPackage, aQ as getShortCommitSha, aR as getSlackToken, aS as getSlackWebhookUrl, aT as getStagedFiles, aU as getTwitterCredentials, aV as getWorkspacePackages, aW as github, aX as gitlab, aY as globDirsAbsolute, aZ as hasLernaJson, a_ as installCommitMsgHook, a$ as isAllowedCommit, b0 as isAncestor, b1 as isBumpedPackage, b2 as isChangedPreid, b3 as isCommitInPackage, b4 as isCommitOnlyInIgnoredPackages, b5 as isGraduating, b6 as isGraduatingToStableBetweenVersion, b7 as isIgnoredCommitMessage, b8 as isInCI, b9 as isPrerelease, ba as isPrereleaseReleaseType, bb as isStableReleaseType, bc as isTagVersionCompatibleWithCurrent, bd as isVersionAlreadyPublishedError, be as isVersionPublished, bf as lintCommitMessage, bg as listTags, bh as loadRelizyConfig, bi as markdownToSlackMrkdwn, bj as markdownToSlackRichText, bk as mergeTypes, bl as normalizeRuleConfig, bm as parseChangelogMarkdown, bn as parseGitRemoteUrl, bo as postPrComment, bp as postReleaseToSlack, bq as postReleaseToTwitter, br as prComment, bs as providerRelease, bt as providerReleaseSafetyCheck, bu as publish, bv as publishPackage, bw as publishSafetyCheck, bx as pushCommitAndTags, by as pushTagForce, bz as readCommitMessageFile, bA as readPackageJson, bB as readPackages, bC as reconcileFromTag, bD as redactSecrets, bE as release, bF as renderChangelogEntry, bG as resetRewrittenTagCache, bH as resolveAllConfiguredRegistryTargets, bI as resolveDefaultRangeStart, bJ as resolveIgnoredPackagePaths, bK as resolveRegistryTargetsForPackage, bL as resolveRegistryTargetsForPackages, bM as resolveSlackPostMaxLength, bN as resolveTags, bO as retagAnnotatedLocal, bP as richTextToPlainText, bQ as rollbackModifiedFiles, bR as shouldFilterPrereleaseTags, bS as shouldUseColors, bT as sliceSlackText, bU as social, bV as socialSafetyCheck, bW as splitCommitMessage, bX as stripGitComments, bY as summarizeResults, bZ as tagExists, b_ as topologicalSort, b$ as tryPostPrComment, c0 as updateLernaVersion, c1 as withRegistryNpmrc, c2 as writeChangelogToFile, c3 as writeVersion } from './shared/relizy.BY26Mk10.mjs';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import '@maz-ui/node';
|
|
@@ -9,6 +9,7 @@ import 'node:url';
|
|
|
9
9
|
import 'mdast-util-from-markdown';
|
|
10
10
|
import 'mdast-util-gfm';
|
|
11
11
|
import 'micromark-extension-gfm';
|
|
12
|
+
import 'confbox';
|
|
12
13
|
import 'fast-glob';
|
|
13
14
|
import 'changelogen';
|
|
14
15
|
import '@maz-ui/utils/helpers/formatJson';
|
|
@@ -8,6 +8,7 @@ import { pathToFileURL } from 'node:url';
|
|
|
8
8
|
import { fromMarkdown } from 'mdast-util-from-markdown';
|
|
9
9
|
import { gfmFromMarkdown } from 'mdast-util-gfm';
|
|
10
10
|
import { gfm } from 'micromark-extension-gfm';
|
|
11
|
+
import { parseYAML, parseJSONC } from 'confbox';
|
|
11
12
|
import fastGlob from 'fast-glob';
|
|
12
13
|
import { parseCommits, resolveRepoConfig, getRepoConfig, formatCompareChanges, formatReference, createGithubRelease } from 'changelogen';
|
|
13
14
|
import { formatJson } from '@maz-ui/utils/helpers/formatJson';
|
|
@@ -508,14 +509,23 @@ function resolveIgnoredPackagePaths(config) {
|
|
|
508
509
|
}
|
|
509
510
|
return [...paths].filter(Boolean);
|
|
510
511
|
}
|
|
512
|
+
function unquoteGitPath(path) {
|
|
513
|
+
return path.length > 1 && path.startsWith('"') && path.endsWith('"') ? path.slice(1, -1) : path;
|
|
514
|
+
}
|
|
515
|
+
function getNameStatusPaths(commit) {
|
|
516
|
+
return commit.body.split("\n").filter((line) => /^[A-Z]\d*\t/.test(line)).map((line) => line.split(" ").slice(1).map((path) => unquoteGitPath(path.trim())).filter(Boolean)).filter((paths) => paths.length > 0);
|
|
517
|
+
}
|
|
511
518
|
function getCommitChangedFiles(commit) {
|
|
512
|
-
return commit
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
519
|
+
return getNameStatusPaths(commit).map((paths) => paths[paths.length - 1]);
|
|
520
|
+
}
|
|
521
|
+
function isUnderPath(file, directory) {
|
|
522
|
+
return file === directory || file.startsWith(`${directory}/`);
|
|
516
523
|
}
|
|
517
524
|
function isUnderIgnoredPath(file, ignoredPaths) {
|
|
518
|
-
return ignoredPaths.some((ignored) => file
|
|
525
|
+
return ignoredPaths.some((ignored) => isUnderPath(file, ignored));
|
|
526
|
+
}
|
|
527
|
+
function isCommitInPackage(commit, packageRelativePath) {
|
|
528
|
+
return getNameStatusPaths(commit).some((paths) => paths.some((file) => isUnderPath(file, packageRelativePath)));
|
|
519
529
|
}
|
|
520
530
|
function isCommitOnlyInIgnoredPackages(commit, ignoredPaths) {
|
|
521
531
|
if (ignoredPaths.length === 0) {
|
|
@@ -846,7 +856,7 @@ async function getPackageCommits({
|
|
|
846
856
|
return true;
|
|
847
857
|
}
|
|
848
858
|
const packageRelativePath = relative(changelogConfig.cwd, pkg.path).split(sep).join("/");
|
|
849
|
-
return commit
|
|
859
|
+
return isCommitInPackage(commit, packageRelativePath);
|
|
850
860
|
});
|
|
851
861
|
logger.debug(`Found ${commits.length} commit(s) for ${pkg.name} from ${from} to ${to}`);
|
|
852
862
|
if (commits.length > 0) {
|
|
@@ -2716,7 +2726,8 @@ function getDefaultConfig() {
|
|
|
2716
2726
|
customRules: {},
|
|
2717
2727
|
ignores: [],
|
|
2718
2728
|
defaultIgnores: true,
|
|
2719
|
-
title: false
|
|
2729
|
+
title: false,
|
|
2730
|
+
codeBlocksLinter: "auto"
|
|
2720
2731
|
},
|
|
2721
2732
|
social: {
|
|
2722
2733
|
twitter: {
|
|
@@ -3712,36 +3723,44 @@ const CHANGELOG_FILE = "CHANGELOG.md";
|
|
|
3712
3723
|
function getLine(text, line) {
|
|
3713
3724
|
return (text.split("\n")[line - 1] ?? "").trim();
|
|
3714
3725
|
}
|
|
3715
|
-
async function loadProjectEslint(cwd) {
|
|
3726
|
+
async function loadProjectEslint(cwd, required = false) {
|
|
3727
|
+
const unavailable = (reason, error) => {
|
|
3728
|
+
if (required) {
|
|
3729
|
+
throw new Error(`commitlint: codeBlocksLinter is "eslint" but ${reason}`);
|
|
3730
|
+
}
|
|
3731
|
+
logger.debug(`commitlint: ${reason}, using the built-in parser`, ...error ? [error] : []);
|
|
3732
|
+
return void 0;
|
|
3733
|
+
};
|
|
3716
3734
|
let eslintPath;
|
|
3717
3735
|
try {
|
|
3718
3736
|
eslintPath = createRequire(join(cwd, "package.json")).resolve("eslint");
|
|
3719
3737
|
} catch {
|
|
3720
|
-
return
|
|
3738
|
+
return unavailable("ESLint is not installed in the project");
|
|
3721
3739
|
}
|
|
3740
|
+
const filePath = join(cwd, CHANGELOG_FILE);
|
|
3741
|
+
let eslint;
|
|
3742
|
+
let lintsChangelogs;
|
|
3722
3743
|
try {
|
|
3723
3744
|
const { ESLint } = await import(pathToFileURL(eslintPath).href);
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
if (await eslint.isPathIgnored(filePath) || !await eslint.calculateConfigForFile(filePath)) {
|
|
3727
|
-
logger.debug("commitlint: ESLint does not lint the changelogs, using the built-in parser");
|
|
3728
|
-
return void 0;
|
|
3729
|
-
}
|
|
3730
|
-
return {
|
|
3731
|
-
name: "eslint",
|
|
3732
|
-
async lint(markdown) {
|
|
3733
|
-
const [result] = await eslint.lintText(markdown, { filePath });
|
|
3734
|
-
const output = result?.output ?? markdown;
|
|
3735
|
-
return (result?.messages ?? []).filter((message) => message.severity === 2).map((message) => {
|
|
3736
|
-
const rule = message.ruleId ? ` (${message.ruleId})` : "";
|
|
3737
|
-
return `${message.message.replace(/\.$/, "")}${rule}, on "${getLine(output, message.line)}"`;
|
|
3738
|
-
});
|
|
3739
|
-
}
|
|
3740
|
-
};
|
|
3745
|
+
eslint = new ESLint({ cwd, fix: true });
|
|
3746
|
+
lintsChangelogs = !await eslint.isPathIgnored(filePath) && Boolean(await eslint.calculateConfigForFile(filePath));
|
|
3741
3747
|
} catch (error) {
|
|
3742
|
-
|
|
3743
|
-
return void 0;
|
|
3748
|
+
return unavailable("ESLint could not be loaded", error);
|
|
3744
3749
|
}
|
|
3750
|
+
if (!lintsChangelogs) {
|
|
3751
|
+
return unavailable(`the ESLint config of the project does not lint ${CHANGELOG_FILE}`);
|
|
3752
|
+
}
|
|
3753
|
+
return {
|
|
3754
|
+
name: "eslint",
|
|
3755
|
+
async lint(markdown) {
|
|
3756
|
+
const [result] = await eslint.lintText(markdown, { filePath });
|
|
3757
|
+
const output = result?.output ?? markdown;
|
|
3758
|
+
return (result?.messages ?? []).filter((message) => message.severity === 2).map((message) => {
|
|
3759
|
+
const rule = message.ruleId ? ` (${message.ruleId})` : "";
|
|
3760
|
+
return `${message.message.replace(/\.$/, "")}${rule}, on "${getLine(output, message.line)}"`;
|
|
3761
|
+
});
|
|
3762
|
+
}
|
|
3763
|
+
};
|
|
3745
3764
|
}
|
|
3746
3765
|
const CODE_BLOCK_EXTENSIONS = {
|
|
3747
3766
|
js: "js",
|
|
@@ -3805,11 +3824,12 @@ function createBuiltInLinter() {
|
|
|
3805
3824
|
};
|
|
3806
3825
|
}
|
|
3807
3826
|
const linters = /* @__PURE__ */ new Map();
|
|
3808
|
-
function getChangelogLinter(cwd) {
|
|
3809
|
-
|
|
3827
|
+
function getChangelogLinter(cwd, choice = "auto") {
|
|
3828
|
+
const key = `${choice}:${cwd}`;
|
|
3829
|
+
let linter = linters.get(key);
|
|
3810
3830
|
if (!linter) {
|
|
3811
|
-
linter = loadProjectEslint(cwd).then((eslint) => eslint ?? createBuiltInLinter());
|
|
3812
|
-
linters.set(
|
|
3831
|
+
linter = choice === "oxc" ? Promise.resolve(createBuiltInLinter()) : loadProjectEslint(cwd, choice === "eslint").then((eslint) => eslint ?? createBuiltInLinter());
|
|
3832
|
+
linters.set(key, linter);
|
|
3813
3833
|
}
|
|
3814
3834
|
return linter;
|
|
3815
3835
|
}
|
|
@@ -3875,8 +3895,26 @@ function getFetchHistoryHint() {
|
|
|
3875
3895
|
function isShallowRepository(cwd) {
|
|
3876
3896
|
return gitOrUndefined(["rev-parse", "--is-shallow-repository"], cwd) === "true";
|
|
3877
3897
|
}
|
|
3898
|
+
function fetchHistory(cwd, { refspecs = [], tags = false } = {}) {
|
|
3899
|
+
const shallow = isShallowRepository(cwd);
|
|
3900
|
+
if (!shallow && refspecs.length === 0 && !tags) {
|
|
3901
|
+
return false;
|
|
3902
|
+
}
|
|
3903
|
+
const args = ["fetch", "--quiet", ...tags ? ["--tags"] : ["--no-tags"], ...shallow ? ["--unshallow"] : [], "origin", ...refspecs];
|
|
3904
|
+
logger.debug(`commitlint: git ${args.join(" ")}`);
|
|
3905
|
+
try {
|
|
3906
|
+
git(args, cwd);
|
|
3907
|
+
return true;
|
|
3908
|
+
} catch (error) {
|
|
3909
|
+
logger.debug(`commitlint: the fetch failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
3910
|
+
return false;
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
function isRefAvailable(ref, cwd) {
|
|
3914
|
+
return Boolean(gitOrUndefined(["rev-parse", "--verify", "--quiet", `${ref}^{commit}`], cwd));
|
|
3915
|
+
}
|
|
3878
3916
|
function assertRefAvailable(ref, cwd) {
|
|
3879
|
-
if (
|
|
3917
|
+
if (isRefAvailable(ref, cwd) || isShallowRepository(cwd) && fetchHistory(cwd, { tags: true }) && isRefAvailable(ref, cwd)) {
|
|
3880
3918
|
return;
|
|
3881
3919
|
}
|
|
3882
3920
|
const reason = isShallowRepository(cwd) ? `the repository is a shallow clone: fetch the full history (${getFetchHistoryHint()})` : "fetch it before linting";
|
|
@@ -3901,7 +3939,8 @@ function getPullRequestTitle() {
|
|
|
3901
3939
|
async function resolveDefaultRangeStart({ cwd, logLevel }) {
|
|
3902
3940
|
const githubBase = process$1.env.GITHUB_BASE_REF;
|
|
3903
3941
|
if (githubBase) {
|
|
3904
|
-
const
|
|
3942
|
+
const getMergeBase = () => gitOrUndefined(["merge-base", `origin/${githubBase}`, "HEAD"], cwd);
|
|
3943
|
+
const mergeBase = getMergeBase() ?? (fetchHistory(cwd, { refspecs: [`+refs/heads/${githubBase}:refs/remotes/origin/${githubBase}`] }) ? getMergeBase() : void 0);
|
|
3905
3944
|
if (!mergeBase) {
|
|
3906
3945
|
throw new Error(`Cannot find the merge-base of HEAD and origin/${githubBase}: fetch the history of the base branch (${getFetchHistoryHint()}), or pass --from`);
|
|
3907
3946
|
}
|
|
@@ -4053,14 +4092,14 @@ function suggestScope(scope, allowedScopes) {
|
|
|
4053
4092
|
}
|
|
4054
4093
|
return findClosest(cleaned, allowedScopes) ?? cleaned;
|
|
4055
4094
|
}
|
|
4056
|
-
function suggestSubject(subject) {
|
|
4095
|
+
function suggestSubject(subject, lowercase) {
|
|
4057
4096
|
let suggested = subject.trim();
|
|
4058
4097
|
if (suggested.endsWith(".") && !suggested.endsWith("...")) {
|
|
4059
4098
|
suggested = suggested.slice(0, -1);
|
|
4060
4099
|
}
|
|
4061
|
-
return /^[A-Z][^A-Z]/.test(suggested) ? `${suggested[0].toLowerCase()}${suggested.slice(1)}` : suggested;
|
|
4100
|
+
return lowercase && /^[A-Z][^A-Z]/.test(suggested) ? `${suggested[0].toLowerCase()}${suggested.slice(1)}` : suggested;
|
|
4062
4101
|
}
|
|
4063
|
-
function suggestHeader(header, { types, allowedScopes }) {
|
|
4102
|
+
function suggestHeader(header, { types, allowedScopes, lowercaseSubject = false }) {
|
|
4064
4103
|
const trimmed = header.trim();
|
|
4065
4104
|
const revert = /^Revert "(?<reverted>.+)"$/.exec(trimmed)?.groups?.reverted;
|
|
4066
4105
|
if (revert) {
|
|
@@ -4072,15 +4111,51 @@ function suggestHeader(header, { types, allowedScopes }) {
|
|
|
4072
4111
|
}
|
|
4073
4112
|
const type = suggestType(groups.type, types);
|
|
4074
4113
|
const scope = groups.scope === void 0 || groups.scope.trim() === "" ? "" : `(${suggestScope(groups.scope, allowedScopes)})`;
|
|
4075
|
-
const suggested = `${type}${scope}${groups.breaking ?? ""}: ${suggestSubject(groups.subject)}`;
|
|
4114
|
+
const suggested = `${type}${scope}${groups.breaking ?? ""}: ${suggestSubject(groups.subject, lowercaseSubject)}`;
|
|
4076
4115
|
return suggested === header ? void 0 : suggested;
|
|
4077
4116
|
}
|
|
4078
4117
|
|
|
4079
4118
|
function getShortName(name) {
|
|
4080
4119
|
return name.startsWith("@") ? name.slice(name.indexOf("/") + 1) : name;
|
|
4081
4120
|
}
|
|
4121
|
+
function readFile(path) {
|
|
4122
|
+
try {
|
|
4123
|
+
return readFileSync(path, "utf8");
|
|
4124
|
+
} catch {
|
|
4125
|
+
return void 0;
|
|
4126
|
+
}
|
|
4127
|
+
}
|
|
4128
|
+
function toStrings(value) {
|
|
4129
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
4130
|
+
}
|
|
4131
|
+
function readConfigFile(cwd, file) {
|
|
4132
|
+
const content = readFile(join(cwd, file));
|
|
4133
|
+
if (content === void 0) {
|
|
4134
|
+
return void 0;
|
|
4135
|
+
}
|
|
4136
|
+
try {
|
|
4137
|
+
const parsed = file.endsWith(".yaml") ? parseYAML(content) : parseJSONC(content);
|
|
4138
|
+
return parsed && typeof parsed === "object" ? parsed : void 0;
|
|
4139
|
+
} catch {
|
|
4140
|
+
return void 0;
|
|
4141
|
+
}
|
|
4142
|
+
}
|
|
4143
|
+
function getPackageManagerWorkspaces(cwd) {
|
|
4144
|
+
const workspaces = readConfigFile(cwd, "package.json")?.workspaces;
|
|
4145
|
+
return [.../* @__PURE__ */ new Set([
|
|
4146
|
+
...toStrings(Array.isArray(workspaces) ? workspaces : workspaces?.packages),
|
|
4147
|
+
...toStrings(readConfigFile(cwd, "pnpm-workspace.yaml")?.packages),
|
|
4148
|
+
...toStrings(readConfigFile(cwd, "lerna.json")?.packages),
|
|
4149
|
+
...toStrings((readConfigFile(cwd, "rush.json")?.projects ?? []).map((project) => project?.projectFolder)),
|
|
4150
|
+
...toStrings((readConfigFile(cwd, "deno.json") ?? readConfigFile(cwd, "deno.jsonc"))?.workspace)
|
|
4151
|
+
])];
|
|
4152
|
+
}
|
|
4082
4153
|
function getWorkspacePackages(config) {
|
|
4083
|
-
const patterns = [
|
|
4154
|
+
const patterns = [...new Set([
|
|
4155
|
+
...config.monorepo?.packages ?? [],
|
|
4156
|
+
...getPackageManagerWorkspaces(config.cwd),
|
|
4157
|
+
...config.commitlint?.packages ?? []
|
|
4158
|
+
].map((pattern) => pattern.replace(/^\.\//, "")))];
|
|
4084
4159
|
if (patterns.length === 0) {
|
|
4085
4160
|
return [];
|
|
4086
4161
|
}
|
|
@@ -4120,7 +4195,7 @@ function findPackageByScope(scope, packages) {
|
|
|
4120
4195
|
return packages.find((pkg) => pkg.scopes.includes(scope));
|
|
4121
4196
|
}
|
|
4122
4197
|
|
|
4123
|
-
const STRICT_HEADER_PATTERN = /^(?<type>[a-z]+)(?:\((?<scope>[^()\s]+)\))?(?<breaking>!)?: (?<subject>\S.*)$/;
|
|
4198
|
+
const STRICT_HEADER_PATTERN = /^(?<type>[a-z]+)(?:\((?<scope>[^()\s]+)\))?(?<breaking>!)?: +(?<subject>\S.*)$/;
|
|
4124
4199
|
const GENERIC_SUBJECTS = /* @__PURE__ */ new Set(["wip", "fix", "fixes", "fixed", "update", "updates", "updated", "change", "changes", "changed", "misc", "stuff", "tmp", "temp", "test", "tests", "cleanup", "clean", "refactor", "minor", "typo", "typos", "improvements", "tweaks"]);
|
|
4125
4200
|
const MAX_LISTED_SCOPES = 20;
|
|
4126
4201
|
function parseMarkdown$1(markdown) {
|
|
@@ -4260,8 +4335,10 @@ const BUILT_IN_RULES = {
|
|
|
4260
4335
|
return [{ message: `The scope "${commit.scope}" designates ${pkg.path}, but ${touched.message}`, fix: touched.fix }];
|
|
4261
4336
|
}
|
|
4262
4337
|
},
|
|
4338
|
+
// Off by default: the changelog capitalizes the subject anyway, and names
|
|
4339
|
+
// such as "MazChart" are legitimate
|
|
4263
4340
|
"subject-case": {
|
|
4264
|
-
severity: "
|
|
4341
|
+
severity: "off",
|
|
4265
4342
|
conventionalOnly: true,
|
|
4266
4343
|
check: ({ commit }) => (
|
|
4267
4344
|
// An uppercase first letter followed by a non uppercase one: acronyms ("API ...") are fine
|
|
@@ -4333,7 +4410,7 @@ const BUILT_IN_RULES = {
|
|
|
4333
4410
|
if (!entry) {
|
|
4334
4411
|
return [];
|
|
4335
4412
|
}
|
|
4336
|
-
const linter = await getChangelogLinter(config.cwd);
|
|
4413
|
+
const linter = await getChangelogLinter(config.cwd, config.commitlint?.codeBlocksLinter);
|
|
4337
4414
|
const problems = await linter.lint(`# Changelog
|
|
4338
4415
|
|
|
4339
4416
|
## v0.0.0
|
|
@@ -4534,7 +4611,8 @@ async function getSuggestion(message, result, options, allowedScopes) {
|
|
|
4534
4611
|
if (!errors.some((rule) => HEADER_RULES.has(rule))) {
|
|
4535
4612
|
return void 0;
|
|
4536
4613
|
}
|
|
4537
|
-
const
|
|
4614
|
+
const lowercaseSubject = errors.includes("subject-case");
|
|
4615
|
+
const header = suggestHeader(result.commit.header, { types: Object.keys(options.config.types ?? {}), allowedScopes, lowercaseSubject });
|
|
4538
4616
|
if (!header) {
|
|
4539
4617
|
return void 0;
|
|
4540
4618
|
}
|
|
@@ -9188,4 +9266,4 @@ async function release(options = {}) {
|
|
|
9188
9266
|
}
|
|
9189
9267
|
}
|
|
9190
9268
|
|
|
9191
|
-
export { formatGithubAnnotations as $, detectPackageManager as A, BUILT_IN_RULES as B, COMMITLINT_RULES_URL as C, detectPullRequest as D, determinePublishTag as E, determineReleaseType as F, determineSemverChange as G, executeBuildCmd as H, executeFormatCmd as I, executeHook as J, expandPackagesToBumpWithDependents as K, extractChangelogSummary as L, extractVersionFromPackageTag$1 as M, NEW_PACKAGE_MARKER as N, extractVersionFromRepoTag as O, PR_COMMENT_MARKER as P, extractVersionFromTag as Q, fetchGitTags as R, SLACK_HEADER_MAX_LENGTH as S, filterOutPrivatePackages as T, filterPrivatePackagesUnlessIncluded as U, findGitHubPR as V, findGitLabMR as W, findPackageByScope as X, findReachableCommitBySubject as Y, formatChangelogForSlack as Z, formatCommitResult as _, SLACK_MAX_BLOCKS as a,
|
|
9269
|
+
export { formatGithubAnnotations as $, detectPackageManager as A, BUILT_IN_RULES as B, COMMITLINT_RULES_URL as C, detectPullRequest as D, determinePublishTag as E, determineReleaseType as F, determineSemverChange as G, executeBuildCmd as H, executeFormatCmd as I, executeHook as J, expandPackagesToBumpWithDependents as K, extractChangelogSummary as L, extractVersionFromPackageTag$1 as M, NEW_PACKAGE_MARKER as N, extractVersionFromRepoTag as O, PR_COMMENT_MARKER as P, extractVersionFromTag as Q, fetchGitTags as R, SLACK_HEADER_MAX_LENGTH as S, filterOutPrivatePackages as T, filterPrivatePackagesUnlessIncluded as U, findGitHubPR as V, findGitLabMR as W, findPackageByScope as X, findReachableCommitBySubject as Y, formatChangelogForSlack as Z, formatCommitResult as _, SLACK_MAX_BLOCKS as a, isAllowedCommit as a$, formatHowToFix as a0, formatJsonReport as a1, formatPackagesForSlack as a2, formatReleaseEffect as a3, formatSlackMessage as a4, formatTextReport as a5, formatTweetMessage as a6, generateChangelog as a7, generateMarkDown as a8, getAllowedScopes as a9, getNewPackageCompareBase as aA, getNpmRegistry as aB, getPackageCommits as aC, getPackageDependencies as aD, getPackageManagerWorkspaces as aE, getPackageNewVersion as aF, getPackages as aG, getPackagesOfFiles as aH, getPackagesOrBumpedPackages as aI, getPackagesToPublishInIndependentMode as aJ, getPackagesToPublishInSelectiveMode as aK, getPreid as aL, getPullRequestTitle as aM, getReleaseTagNames as aN, getReleaseUrl as aO, getRootPackage as aP, getShortCommitSha as aQ, getSlackToken as aR, getSlackWebhookUrl as aS, getStagedFiles as aT, getTwitterCredentials as aU, getWorkspacePackages as aV, github as aW, gitlab as aX, globDirsAbsolute as aY, hasLernaJson as aZ, installCommitMsgHook as a_, getAuthCommand as aa, getBumpedIndependentPackages as ab, getBumpedPackageIndependently as ac, getCIName as ad, getCanaryVersion as ae, getChangelogLinter as af, getChangelogTitle as ag, getCommentChar as ah, getCommitChangedFiles as ai, getCommitMessageFile as aj, getCommitSubject as ak, getCommitsInRange as al, getCurrentGitBranch as am, getCurrentGitRef as an, getDefaultConfig as ao, getDependentsOf as ap, getFirstCommit as aq, getGitDiff as ar, getGitStatus as as, getGitUpstream as at, getIndependentTag as au, getLastPackageTag as av, getLastRepoTag as aw, getLastStableTag as ax, getLastTag as ay, getModifiedReleaseFilePatterns as az, SLACK_RICH_TEXT_BLOCK_MAX_LENGTH as b, tryPostPrComment as b$, isAncestor as b0, isBumpedPackage as b1, isChangedPreid as b2, isCommitInPackage as b3, isCommitOnlyInIgnoredPackages as b4, isGraduating as b5, isGraduatingToStableBetweenVersion as b6, isIgnoredCommitMessage as b7, isInCI as b8, isPrerelease as b9, readPackageJson as bA, readPackages as bB, reconcileFromTag as bC, redactSecrets as bD, release as bE, renderChangelogEntry as bF, resetRewrittenTagCache as bG, resolveAllConfiguredRegistryTargets as bH, resolveDefaultRangeStart as bI, resolveIgnoredPackagePaths as bJ, resolveRegistryTargetsForPackage as bK, resolveRegistryTargetsForPackages as bL, resolveSlackPostMaxLength as bM, resolveTags as bN, retagAnnotatedLocal as bO, richTextToPlainText as bP, rollbackModifiedFiles as bQ, shouldFilterPrereleaseTags as bR, shouldUseColors as bS, sliceSlackText as bT, social as bU, socialSafetyCheck as bV, splitCommitMessage as bW, stripGitComments as bX, summarizeResults as bY, tagExists as bZ, topologicalSort as b_, isPrereleaseReleaseType as ba, isStableReleaseType as bb, isTagVersionCompatibleWithCurrent as bc, isVersionAlreadyPublishedError as bd, isVersionPublished as be, lintCommitMessage as bf, listTags as bg, loadRelizyConfig as bh, markdownToSlackMrkdwn as bi, markdownToSlackRichText as bj, mergeTypes as bk, normalizeRuleConfig as bl, parseChangelogMarkdown as bm, parseGitRemoteUrl as bn, postPrComment as bo, postReleaseToSlack as bp, postReleaseToTwitter as bq, prComment as br, providerRelease as bs, providerReleaseSafetyCheck as bt, publish as bu, publishPackage as bv, publishSafetyCheck as bw, pushCommitAndTags as bx, pushTagForce as by, readCommitMessageFile as bz, SLACK_RICH_TEXT_MESSAGE_MAX_LENGTH as c, updateLernaVersion as c0, withRegistryNpmrc as c1, writeChangelogToFile as c2, writeVersion as c3, SLACK_SECTION_MAX_LENGTH as d, SLACK_SUMMARY_MAX_LENGTH as e, STRICT_HEADER_PATTERN as f, assertBranchUpToDateWithRemote as g, assertRefAvailable as h, assertReleaseTagsAvailable as i, buildChangelogBody as j, buildCommentBody as k, buildCompareLink as l, buildContributors as m, buildReleaseSummary as n, bump as o, capReleaseTypeForZeroMajor as p, changelog as q, checkGitStatusIfDirty as r, collectContributorNames as s, collectPackageBumps as t, commitlint as u, confirmBump as v, createCommitAndTags as w, createGitlabRelease as x, defineConfig as y, detectGitProvider as z };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "relizy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.11.1",
|
|
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",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"c12": "^3.3.3",
|
|
82
82
|
"changelogen": "^0.6.2",
|
|
83
83
|
"commander": "^15.0.0",
|
|
84
|
+
"confbox": "^0.2.4",
|
|
84
85
|
"convert-gitmoji": "^0.1.5",
|
|
85
86
|
"defu": "6.1.7",
|
|
86
87
|
"fast-glob": "^3.3.2",
|