relizy 1.4.9 → 1.5.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli.mjs +2 -1
- package/dist/index.d.mts +93 -4
- package/dist/index.d.ts +93 -4
- package/dist/index.mjs +2 -1
- package/dist/shared/{relizy.C95AEGVa.mjs → relizy.Bpfgbc-1.mjs} +290 -117
- package/package.json +17 -15
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ Imagine you have multiple packages in your project (like a box with several toys
|
|
|
54
54
|
- 🔗 Automatic dependency bumping for workspace dependencies
|
|
55
55
|
- 🐙 GitHub, GitLab & Bitbucket support
|
|
56
56
|
- 🔐 2FA/OTP support for npm publishing
|
|
57
|
-
- 🎛️ Custom registry support (private registries, GitHub Packages, etc.)
|
|
57
|
+
- 🎛️ Custom registry support (private registries, GitHub Packages, etc.), with optional mirroring/routing to multiple registries (Nexus, JFrog, etc.)
|
|
58
58
|
- ⚙️ Multiple configuration files support for different release workflows
|
|
59
59
|
- 🔧 Support for npm, yarn, pnpm, and bun (auto-detected)
|
|
60
60
|
- 📱 Social media integration (Twitter & Slack) for release announcements
|
package/dist/cli.mjs
CHANGED
|
@@ -5,13 +5,14 @@ import process from 'node:process';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { printBanner, logger } from '@maz-ui/node';
|
|
7
7
|
import { Command } from 'commander';
|
|
8
|
-
import {
|
|
8
|
+
import { aD as isInCI, aE as getCIName, b as bump, c as changelog, g as publish, e as providerRelease, h as social, p as prComment, r as release } from './shared/relizy.Bpfgbc-1.mjs';
|
|
9
9
|
import 'node:child_process';
|
|
10
10
|
import '@maz-ui/utils/helpers/formatJson';
|
|
11
11
|
import 'c12';
|
|
12
12
|
import 'changelogen';
|
|
13
13
|
import 'defu';
|
|
14
14
|
import '@inquirer/prompts';
|
|
15
|
+
import 'micromatch';
|
|
15
16
|
import '@maz-ui/utils/helpers/getErrorMessage';
|
|
16
17
|
import 'fast-glob';
|
|
17
18
|
import 'semver';
|
package/dist/index.d.mts
CHANGED
|
@@ -340,10 +340,39 @@ declare function detectPackageManager(cwd?: string): PackageManager;
|
|
|
340
340
|
declare function determinePublishTag(version: string, configTag?: string): string;
|
|
341
341
|
declare function getPackagesToPublishInSelectiveMode(sortedPackages: PackageBase[], rootVersion: string | undefined): PackageBase[];
|
|
342
342
|
declare function getPackagesToPublishInIndependentMode(sortedPackages: PackageBase[], config: ResolvedRelizyConfig): Promise<PackageBase[]>;
|
|
343
|
-
|
|
343
|
+
/**
|
|
344
|
+
* Resolve every distinct registry referenced by the config (legacy `registry`
|
|
345
|
+
* plus every `registries` entry, regardless of package scoping). Conservative
|
|
346
|
+
* fallback for the pre-publish authentication safety check when the package
|
|
347
|
+
* list to publish isn't known yet - prefer `resolveRegistryTargetsForPackages`
|
|
348
|
+
* once it is, so a registry scoped to packages outside this release doesn't
|
|
349
|
+
* needlessly block it.
|
|
350
|
+
*/
|
|
351
|
+
declare function resolveAllConfiguredRegistryTargets(config: ResolvedRelizyConfig): RegistryTarget[];
|
|
352
|
+
/**
|
|
353
|
+
* Resolve the registry targets a given package should be published to: the
|
|
354
|
+
* legacy registry (if any) plus every `registries` entry that either has no
|
|
355
|
+
* `packageFilter` (mirrored to all packages) or whose `packageFilter` glob
|
|
356
|
+
* patterns match the package name.
|
|
357
|
+
*
|
|
358
|
+
* If any applicable entry is marked `exclusive`, the legacy/default registry
|
|
359
|
+
* is skipped for this package - it is published only to the matching
|
|
360
|
+
* registries instead of mirroring on top of the default one.
|
|
361
|
+
*/
|
|
362
|
+
declare function resolveRegistryTargetsForPackage(pkg: PackageBase, config: ResolvedRelizyConfig): RegistryTarget[];
|
|
363
|
+
/**
|
|
364
|
+
* Resolve every distinct registry actually needed to publish the given set of
|
|
365
|
+
* packages - the union of `resolveRegistryTargetsForPackage` across all of
|
|
366
|
+
* them, deduped by registry URL. Used for the pre-publish authentication
|
|
367
|
+
* safety check once the package list to publish is known, so a registry
|
|
368
|
+
* scoped to packages that are not part of this release does not block it.
|
|
369
|
+
*/
|
|
370
|
+
declare function resolveRegistryTargetsForPackages(packages: PackageBase[], config: ResolvedRelizyConfig): RegistryTarget[];
|
|
371
|
+
declare function getAuthCommand({ packageManager, config, otp, registryTarget, }: {
|
|
344
372
|
packageManager: PackageManager;
|
|
345
373
|
config: ResolvedRelizyConfig;
|
|
346
374
|
otp?: string;
|
|
375
|
+
registryTarget?: RegistryTarget;
|
|
347
376
|
}): string;
|
|
348
377
|
declare function publishPackage({ pkg, config, packageManager, dryRun, }: {
|
|
349
378
|
pkg: PackageBase;
|
|
@@ -1198,6 +1227,57 @@ interface SocialOptions {
|
|
|
1198
1227
|
* true = force-enable AI, false = force-disable AI, undefined = use config
|
|
1199
1228
|
*/
|
|
1200
1229
|
ai?: boolean;
|
|
1230
|
+
/**
|
|
1231
|
+
* Prerelease suffix, forwarded to package discovery in independent mode
|
|
1232
|
+
* when no bump result is available (standalone `social` runs).
|
|
1233
|
+
*/
|
|
1234
|
+
suffix?: string;
|
|
1235
|
+
/**
|
|
1236
|
+
* Force package discovery to include all packages (independent standalone runs).
|
|
1237
|
+
* @default false
|
|
1238
|
+
*/
|
|
1239
|
+
force?: boolean;
|
|
1240
|
+
}
|
|
1241
|
+
interface RegistryTarget {
|
|
1242
|
+
/**
|
|
1243
|
+
* Optional label used in logs to identify this registry (e.g. `nexus-internal`)
|
|
1244
|
+
*/
|
|
1245
|
+
name?: string;
|
|
1246
|
+
/**
|
|
1247
|
+
* Registry URL (e.g. `https://registry.npmjs.org/`, a Nexus or JFrog URL)
|
|
1248
|
+
*/
|
|
1249
|
+
registry: string;
|
|
1250
|
+
/**
|
|
1251
|
+
* Registry token - only supported for pnpm and npm
|
|
1252
|
+
*/
|
|
1253
|
+
token?: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* Publish tag (e.g. `latest`)
|
|
1256
|
+
*/
|
|
1257
|
+
tag?: string;
|
|
1258
|
+
/**
|
|
1259
|
+
* Publish access level (e.g. `public` or `restricted`)
|
|
1260
|
+
*/
|
|
1261
|
+
access?: 'public' | 'restricted';
|
|
1262
|
+
/**
|
|
1263
|
+
* OTP for this registry (e.g. `123456`)
|
|
1264
|
+
*/
|
|
1265
|
+
otp?: string;
|
|
1266
|
+
/**
|
|
1267
|
+
* Glob pattern matching package names this registry applies to. Distinct
|
|
1268
|
+
* from `PublishConfig.packages` (which packages get published at all) -
|
|
1269
|
+
* this only routes already-publishable packages to this registry.
|
|
1270
|
+
* Omitted or empty = applies to every publishable package (mirroring).
|
|
1271
|
+
*/
|
|
1272
|
+
packageFilter?: string[];
|
|
1273
|
+
/**
|
|
1274
|
+
* When true, packages matched by this target are published ONLY to this
|
|
1275
|
+
* (and any other matching) registry - the default `publish.registry` is
|
|
1276
|
+
* skipped for them. Without this flag, `registries` is purely additive:
|
|
1277
|
+
* matched packages are published to this registry ON TOP OF the default one.
|
|
1278
|
+
* @default false
|
|
1279
|
+
*/
|
|
1280
|
+
exclusive?: boolean;
|
|
1201
1281
|
}
|
|
1202
1282
|
type PublishConfig = ChangelogConfig$1['publish'] & {
|
|
1203
1283
|
/**
|
|
@@ -1244,6 +1324,14 @@ type PublishConfig = ChangelogConfig$1['publish'] & {
|
|
|
1244
1324
|
* @default 15000
|
|
1245
1325
|
*/
|
|
1246
1326
|
safetyCheckTimeout?: number;
|
|
1327
|
+
/**
|
|
1328
|
+
* Additional registries to publish to, on top of `registry` (if set).
|
|
1329
|
+
* Entries without `packageFilter` apply to every package (mirroring);
|
|
1330
|
+
* entries with `packageFilter` only apply to packages matching one of the
|
|
1331
|
+
* glob patterns. Fully additive: leaving this unset preserves the
|
|
1332
|
+
* single-registry behavior.
|
|
1333
|
+
*/
|
|
1334
|
+
registries?: RegistryTarget[];
|
|
1247
1335
|
};
|
|
1248
1336
|
interface PublishOptions extends PublishConfig {
|
|
1249
1337
|
/**
|
|
@@ -1988,8 +2076,9 @@ declare function providerReleaseSafetyCheck({ config, provider }: {
|
|
|
1988
2076
|
}): Promise<void>;
|
|
1989
2077
|
declare function providerRelease(options?: Partial<ProviderReleaseOptions>): Promise<ProviderReleaseResult>;
|
|
1990
2078
|
|
|
1991
|
-
declare function publishSafetyCheck({ config }: {
|
|
2079
|
+
declare function publishSafetyCheck({ config, packages }: {
|
|
1992
2080
|
config: ResolvedRelizyConfig;
|
|
2081
|
+
packages?: PackageBase[];
|
|
1993
2082
|
}): Promise<void>;
|
|
1994
2083
|
declare function publish(options?: Partial<PublishOptions>): Promise<{
|
|
1995
2084
|
publishedPackages: PackageBase[];
|
|
@@ -2002,5 +2091,5 @@ declare function socialSafetyCheck({ config }: {
|
|
|
2002
2091
|
}): Promise<void>;
|
|
2003
2092
|
declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
|
|
2004
2093
|
|
|
2005
|
-
export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
2006
|
-
export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, SlackCredentials, SlackOptions, SlackPackageEntry, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode };
|
|
2094
|
+
export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
2095
|
+
export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, 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
|
@@ -340,10 +340,39 @@ declare function detectPackageManager(cwd?: string): PackageManager;
|
|
|
340
340
|
declare function determinePublishTag(version: string, configTag?: string): string;
|
|
341
341
|
declare function getPackagesToPublishInSelectiveMode(sortedPackages: PackageBase[], rootVersion: string | undefined): PackageBase[];
|
|
342
342
|
declare function getPackagesToPublishInIndependentMode(sortedPackages: PackageBase[], config: ResolvedRelizyConfig): Promise<PackageBase[]>;
|
|
343
|
-
|
|
343
|
+
/**
|
|
344
|
+
* Resolve every distinct registry referenced by the config (legacy `registry`
|
|
345
|
+
* plus every `registries` entry, regardless of package scoping). Conservative
|
|
346
|
+
* fallback for the pre-publish authentication safety check when the package
|
|
347
|
+
* list to publish isn't known yet - prefer `resolveRegistryTargetsForPackages`
|
|
348
|
+
* once it is, so a registry scoped to packages outside this release doesn't
|
|
349
|
+
* needlessly block it.
|
|
350
|
+
*/
|
|
351
|
+
declare function resolveAllConfiguredRegistryTargets(config: ResolvedRelizyConfig): RegistryTarget[];
|
|
352
|
+
/**
|
|
353
|
+
* Resolve the registry targets a given package should be published to: the
|
|
354
|
+
* legacy registry (if any) plus every `registries` entry that either has no
|
|
355
|
+
* `packageFilter` (mirrored to all packages) or whose `packageFilter` glob
|
|
356
|
+
* patterns match the package name.
|
|
357
|
+
*
|
|
358
|
+
* If any applicable entry is marked `exclusive`, the legacy/default registry
|
|
359
|
+
* is skipped for this package - it is published only to the matching
|
|
360
|
+
* registries instead of mirroring on top of the default one.
|
|
361
|
+
*/
|
|
362
|
+
declare function resolveRegistryTargetsForPackage(pkg: PackageBase, config: ResolvedRelizyConfig): RegistryTarget[];
|
|
363
|
+
/**
|
|
364
|
+
* Resolve every distinct registry actually needed to publish the given set of
|
|
365
|
+
* packages - the union of `resolveRegistryTargetsForPackage` across all of
|
|
366
|
+
* them, deduped by registry URL. Used for the pre-publish authentication
|
|
367
|
+
* safety check once the package list to publish is known, so a registry
|
|
368
|
+
* scoped to packages that are not part of this release does not block it.
|
|
369
|
+
*/
|
|
370
|
+
declare function resolveRegistryTargetsForPackages(packages: PackageBase[], config: ResolvedRelizyConfig): RegistryTarget[];
|
|
371
|
+
declare function getAuthCommand({ packageManager, config, otp, registryTarget, }: {
|
|
344
372
|
packageManager: PackageManager;
|
|
345
373
|
config: ResolvedRelizyConfig;
|
|
346
374
|
otp?: string;
|
|
375
|
+
registryTarget?: RegistryTarget;
|
|
347
376
|
}): string;
|
|
348
377
|
declare function publishPackage({ pkg, config, packageManager, dryRun, }: {
|
|
349
378
|
pkg: PackageBase;
|
|
@@ -1198,6 +1227,57 @@ interface SocialOptions {
|
|
|
1198
1227
|
* true = force-enable AI, false = force-disable AI, undefined = use config
|
|
1199
1228
|
*/
|
|
1200
1229
|
ai?: boolean;
|
|
1230
|
+
/**
|
|
1231
|
+
* Prerelease suffix, forwarded to package discovery in independent mode
|
|
1232
|
+
* when no bump result is available (standalone `social` runs).
|
|
1233
|
+
*/
|
|
1234
|
+
suffix?: string;
|
|
1235
|
+
/**
|
|
1236
|
+
* Force package discovery to include all packages (independent standalone runs).
|
|
1237
|
+
* @default false
|
|
1238
|
+
*/
|
|
1239
|
+
force?: boolean;
|
|
1240
|
+
}
|
|
1241
|
+
interface RegistryTarget {
|
|
1242
|
+
/**
|
|
1243
|
+
* Optional label used in logs to identify this registry (e.g. `nexus-internal`)
|
|
1244
|
+
*/
|
|
1245
|
+
name?: string;
|
|
1246
|
+
/**
|
|
1247
|
+
* Registry URL (e.g. `https://registry.npmjs.org/`, a Nexus or JFrog URL)
|
|
1248
|
+
*/
|
|
1249
|
+
registry: string;
|
|
1250
|
+
/**
|
|
1251
|
+
* Registry token - only supported for pnpm and npm
|
|
1252
|
+
*/
|
|
1253
|
+
token?: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* Publish tag (e.g. `latest`)
|
|
1256
|
+
*/
|
|
1257
|
+
tag?: string;
|
|
1258
|
+
/**
|
|
1259
|
+
* Publish access level (e.g. `public` or `restricted`)
|
|
1260
|
+
*/
|
|
1261
|
+
access?: 'public' | 'restricted';
|
|
1262
|
+
/**
|
|
1263
|
+
* OTP for this registry (e.g. `123456`)
|
|
1264
|
+
*/
|
|
1265
|
+
otp?: string;
|
|
1266
|
+
/**
|
|
1267
|
+
* Glob pattern matching package names this registry applies to. Distinct
|
|
1268
|
+
* from `PublishConfig.packages` (which packages get published at all) -
|
|
1269
|
+
* this only routes already-publishable packages to this registry.
|
|
1270
|
+
* Omitted or empty = applies to every publishable package (mirroring).
|
|
1271
|
+
*/
|
|
1272
|
+
packageFilter?: string[];
|
|
1273
|
+
/**
|
|
1274
|
+
* When true, packages matched by this target are published ONLY to this
|
|
1275
|
+
* (and any other matching) registry - the default `publish.registry` is
|
|
1276
|
+
* skipped for them. Without this flag, `registries` is purely additive:
|
|
1277
|
+
* matched packages are published to this registry ON TOP OF the default one.
|
|
1278
|
+
* @default false
|
|
1279
|
+
*/
|
|
1280
|
+
exclusive?: boolean;
|
|
1201
1281
|
}
|
|
1202
1282
|
type PublishConfig = ChangelogConfig$1['publish'] & {
|
|
1203
1283
|
/**
|
|
@@ -1244,6 +1324,14 @@ type PublishConfig = ChangelogConfig$1['publish'] & {
|
|
|
1244
1324
|
* @default 15000
|
|
1245
1325
|
*/
|
|
1246
1326
|
safetyCheckTimeout?: number;
|
|
1327
|
+
/**
|
|
1328
|
+
* Additional registries to publish to, on top of `registry` (if set).
|
|
1329
|
+
* Entries without `packageFilter` apply to every package (mirroring);
|
|
1330
|
+
* entries with `packageFilter` only apply to packages matching one of the
|
|
1331
|
+
* glob patterns. Fully additive: leaving this unset preserves the
|
|
1332
|
+
* single-registry behavior.
|
|
1333
|
+
*/
|
|
1334
|
+
registries?: RegistryTarget[];
|
|
1247
1335
|
};
|
|
1248
1336
|
interface PublishOptions extends PublishConfig {
|
|
1249
1337
|
/**
|
|
@@ -1988,8 +2076,9 @@ declare function providerReleaseSafetyCheck({ config, provider }: {
|
|
|
1988
2076
|
}): Promise<void>;
|
|
1989
2077
|
declare function providerRelease(options?: Partial<ProviderReleaseOptions>): Promise<ProviderReleaseResult>;
|
|
1990
2078
|
|
|
1991
|
-
declare function publishSafetyCheck({ config }: {
|
|
2079
|
+
declare function publishSafetyCheck({ config, packages }: {
|
|
1992
2080
|
config: ResolvedRelizyConfig;
|
|
2081
|
+
packages?: PackageBase[];
|
|
1993
2082
|
}): Promise<void>;
|
|
1994
2083
|
declare function publish(options?: Partial<PublishOptions>): Promise<{
|
|
1995
2084
|
publishedPackages: PackageBase[];
|
|
@@ -2002,5 +2091,5 @@ declare function socialSafetyCheck({ config }: {
|
|
|
2002
2091
|
}): Promise<void>;
|
|
2003
2092
|
declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
|
|
2004
2093
|
|
|
2005
|
-
export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
2006
|
-
export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, SlackCredentials, SlackOptions, SlackPackageEntry, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode };
|
|
2094
|
+
export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
2095
|
+
export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, 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 {
|
|
1
|
+
export { ax as NEW_PACKAGE_MARKER, a9 as PR_COMMENT_MARKER, S as buildChangelogBody, a as buildCommentBody, R as buildCompareLink, U as buildContributors, b as bump, aL as capReleaseTypeForZeroMajor, c as changelog, v as checkGitStatusIfDirty, T as collectContributorNames, a5 as collectPackageBumps, aZ as confirmBump, B as createCommitAndTags, P as createGitlabRelease, k as defineConfig, y as detectGitProvider, Y as detectPackageManager, a8 as detectPullRequest, Z as determinePublishTag, aN as determineReleaseType, aM as determineSemverChange, aG as executeBuildCmd, aF as executeFormatCmd, aC as executeHook, q as expandPackagesToBumpWithDependents, aq as extractChangelogSummary, aR as extractVersionFromPackageTag, b0 as extractVersionFromTag, x as fetchGitTags, aI as filterOutPrivatePackages, a6 as findGitHubPR, a7 as findGitLabMR, K as findReachableCommitBySubject, am as formatChangelogForSlack, an as formatPackagesForSlack, ao as formatSlackMessage, aA as formatTweetMessage, i as generateChangelog, V as generateMarkDown, a3 as getAuthCommand, a_ as getBumpedIndependentPackages, aY as getBumpedPackageIndependently, aE as getCIName, b1 as getCanaryVersion, J as getCommitSubject, F as getCurrentGitBranch, G as getCurrentGitRef, j as getDefaultConfig, o as getDependentsOf, E as getFirstCommit, u as getGitStatus, as as getIndependentTag, aw as getLastPackageTag, av as getLastRepoTag, at as getLastStableTag, au as getLastTag, A as getModifiedReleaseFilePatterns, X as getNpmRegistry, ag as getPackageCommits, n as getPackageDependencies, aP as getPackageNewVersion, af as getPackages, aJ as getPackagesOrBumpedPackages, $ as getPackagesToPublishInIndependentMode, _ as getPackagesToPublishInSelectiveMode, aW as getPreid, ar as getReleaseUrl, ad as getRootPackage, H as getShortCommitSha, ak as getSlackToken, al as getSlackWebhookUrl, az as getTwitterCredentials, O as github, Q as gitlab, ah as hasLernaJson, I as isAncestor, aH as isBumpedPackage, aX as isChangedPreid, aV as isGraduating, aK as isGraduatingToStableBetweenVersion, aD as isInCI, aS as isPrerelease, aU as isPrereleaseReleaseType, aT as isStableReleaseType, b2 as isTagVersionCompatibleWithCurrent, l as loadRelizyConfig, m as mergeTypes, W as parseChangelogMarkdown, z as parseGitRemoteUrl, aa as postPrComment, ap as postReleaseToSlack, aB as postReleaseToTwitter, p as prComment, e as providerRelease, d as providerReleaseSafetyCheck, g as publish, a4 as publishPackage, f as publishSafetyCheck, C as pushCommitAndTags, N as pushTagForce, ac as readPackageJson, ae as readPackages, aj as reconcileFromTag, ab as redactSecrets, r as release, ai as resetRewrittenTagCache, a0 as resolveAllConfiguredRegistryTargets, a1 as resolveRegistryTargetsForPackage, a2 as resolveRegistryTargetsForPackages, ay as resolveTags, M as retagAnnotatedLocal, D as rollbackModifiedFiles, a$ as shouldFilterPrereleaseTags, h as social, s as socialSafetyCheck, L as tagExists, t as topologicalSort, aQ as updateLernaVersion, w as writeChangelogToFile, aO as writeVersion } from './shared/relizy.Bpfgbc-1.mjs';
|
|
2
2
|
import '@maz-ui/node';
|
|
3
3
|
import 'node:child_process';
|
|
4
4
|
import 'node:process';
|
|
@@ -9,6 +9,7 @@ import 'defu';
|
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'node:path';
|
|
11
11
|
import '@inquirer/prompts';
|
|
12
|
+
import 'micromatch';
|
|
12
13
|
import '@maz-ui/utils/helpers/getErrorMessage';
|
|
13
14
|
import 'fast-glob';
|
|
14
15
|
import 'semver';
|
|
@@ -8,6 +8,7 @@ import { defu } from 'defu';
|
|
|
8
8
|
import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
9
9
|
import path, { join, relative, sep } from 'node:path';
|
|
10
10
|
import { select, confirm, input } from '@inquirer/prompts';
|
|
11
|
+
import micromatch from 'micromatch';
|
|
11
12
|
import { getErrorMessage } from '@maz-ui/utils/helpers/getErrorMessage';
|
|
12
13
|
import fastGlob from 'fast-glob';
|
|
13
14
|
import * as semver from 'semver';
|
|
@@ -1803,7 +1804,7 @@ async function getPackagesOrBumpedPackages({
|
|
|
1803
1804
|
}
|
|
1804
1805
|
|
|
1805
1806
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
1806
|
-
|
|
1807
|
+
const sessionOtpByRegistry = /* @__PURE__ */ new Map();
|
|
1807
1808
|
function getNpmRegistry(cwd = process.cwd()) {
|
|
1808
1809
|
try {
|
|
1809
1810
|
const output = execSync("npm config get registry", {
|
|
@@ -1906,21 +1907,69 @@ async function getPackagesToPublishInIndependentMode(sortedPackages, config) {
|
|
|
1906
1907
|
function isYarnBerry() {
|
|
1907
1908
|
return existsSync(path.join(process.cwd(), ".yarnrc.yml"));
|
|
1908
1909
|
}
|
|
1910
|
+
function buildLegacyRegistryTarget(config) {
|
|
1911
|
+
return {
|
|
1912
|
+
name: "default",
|
|
1913
|
+
registry: config.publish.registry ?? "",
|
|
1914
|
+
token: config.publish.token || config.tokens.registry,
|
|
1915
|
+
tag: config.publish.tag,
|
|
1916
|
+
access: config.publish.access,
|
|
1917
|
+
otp: config.publish.otp
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
function normalizeRegistryKey(registry) {
|
|
1921
|
+
return registry.endsWith("/") ? registry.slice(0, -1) : registry;
|
|
1922
|
+
}
|
|
1923
|
+
function dedupRegistryTargets(targets) {
|
|
1924
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1925
|
+
const result = [];
|
|
1926
|
+
for (const target of targets) {
|
|
1927
|
+
const key = normalizeRegistryKey(target.registry || "");
|
|
1928
|
+
if (seen.has(key)) {
|
|
1929
|
+
logger.debug(`Skipping duplicate registry target "${target.name ?? target.registry}"`);
|
|
1930
|
+
continue;
|
|
1931
|
+
}
|
|
1932
|
+
seen.add(key);
|
|
1933
|
+
result.push(target);
|
|
1934
|
+
}
|
|
1935
|
+
return result;
|
|
1936
|
+
}
|
|
1937
|
+
function resolveAllConfiguredRegistryTargets(config) {
|
|
1938
|
+
const legacyTarget = buildLegacyRegistryTarget(config);
|
|
1939
|
+
const explicitTargets = config.publish.registries ?? [];
|
|
1940
|
+
return dedupRegistryTargets([legacyTarget, ...explicitTargets]);
|
|
1941
|
+
}
|
|
1942
|
+
function resolveRegistryTargetsForPackage(pkg, config) {
|
|
1943
|
+
const legacyTarget = buildLegacyRegistryTarget(config);
|
|
1944
|
+
const explicitTargets = config.publish.registries ?? [];
|
|
1945
|
+
const applicableTargets = explicitTargets.filter(
|
|
1946
|
+
(target) => !target.packageFilter?.length || micromatch.isMatch(pkg.name, target.packageFilter)
|
|
1947
|
+
);
|
|
1948
|
+
const skipDefaultRegistry = applicableTargets.some((target) => target.exclusive);
|
|
1949
|
+
return dedupRegistryTargets([
|
|
1950
|
+
...skipDefaultRegistry ? [] : [legacyTarget],
|
|
1951
|
+
...applicableTargets
|
|
1952
|
+
]);
|
|
1953
|
+
}
|
|
1954
|
+
function resolveRegistryTargetsForPackages(packages, config) {
|
|
1955
|
+
const allTargets = packages.flatMap((pkg) => resolveRegistryTargetsForPackage(pkg, config));
|
|
1956
|
+
return dedupRegistryTargets(allTargets);
|
|
1957
|
+
}
|
|
1909
1958
|
function getCommandArgs({
|
|
1910
1959
|
packageManager,
|
|
1911
1960
|
tag,
|
|
1912
|
-
|
|
1961
|
+
registryTarget,
|
|
1913
1962
|
otp,
|
|
1914
1963
|
type,
|
|
1915
1964
|
dryRun
|
|
1916
1965
|
}) {
|
|
1917
1966
|
const args = type === "publish" ? ["publish", "--tag", tag] : ["whoami"];
|
|
1918
|
-
const registry =
|
|
1967
|
+
const registry = registryTarget.registry;
|
|
1919
1968
|
if (registry) {
|
|
1920
1969
|
args.push("--registry", registry);
|
|
1921
1970
|
}
|
|
1922
1971
|
const isPnpmOrNpm = packageManager === "pnpm" || packageManager === "npm";
|
|
1923
|
-
const publishToken =
|
|
1972
|
+
const publishToken = registryTarget.token;
|
|
1924
1973
|
if (publishToken) {
|
|
1925
1974
|
if (!registry) {
|
|
1926
1975
|
logger.warn("Publish token provided but no registry specified");
|
|
@@ -1932,14 +1981,14 @@ function getCommandArgs({
|
|
|
1932
1981
|
args.push(authTokenKey);
|
|
1933
1982
|
}
|
|
1934
1983
|
}
|
|
1935
|
-
const finalOtp = otp ??
|
|
1984
|
+
const finalOtp = otp ?? sessionOtpByRegistry.get(normalizeRegistryKey(registry)) ?? registryTarget.otp;
|
|
1936
1985
|
if (finalOtp) {
|
|
1937
1986
|
args.push("--otp", finalOtp);
|
|
1938
1987
|
}
|
|
1939
1988
|
if (type === "auth") {
|
|
1940
1989
|
return args;
|
|
1941
1990
|
}
|
|
1942
|
-
const access =
|
|
1991
|
+
const access = registryTarget.access;
|
|
1943
1992
|
if (access) {
|
|
1944
1993
|
args.push("--access", access);
|
|
1945
1994
|
}
|
|
@@ -2011,9 +2060,10 @@ async function executePublishCommand({
|
|
|
2011
2060
|
config,
|
|
2012
2061
|
tag,
|
|
2013
2062
|
dryRun,
|
|
2014
|
-
packageManager
|
|
2063
|
+
packageManager,
|
|
2064
|
+
registryLabel
|
|
2015
2065
|
}) {
|
|
2016
|
-
logger.info(`${dryRun ? "[dry-run] " : ""}Publishing ${packageNameAndVersion} with tag "${tag}"`);
|
|
2066
|
+
logger.info(`${dryRun ? "[dry-run] " : ""}Publishing ${packageNameAndVersion} with tag "${tag}"${registryLabel}`);
|
|
2017
2067
|
const dryRunPublish = dryRun && packageManager !== "npm" && packageManager !== "pnpm";
|
|
2018
2068
|
if (dryRunPublish) {
|
|
2019
2069
|
logger.info(`${dryRun ? "[dry-run] " : ""}Skipping actual publish for ${packageNameAndVersion}`);
|
|
@@ -2031,12 +2081,13 @@ async function executePublishCommand({
|
|
|
2031
2081
|
function getAuthCommand({
|
|
2032
2082
|
packageManager,
|
|
2033
2083
|
config,
|
|
2034
|
-
otp
|
|
2084
|
+
otp,
|
|
2085
|
+
registryTarget
|
|
2035
2086
|
}) {
|
|
2036
2087
|
const args = getCommandArgs({
|
|
2037
2088
|
packageManager,
|
|
2038
2089
|
tag: void 0,
|
|
2039
|
-
config,
|
|
2090
|
+
registryTarget: registryTarget ?? buildLegacyRegistryTarget(config),
|
|
2040
2091
|
otp,
|
|
2041
2092
|
type: "auth"
|
|
2042
2093
|
});
|
|
@@ -2045,14 +2096,14 @@ function getAuthCommand({
|
|
|
2045
2096
|
function getPublishCommand({
|
|
2046
2097
|
packageManager,
|
|
2047
2098
|
tag,
|
|
2048
|
-
|
|
2099
|
+
registryTarget,
|
|
2049
2100
|
otp,
|
|
2050
2101
|
dryRun
|
|
2051
2102
|
}) {
|
|
2052
2103
|
const args = getCommandArgs({
|
|
2053
2104
|
packageManager,
|
|
2054
2105
|
tag,
|
|
2055
|
-
|
|
2106
|
+
registryTarget,
|
|
2056
2107
|
otp,
|
|
2057
2108
|
dryRun,
|
|
2058
2109
|
type: "publish"
|
|
@@ -2060,14 +2111,64 @@ function getPublishCommand({
|
|
|
2060
2111
|
const baseCommand = packageManager === "yarn" && isYarnBerry() ? "yarn npm" : packageManager;
|
|
2061
2112
|
return `${baseCommand} ${args.join(" ")}`;
|
|
2062
2113
|
}
|
|
2114
|
+
async function publishToRegistryTarget({
|
|
2115
|
+
pkg,
|
|
2116
|
+
config,
|
|
2117
|
+
packageManager,
|
|
2118
|
+
dryRun,
|
|
2119
|
+
registryTarget,
|
|
2120
|
+
packageNameAndVersion,
|
|
2121
|
+
registryLabel
|
|
2122
|
+
}) {
|
|
2123
|
+
const tag = determinePublishTag(pkg.newVersion || pkg.version, registryTarget.tag);
|
|
2124
|
+
let dynamicOtp;
|
|
2125
|
+
const maxAttempts = 2;
|
|
2126
|
+
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
2127
|
+
try {
|
|
2128
|
+
const command = getPublishCommand({
|
|
2129
|
+
packageManager,
|
|
2130
|
+
tag,
|
|
2131
|
+
registryTarget,
|
|
2132
|
+
otp: dynamicOtp,
|
|
2133
|
+
dryRun
|
|
2134
|
+
});
|
|
2135
|
+
process.chdir(pkg.path);
|
|
2136
|
+
await executePublishCommand({
|
|
2137
|
+
command,
|
|
2138
|
+
packageNameAndVersion,
|
|
2139
|
+
packageManager,
|
|
2140
|
+
pkg,
|
|
2141
|
+
config,
|
|
2142
|
+
dryRun,
|
|
2143
|
+
tag,
|
|
2144
|
+
registryLabel
|
|
2145
|
+
});
|
|
2146
|
+
const registryKey = normalizeRegistryKey(registryTarget.registry);
|
|
2147
|
+
if (dynamicOtp && !sessionOtpByRegistry.has(registryKey)) {
|
|
2148
|
+
sessionOtpByRegistry.set(registryKey, dynamicOtp);
|
|
2149
|
+
logger.debug("OTP stored for session");
|
|
2150
|
+
}
|
|
2151
|
+
return;
|
|
2152
|
+
} catch (error) {
|
|
2153
|
+
if (isOtpError(error) && attempt < maxAttempts - 1) {
|
|
2154
|
+
dynamicOtp = await handleOtpError();
|
|
2155
|
+
} else {
|
|
2156
|
+
logger.error(`Failed to publish ${packageNameAndVersion}:`, error);
|
|
2157
|
+
throw error;
|
|
2158
|
+
}
|
|
2159
|
+
} finally {
|
|
2160
|
+
process.chdir(config.cwd);
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2063
2164
|
async function publishPackage({
|
|
2064
2165
|
pkg,
|
|
2065
2166
|
config,
|
|
2066
2167
|
packageManager,
|
|
2067
2168
|
dryRun
|
|
2068
2169
|
}) {
|
|
2069
|
-
const tag = determinePublishTag(pkg.newVersion || pkg.version, config.publish.tag);
|
|
2070
2170
|
const packageNameAndVersion = getIndependentTag({ name: pkg.name, version: pkg.newVersion || pkg.version });
|
|
2171
|
+
const registryTargets = resolveRegistryTargetsForPackage(pkg, config);
|
|
2071
2172
|
logger.debug(`Building publish command for ${pkg.name}`);
|
|
2072
2173
|
const needsTempVersionWrite = dryRun && (packageManager === "npm" || packageManager === "pnpm") && !!pkg.newVersion && pkg.newVersion !== pkg.version;
|
|
2073
2174
|
let originalVersion;
|
|
@@ -2079,42 +2180,18 @@ async function publishPackage({
|
|
|
2079
2180
|
writeVersion(pkg.path, pkg.newVersion, false);
|
|
2080
2181
|
}
|
|
2081
2182
|
try {
|
|
2082
|
-
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
await executePublishCommand({
|
|
2095
|
-
command,
|
|
2096
|
-
packageNameAndVersion,
|
|
2097
|
-
packageManager,
|
|
2098
|
-
pkg,
|
|
2099
|
-
config,
|
|
2100
|
-
dryRun,
|
|
2101
|
-
tag
|
|
2102
|
-
});
|
|
2103
|
-
if (dynamicOtp && !sessionOtp) {
|
|
2104
|
-
sessionOtp = dynamicOtp;
|
|
2105
|
-
logger.debug("OTP stored for session");
|
|
2106
|
-
}
|
|
2107
|
-
return;
|
|
2108
|
-
} catch (error) {
|
|
2109
|
-
if (isOtpError(error) && attempt < maxAttempts - 1) {
|
|
2110
|
-
dynamicOtp = await handleOtpError();
|
|
2111
|
-
} else {
|
|
2112
|
-
logger.error(`Failed to publish ${packageNameAndVersion}:`, error);
|
|
2113
|
-
throw error;
|
|
2114
|
-
}
|
|
2115
|
-
} finally {
|
|
2116
|
-
process.chdir(config.cwd);
|
|
2117
|
-
}
|
|
2183
|
+
const showRegistryLabel = registryTargets.length > 1;
|
|
2184
|
+
for (const registryTarget of registryTargets) {
|
|
2185
|
+
const registryLabel = showRegistryLabel ? ` [${registryTarget.name ?? registryTarget.registry ?? "default"}]` : "";
|
|
2186
|
+
await publishToRegistryTarget({
|
|
2187
|
+
pkg,
|
|
2188
|
+
config,
|
|
2189
|
+
packageManager,
|
|
2190
|
+
dryRun,
|
|
2191
|
+
registryTarget,
|
|
2192
|
+
packageNameAndVersion,
|
|
2193
|
+
registryLabel
|
|
2194
|
+
});
|
|
2118
2195
|
}
|
|
2119
2196
|
} finally {
|
|
2120
2197
|
if (needsTempVersionWrite && originalVersion) {
|
|
@@ -5586,21 +5663,16 @@ async function providerRelease(options = {}) {
|
|
|
5586
5663
|
}
|
|
5587
5664
|
}
|
|
5588
5665
|
|
|
5589
|
-
async function
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
logger.debug("Start checking auth config to package registry");
|
|
5595
|
-
const isPnpmOrNpm = config.publish.packageManager === "pnpm" || config.publish.packageManager === "npm";
|
|
5596
|
-
if (!isPnpmOrNpm) {
|
|
5597
|
-
logger.debug(`Skipping authentication to package registry because "${config.publish.packageManager}" is not supported`);
|
|
5598
|
-
return;
|
|
5599
|
-
}
|
|
5666
|
+
async function checkRegistryAuth({
|
|
5667
|
+
config,
|
|
5668
|
+
registryTarget,
|
|
5669
|
+
registryLabel
|
|
5670
|
+
}) {
|
|
5600
5671
|
const authCommand = getAuthCommand({
|
|
5601
5672
|
packageManager: config.publish.packageManager,
|
|
5602
5673
|
config,
|
|
5603
|
-
|
|
5674
|
+
registryTarget,
|
|
5675
|
+
otp: registryTarget.otp
|
|
5604
5676
|
});
|
|
5605
5677
|
const timeoutMs = config.publish.safetyCheckTimeout ?? 15e3;
|
|
5606
5678
|
const patienceDelay = Math.min(5e3, Math.floor(timeoutMs / 2));
|
|
@@ -5608,7 +5680,7 @@ async function publishSafetyCheck({ config }) {
|
|
|
5608
5680
|
logger.info(`The package registry is taking longer than expected to respond (will time out at ${Math.round(timeoutMs / 1e3)}s)...`);
|
|
5609
5681
|
}, patienceDelay);
|
|
5610
5682
|
try {
|
|
5611
|
-
logger.info(
|
|
5683
|
+
logger.info(`Authenticating to package registry${registryLabel}...`);
|
|
5612
5684
|
await execPromise(authCommand, {
|
|
5613
5685
|
cwd: config.cwd,
|
|
5614
5686
|
timeout: timeoutMs,
|
|
@@ -5618,19 +5690,37 @@ async function publishSafetyCheck({ config }) {
|
|
|
5618
5690
|
noError: true,
|
|
5619
5691
|
logLevel: config.logLevel
|
|
5620
5692
|
});
|
|
5621
|
-
logger.info(
|
|
5693
|
+
logger.info(`Successfully authenticated to package registry${registryLabel}`);
|
|
5622
5694
|
} catch (error) {
|
|
5623
5695
|
if (error?.killed) {
|
|
5624
5696
|
throw new Error(
|
|
5625
|
-
`Authentication to package registry timed out after ${timeoutMs}ms. The registry did not respond - check your network or registry access, increase publish.safetyCheckTimeout, or skip this check with --no-safety-check.`,
|
|
5697
|
+
`Authentication to package registry${registryLabel} timed out after ${timeoutMs}ms. The registry did not respond - check your network or registry access, increase publish.safetyCheckTimeout, or skip this check with --no-safety-check.`,
|
|
5626
5698
|
{ cause: error }
|
|
5627
5699
|
);
|
|
5628
5700
|
}
|
|
5629
|
-
throw new Error(
|
|
5701
|
+
throw new Error(`Failed to authenticate to package registry${registryLabel}`, { cause: error });
|
|
5630
5702
|
} finally {
|
|
5631
5703
|
clearTimeout(patienceTimer);
|
|
5632
5704
|
}
|
|
5633
5705
|
}
|
|
5706
|
+
async function publishSafetyCheck({ config, packages }) {
|
|
5707
|
+
if (!config.safetyCheck || !config.release.publish || !config.publish.safetyCheck) {
|
|
5708
|
+
logger.debug("Safety check disabled or publish disabled");
|
|
5709
|
+
return;
|
|
5710
|
+
}
|
|
5711
|
+
logger.debug("Start checking auth config to package registry");
|
|
5712
|
+
const isPnpmOrNpm = config.publish.packageManager === "pnpm" || config.publish.packageManager === "npm";
|
|
5713
|
+
if (!isPnpmOrNpm) {
|
|
5714
|
+
logger.debug(`Skipping authentication to package registry because "${config.publish.packageManager}" is not supported`);
|
|
5715
|
+
return;
|
|
5716
|
+
}
|
|
5717
|
+
const registryTargets = packages ? resolveRegistryTargetsForPackages(packages, config) : resolveAllConfiguredRegistryTargets(config);
|
|
5718
|
+
const showRegistryLabel = registryTargets.length > 1;
|
|
5719
|
+
for (const registryTarget of registryTargets) {
|
|
5720
|
+
const registryLabel = showRegistryLabel ? ` [${registryTarget.name ?? registryTarget.registry ?? "default"}]` : "";
|
|
5721
|
+
await checkRegistryAuth({ config, registryTarget, registryLabel });
|
|
5722
|
+
}
|
|
5723
|
+
}
|
|
5634
5724
|
async function publish(options = {}) {
|
|
5635
5725
|
const config = await loadRelizyConfig({
|
|
5636
5726
|
configFile: options.configName,
|
|
@@ -5640,6 +5730,7 @@ async function publish(options = {}) {
|
|
|
5640
5730
|
access: options.access,
|
|
5641
5731
|
otp: options.otp,
|
|
5642
5732
|
registry: options.registry,
|
|
5733
|
+
registries: options.registries,
|
|
5643
5734
|
tag: options.tag,
|
|
5644
5735
|
buildCmd: options.buildCmd,
|
|
5645
5736
|
token: options.token
|
|
@@ -5660,7 +5751,6 @@ async function publish(options = {}) {
|
|
|
5660
5751
|
}
|
|
5661
5752
|
try {
|
|
5662
5753
|
await executeHook("before:publish", config, dryRun);
|
|
5663
|
-
await publishSafetyCheck({ config });
|
|
5664
5754
|
const rootPackage = readPackageJson(config.cwd);
|
|
5665
5755
|
if (!rootPackage) {
|
|
5666
5756
|
throw new Error("Failed to read root package.json");
|
|
@@ -5699,6 +5789,7 @@ async function publish(options = {}) {
|
|
|
5699
5789
|
logger.fail("No packages need to be published");
|
|
5700
5790
|
return;
|
|
5701
5791
|
}
|
|
5792
|
+
await publishSafetyCheck({ config, packages: publishedPackages });
|
|
5702
5793
|
await executeBuildCmd({
|
|
5703
5794
|
config,
|
|
5704
5795
|
dryRun
|
|
@@ -5815,7 +5906,8 @@ async function handleTwitterPost({
|
|
|
5815
5906
|
changelog,
|
|
5816
5907
|
dryRun,
|
|
5817
5908
|
newVersion,
|
|
5818
|
-
tag
|
|
5909
|
+
tag,
|
|
5910
|
+
prerelease
|
|
5819
5911
|
}) {
|
|
5820
5912
|
const twitterConfig = config.social?.twitter;
|
|
5821
5913
|
if (!twitterConfig?.enabled) {
|
|
@@ -5834,7 +5926,8 @@ async function handleTwitterPost({
|
|
|
5834
5926
|
logger.debug("Credentials found \u2713");
|
|
5835
5927
|
logger.debug("Preparing tweet for release");
|
|
5836
5928
|
const onlyStable = twitterConfig.onlyStable;
|
|
5837
|
-
|
|
5929
|
+
const isPre = prerelease ?? isPrerelease(newVersion);
|
|
5930
|
+
if (onlyStable && isPre) {
|
|
5838
5931
|
logger.info(`Skipping Twitter post for prerelease version ${newVersion} (social.twitter.onlyStable is enabled)`);
|
|
5839
5932
|
return { success: true, response: void 0 };
|
|
5840
5933
|
}
|
|
@@ -5882,7 +5975,8 @@ async function handleSlackPost({
|
|
|
5882
5975
|
newVersion,
|
|
5883
5976
|
tag,
|
|
5884
5977
|
commits,
|
|
5885
|
-
bumpedPackages
|
|
5978
|
+
bumpedPackages,
|
|
5979
|
+
prerelease
|
|
5886
5980
|
}) {
|
|
5887
5981
|
const slackConfig = config.social?.slack;
|
|
5888
5982
|
if (!slackConfig?.enabled) {
|
|
@@ -5910,7 +6004,8 @@ async function handleSlackPost({
|
|
|
5910
6004
|
logger.debug(`Slack: ${slackMode}`);
|
|
5911
6005
|
logger.debug(`Preparing Slack message for release: ${tag} (${newVersion})`);
|
|
5912
6006
|
const onlyStable = slackConfig.onlyStable ?? true;
|
|
5913
|
-
|
|
6007
|
+
const isPre = prerelease ?? isPrerelease(newVersion);
|
|
6008
|
+
if (onlyStable && isPre) {
|
|
5914
6009
|
logger.info(`Skipping Slack post for prerelease version ${newVersion} (social.slack.onlyStable is enabled)`);
|
|
5915
6010
|
return { success: true, response: void 0 };
|
|
5916
6011
|
}
|
|
@@ -5987,43 +6082,126 @@ async function social(options = {}) {
|
|
|
5987
6082
|
if (!rootPackageRead) {
|
|
5988
6083
|
throw new Error("Failed to read root package.json");
|
|
5989
6084
|
}
|
|
5990
|
-
const
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
pkg
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6085
|
+
const isIndependent = config.monorepo?.versionMode === "independent";
|
|
6086
|
+
let minifiedBody;
|
|
6087
|
+
let richBody;
|
|
6088
|
+
let newVersion;
|
|
6089
|
+
let tag;
|
|
6090
|
+
let changelogCommits;
|
|
6091
|
+
let prerelease;
|
|
6092
|
+
if (isIndependent) {
|
|
6093
|
+
const packages = filterOutPrivatePackages(await getPackagesOrBumpedPackages({
|
|
6094
|
+
config,
|
|
6095
|
+
bumpResult: options.bumpResult,
|
|
6096
|
+
suffix: options.suffix,
|
|
6097
|
+
force: options.force ?? false,
|
|
6098
|
+
dryRun
|
|
6099
|
+
}));
|
|
6100
|
+
const minifiedSections = [];
|
|
6101
|
+
const richSections = [];
|
|
6102
|
+
const commitsByHash = /* @__PURE__ */ new Map();
|
|
6103
|
+
for (const pkg of packages) {
|
|
6104
|
+
const pkgVersion = isBumpedPackage(pkg) && pkg.newVersion || pkg.version;
|
|
6105
|
+
const from = config.from || pkg.fromTag;
|
|
6106
|
+
if (!from) {
|
|
6107
|
+
logger.warn(`No from tag found for ${pkg.name}, skipping its changelog section`);
|
|
6108
|
+
continue;
|
|
6109
|
+
}
|
|
6110
|
+
const minSection = await generateChangelog({
|
|
6111
|
+
pkg: { ...pkg, fromTag: from },
|
|
6112
|
+
config,
|
|
6113
|
+
dryRun,
|
|
6114
|
+
newVersion: pkgVersion,
|
|
6115
|
+
include: { title: true, compareLink: false, body: true, contributors: false },
|
|
6116
|
+
minify: true
|
|
6117
|
+
});
|
|
6118
|
+
const richSection = await generateChangelog({
|
|
6119
|
+
pkg: { ...pkg, fromTag: from },
|
|
6120
|
+
config,
|
|
6121
|
+
dryRun,
|
|
6122
|
+
newVersion: pkgVersion,
|
|
6123
|
+
include: { title: true, compareLink: false, body: true, contributors: false },
|
|
6124
|
+
minify: false
|
|
6125
|
+
});
|
|
6126
|
+
if (minSection.trim()) {
|
|
6127
|
+
minifiedSections.push(minSection);
|
|
6128
|
+
}
|
|
6129
|
+
if (richSection.trim()) {
|
|
6130
|
+
richSections.push(richSection);
|
|
6131
|
+
}
|
|
6132
|
+
const pkgCommits = await getPackageCommits({
|
|
6133
|
+
pkg,
|
|
6134
|
+
from,
|
|
6135
|
+
to: "HEAD",
|
|
6136
|
+
config,
|
|
6137
|
+
changelog: true,
|
|
6138
|
+
dryRun
|
|
6139
|
+
});
|
|
6140
|
+
for (const commit of pkgCommits) {
|
|
6141
|
+
commitsByHash.set(commit.shortHash || commit.message, commit);
|
|
6142
|
+
}
|
|
6143
|
+
}
|
|
6144
|
+
minifiedBody = minifiedSections.join("\n\n");
|
|
6145
|
+
richBody = richSections.join("\n\n");
|
|
6146
|
+
changelogCommits = [...commitsByHash.values()];
|
|
6147
|
+
prerelease = packages.length > 0 && packages.every((pkg) => isPrerelease(isBumpedPackage(pkg) && pkg.newVersion || pkg.version));
|
|
6148
|
+
if (packages.length === 1) {
|
|
6149
|
+
const only = packages[0];
|
|
6150
|
+
newVersion = isBumpedPackage(only) && only.newVersion || only.version;
|
|
6151
|
+
tag = getIndependentTag({ version: newVersion, name: only.name });
|
|
6152
|
+
} else {
|
|
6153
|
+
newVersion = `${packages.length} packages`;
|
|
6154
|
+
tag = "";
|
|
6155
|
+
}
|
|
6156
|
+
} else {
|
|
6157
|
+
const resolvedNewVersion = options.bumpResult?.newVersion || rootPackageRead.version;
|
|
6158
|
+
const { from, to } = await resolveTags({
|
|
6159
|
+
config,
|
|
6160
|
+
step: "social",
|
|
6161
|
+
newVersion: resolvedNewVersion,
|
|
6162
|
+
pkg: rootPackageRead
|
|
6163
|
+
});
|
|
6164
|
+
const fromTag = options.bumpResult?.fromTag || from;
|
|
6165
|
+
const rootPackage = options.bumpResult?.rootPackage || await getRootPackage({
|
|
6166
|
+
config,
|
|
6167
|
+
force: false,
|
|
6168
|
+
suffix: void 0,
|
|
6169
|
+
changelog: true,
|
|
6170
|
+
from: fromTag,
|
|
6171
|
+
to,
|
|
6172
|
+
dryRun
|
|
6173
|
+
});
|
|
6174
|
+
minifiedBody = await generateChangelog({
|
|
6175
|
+
pkg: { ...rootPackage, fromTag },
|
|
6176
|
+
config,
|
|
6177
|
+
dryRun,
|
|
6178
|
+
newVersion: resolvedNewVersion,
|
|
6179
|
+
include: { title: false, compareLink: false, body: true, contributors: false },
|
|
6180
|
+
minify: true
|
|
6181
|
+
});
|
|
6182
|
+
richBody = await generateChangelog({
|
|
6183
|
+
pkg: { ...rootPackage, fromTag },
|
|
6184
|
+
config,
|
|
6185
|
+
dryRun,
|
|
6186
|
+
newVersion: resolvedNewVersion,
|
|
6187
|
+
include: { title: false, compareLink: false, body: true, contributors: false },
|
|
6188
|
+
minify: false
|
|
6189
|
+
});
|
|
6190
|
+
newVersion = resolvedNewVersion;
|
|
6191
|
+
tag = to;
|
|
6192
|
+
changelogCommits = await getPackageCommits({
|
|
6193
|
+
pkg: rootPackage,
|
|
6194
|
+
from: fromTag,
|
|
6195
|
+
to: "HEAD",
|
|
6196
|
+
config,
|
|
6197
|
+
changelog: true,
|
|
6198
|
+
dryRun
|
|
6199
|
+
});
|
|
6200
|
+
prerelease = isPrerelease(newVersion);
|
|
6201
|
+
}
|
|
6023
6202
|
const hasContent = !!minifiedBody.trim();
|
|
6024
|
-
const twitterReleaseUrl = getReleaseUrl(config,
|
|
6203
|
+
const twitterReleaseUrl = getReleaseUrl(config, tag);
|
|
6025
6204
|
const twitterChangelogUrl = config.social?.changelogUrl;
|
|
6026
|
-
const prerelease = isPrerelease(newVersion);
|
|
6027
6205
|
const twitterWillPost = !!config.social?.twitter?.enabled && !(config.social.twitter.onlyStable && prerelease);
|
|
6028
6206
|
const slackWillPost = !!config.social?.slack?.enabled && !((config.social.slack.onlyStable ?? true) && prerelease);
|
|
6029
6207
|
let twitterChangelog = minifiedBody;
|
|
@@ -6067,24 +6245,18 @@ ${twitterChangelog}`);
|
|
|
6067
6245
|
changelog: twitterChangelog,
|
|
6068
6246
|
dryRun,
|
|
6069
6247
|
newVersion,
|
|
6070
|
-
tag
|
|
6071
|
-
|
|
6072
|
-
const changelogCommits = await getPackageCommits({
|
|
6073
|
-
pkg: rootPackage,
|
|
6074
|
-
from: fromTag,
|
|
6075
|
-
to: "HEAD",
|
|
6076
|
-
config,
|
|
6077
|
-
changelog: true,
|
|
6078
|
-
dryRun
|
|
6248
|
+
tag,
|
|
6249
|
+
prerelease
|
|
6079
6250
|
});
|
|
6080
6251
|
const slackResponse = await handleSlackPost({
|
|
6081
6252
|
config,
|
|
6082
6253
|
changelog: slackChangelog,
|
|
6083
6254
|
dryRun,
|
|
6084
6255
|
newVersion,
|
|
6085
|
-
tag
|
|
6256
|
+
tag,
|
|
6086
6257
|
commits: changelogCommits,
|
|
6087
|
-
bumpedPackages: options.bumpResult?.bumpedPackages
|
|
6258
|
+
bumpedPackages: options.bumpResult?.bumpedPackages,
|
|
6259
|
+
prerelease
|
|
6088
6260
|
});
|
|
6089
6261
|
const results = [];
|
|
6090
6262
|
if (config.social?.twitter?.enabled) {
|
|
@@ -6145,6 +6317,7 @@ function getReleaseConfig(options = {}) {
|
|
|
6145
6317
|
access: options.access,
|
|
6146
6318
|
otp: options.otp,
|
|
6147
6319
|
registry: options.registry,
|
|
6320
|
+
registries: options.registries,
|
|
6148
6321
|
tag: options.tag,
|
|
6149
6322
|
buildCmd: options.buildCmd,
|
|
6150
6323
|
token: options.publishToken
|
|
@@ -6454,4 +6627,4 @@ Git provider: ${provider}`);
|
|
|
6454
6627
|
}
|
|
6455
6628
|
}
|
|
6456
6629
|
|
|
6457
|
-
export { getPackagesToPublishInIndependentMode as $, getModifiedReleaseFilePatterns as A, createCommitAndTags as B, pushCommitAndTags as C, rollbackModifiedFiles as D, getFirstCommit as E, getCurrentGitBranch as F, getCurrentGitRef as G, getShortCommitSha as H, isAncestor as I, getCommitSubject as J, findReachableCommitBySubject as K, tagExists as L, retagAnnotatedLocal as M, pushTagForce as N, github as O, createGitlabRelease as P, gitlab as Q, buildCompareLink as R, buildChangelogBody as S, collectContributorNames as T, buildContributors as U, generateMarkDown as V, parseChangelogMarkdown as W, getNpmRegistry as X, detectPackageManager as Y, determinePublishTag as Z, getPackagesToPublishInSelectiveMode as _, buildCommentBody as a,
|
|
6630
|
+
export { getPackagesToPublishInIndependentMode as $, getModifiedReleaseFilePatterns as A, createCommitAndTags as B, pushCommitAndTags as C, rollbackModifiedFiles as D, getFirstCommit as E, getCurrentGitBranch as F, getCurrentGitRef as G, getShortCommitSha as H, isAncestor as I, getCommitSubject as J, findReachableCommitBySubject as K, tagExists as L, retagAnnotatedLocal as M, pushTagForce as N, github as O, createGitlabRelease as P, gitlab as Q, buildCompareLink as R, buildChangelogBody as S, collectContributorNames as T, buildContributors as U, generateMarkDown as V, parseChangelogMarkdown as W, getNpmRegistry as X, detectPackageManager as Y, determinePublishTag as Z, getPackagesToPublishInSelectiveMode as _, buildCommentBody as a, shouldFilterPrereleaseTags as a$, resolveAllConfiguredRegistryTargets as a0, resolveRegistryTargetsForPackage as a1, resolveRegistryTargetsForPackages as a2, getAuthCommand as a3, publishPackage as a4, collectPackageBumps as a5, findGitHubPR as a6, findGitLabMR as a7, detectPullRequest as a8, PR_COMMENT_MARKER as a9, formatTweetMessage as aA, postReleaseToTwitter as aB, executeHook as aC, isInCI as aD, getCIName as aE, executeFormatCmd as aF, executeBuildCmd as aG, isBumpedPackage as aH, filterOutPrivatePackages as aI, getPackagesOrBumpedPackages as aJ, isGraduatingToStableBetweenVersion as aK, capReleaseTypeForZeroMajor as aL, determineSemverChange as aM, determineReleaseType as aN, writeVersion as aO, getPackageNewVersion as aP, updateLernaVersion as aQ, extractVersionFromPackageTag as aR, isPrerelease as aS, isStableReleaseType as aT, isPrereleaseReleaseType as aU, isGraduating as aV, getPreid as aW, isChangedPreid as aX, getBumpedPackageIndependently as aY, confirmBump as aZ, getBumpedIndependentPackages as a_, postPrComment as aa, redactSecrets as ab, readPackageJson as ac, getRootPackage as ad, readPackages as ae, getPackages as af, getPackageCommits as ag, hasLernaJson as ah, resetRewrittenTagCache as ai, reconcileFromTag as aj, getSlackToken as ak, getSlackWebhookUrl as al, formatChangelogForSlack as am, formatPackagesForSlack as an, formatSlackMessage as ao, postReleaseToSlack as ap, extractChangelogSummary as aq, getReleaseUrl as ar, getIndependentTag as as, getLastStableTag as at, getLastTag as au, getLastRepoTag as av, getLastPackageTag as aw, NEW_PACKAGE_MARKER as ax, resolveTags as ay, getTwitterCredentials as az, bump as b, extractVersionFromTag as b0, getCanaryVersion as b1, isTagVersionCompatibleWithCurrent as b2, changelog as c, providerReleaseSafetyCheck as d, providerRelease as e, publishSafetyCheck as f, publish as g, social as h, generateChangelog as i, getDefaultConfig as j, defineConfig as k, loadRelizyConfig as l, mergeTypes as m, getPackageDependencies as n, getDependentsOf as o, prComment as p, expandPackagesToBumpWithDependents as q, release as r, socialSafetyCheck as s, topologicalSort as t, getGitStatus as u, checkGitStatusIfDirty as v, writeChangelogToFile as w, fetchGitTags as x, detectGitProvider as y, parseGitRemoteUrl as z };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "relizy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0-beta.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",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@inquirer/prompts": "^8.
|
|
74
|
+
"@inquirer/prompts": "^8.7.2",
|
|
75
75
|
"@maz-ui/node": "5.0.0-beta.26",
|
|
76
76
|
"@maz-ui/utils": "5.0.0-beta.25",
|
|
77
77
|
"c12": "^3.3.3",
|
|
@@ -80,31 +80,33 @@
|
|
|
80
80
|
"convert-gitmoji": "^0.1.5",
|
|
81
81
|
"defu": "6.1.7",
|
|
82
82
|
"fast-glob": "^3.3.2",
|
|
83
|
+
"micromatch": "^4.0.8",
|
|
83
84
|
"node-fetch-native": "^1.6.7",
|
|
84
|
-
"semver": "^7.8.
|
|
85
|
+
"semver": "^7.8.5"
|
|
85
86
|
},
|
|
86
87
|
"devDependencies": {
|
|
87
|
-
"@commitlint/cli": "^21.
|
|
88
|
-
"@commitlint/config-conventional": "21.
|
|
89
|
-
"@commitlint/cz-commitlint": "^21.
|
|
90
|
-
"@commitlint/types": "^21.0
|
|
88
|
+
"@commitlint/cli": "^21.2.2",
|
|
89
|
+
"@commitlint/config-conventional": "21.2.2",
|
|
90
|
+
"@commitlint/cz-commitlint": "^21.2.2",
|
|
91
|
+
"@commitlint/types": "^21.2.0",
|
|
91
92
|
"@maz-ui/eslint-config": "5.0.0-beta.25",
|
|
92
93
|
"@slack/web-api": "7.16.0",
|
|
94
|
+
"@types/micromatch": "^4.0.10",
|
|
93
95
|
"@types/node": "^25.9.2",
|
|
94
|
-
"@types/semver": "^7.
|
|
95
|
-
"@vitest/coverage-v8": "^
|
|
96
|
+
"@types/semver": "^7.8.0",
|
|
97
|
+
"@vitest/coverage-v8": "^5.0.0",
|
|
96
98
|
"@yoloship/claude-sdk": "0.2.0-beta.6",
|
|
97
99
|
"cross-env": "10.1.0",
|
|
98
|
-
"eslint": "^10.
|
|
100
|
+
"eslint": "^10.10.0",
|
|
99
101
|
"husky": "9.1.7",
|
|
100
102
|
"jiti": "2.7.0",
|
|
101
|
-
"lint-staged": "^17.
|
|
102
|
-
"memfs": "^4.
|
|
103
|
-
"tsx": "^4.
|
|
104
|
-
"twitter-api-v2": "^1.29.
|
|
103
|
+
"lint-staged": "^17.5.1",
|
|
104
|
+
"memfs": "^4.78.0",
|
|
105
|
+
"tsx": "^4.23.13",
|
|
106
|
+
"twitter-api-v2": "^1.29.1",
|
|
105
107
|
"typescript": "^6.0.3",
|
|
106
108
|
"unbuild": "^3.6.1",
|
|
107
|
-
"vitest": "^
|
|
109
|
+
"vitest": "^5.0.0"
|
|
108
110
|
},
|
|
109
111
|
"lint-staged": {
|
|
110
112
|
"*.{js,jsx,ts,tsx,mjs,mts,cjs,md,yml,json}": [
|