relizy 0.2.5-beta.4 → 0.2.5-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +8 -11
- package/dist/index.d.ts +8 -11
- package/dist/index.mjs +1 -1
- package/dist/shared/{relizy.CdNX5T_h.mjs → relizy.Ymqkl0CI.mjs} +26 -20
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import process from 'node:process';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { printBanner, logger } from '@maz-ui/node';
|
|
7
7
|
import { Command } from 'commander';
|
|
8
|
-
import { U as isInCI, V as getCIName, b as bump, c as changelog, d as publish, a as providerRelease, r as release } from './shared/relizy.
|
|
8
|
+
import { U as isInCI, V as getCIName, b as bump, c as changelog, d as publish, a as providerRelease, r as release } from './shared/relizy.Ymqkl0CI.mjs';
|
|
9
9
|
import 'node:child_process';
|
|
10
10
|
import '@maz-ui/utils';
|
|
11
11
|
import 'c12';
|
package/dist/index.d.mts
CHANGED
|
@@ -169,6 +169,11 @@ declare function publishPackage({ pkg, config, packageManager, dryRun, }: {
|
|
|
169
169
|
}): Promise<void>;
|
|
170
170
|
|
|
171
171
|
declare function readPackageJson(packagePath: string): ReadPackage;
|
|
172
|
+
interface RootPackage extends ReadPackage {
|
|
173
|
+
fromTag: string;
|
|
174
|
+
commits: GitCommit[];
|
|
175
|
+
newVersion?: string;
|
|
176
|
+
}
|
|
172
177
|
declare function getRootPackage({ config, force, from, to, suffix, changelog, }: {
|
|
173
178
|
config: ResolvedRelizyConfig;
|
|
174
179
|
force: boolean;
|
|
@@ -176,15 +181,7 @@ declare function getRootPackage({ config, force, from, to, suffix, changelog, }:
|
|
|
176
181
|
to: string;
|
|
177
182
|
suffix: string | undefined;
|
|
178
183
|
changelog: boolean;
|
|
179
|
-
}): Promise<
|
|
180
|
-
path: string;
|
|
181
|
-
fromTag: string;
|
|
182
|
-
commits: GitCommit[];
|
|
183
|
-
newVersion: string;
|
|
184
|
-
name: string;
|
|
185
|
-
version: string;
|
|
186
|
-
private: boolean;
|
|
187
|
-
}>;
|
|
184
|
+
}): Promise<RootPackage>;
|
|
188
185
|
declare function readPackages({ cwd, patterns, ignorePackageNames, }: {
|
|
189
186
|
cwd: string;
|
|
190
187
|
patterns?: string[];
|
|
@@ -399,7 +396,7 @@ interface BumpResultTruthy {
|
|
|
399
396
|
/**
|
|
400
397
|
* Root package
|
|
401
398
|
*/
|
|
402
|
-
rootPackage?:
|
|
399
|
+
rootPackage?: RootPackage;
|
|
403
400
|
/**
|
|
404
401
|
* Bumped packages
|
|
405
402
|
*/
|
|
@@ -903,4 +900,4 @@ declare function publish(options?: Partial<PublishOptions>): Promise<{
|
|
|
903
900
|
declare function release(options?: Partial<ReleaseOptions>): Promise<void>;
|
|
904
901
|
|
|
905
902
|
export { bump, changelog, checkGitStatusIfDirty, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractVersionFromPackageTag, fetchGitTags, generateChangelog, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getRootPackage, github, gitlab, hasLernaJson, isBumpedPackage, isChangedPreid, isGraduating, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, loadRelizyConfig, parseGitRemoteUrl, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, pushCommitAndTags, readPackageJson, readPackages, release, resolveTags, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
906
|
-
export type { BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, PackageBase, PackageManager, PostedRelease, ProviderReleaseOptions, PublishConfig, PublishOptions, PublishResponse, ReadPackage, ReleaseConfig, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, Step, TemplatesConfig, VersionMode };
|
|
903
|
+
export type { BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, PackageBase, PackageManager, PostedRelease, ProviderReleaseOptions, PublishConfig, PublishOptions, PublishResponse, ReadPackage, ReleaseConfig, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, RootPackage, Step, TemplatesConfig, VersionMode };
|
package/dist/index.d.ts
CHANGED
|
@@ -169,6 +169,11 @@ declare function publishPackage({ pkg, config, packageManager, dryRun, }: {
|
|
|
169
169
|
}): Promise<void>;
|
|
170
170
|
|
|
171
171
|
declare function readPackageJson(packagePath: string): ReadPackage;
|
|
172
|
+
interface RootPackage extends ReadPackage {
|
|
173
|
+
fromTag: string;
|
|
174
|
+
commits: GitCommit[];
|
|
175
|
+
newVersion?: string;
|
|
176
|
+
}
|
|
172
177
|
declare function getRootPackage({ config, force, from, to, suffix, changelog, }: {
|
|
173
178
|
config: ResolvedRelizyConfig;
|
|
174
179
|
force: boolean;
|
|
@@ -176,15 +181,7 @@ declare function getRootPackage({ config, force, from, to, suffix, changelog, }:
|
|
|
176
181
|
to: string;
|
|
177
182
|
suffix: string | undefined;
|
|
178
183
|
changelog: boolean;
|
|
179
|
-
}): Promise<
|
|
180
|
-
path: string;
|
|
181
|
-
fromTag: string;
|
|
182
|
-
commits: GitCommit[];
|
|
183
|
-
newVersion: string;
|
|
184
|
-
name: string;
|
|
185
|
-
version: string;
|
|
186
|
-
private: boolean;
|
|
187
|
-
}>;
|
|
184
|
+
}): Promise<RootPackage>;
|
|
188
185
|
declare function readPackages({ cwd, patterns, ignorePackageNames, }: {
|
|
189
186
|
cwd: string;
|
|
190
187
|
patterns?: string[];
|
|
@@ -399,7 +396,7 @@ interface BumpResultTruthy {
|
|
|
399
396
|
/**
|
|
400
397
|
* Root package
|
|
401
398
|
*/
|
|
402
|
-
rootPackage?:
|
|
399
|
+
rootPackage?: RootPackage;
|
|
403
400
|
/**
|
|
404
401
|
* Bumped packages
|
|
405
402
|
*/
|
|
@@ -903,4 +900,4 @@ declare function publish(options?: Partial<PublishOptions>): Promise<{
|
|
|
903
900
|
declare function release(options?: Partial<ReleaseOptions>): Promise<void>;
|
|
904
901
|
|
|
905
902
|
export { bump, changelog, checkGitStatusIfDirty, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractVersionFromPackageTag, fetchGitTags, generateChangelog, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getRootPackage, github, gitlab, hasLernaJson, isBumpedPackage, isChangedPreid, isGraduating, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, loadRelizyConfig, parseGitRemoteUrl, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, pushCommitAndTags, readPackageJson, readPackages, release, resolveTags, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
906
|
-
export type { BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, PackageBase, PackageManager, PostedRelease, ProviderReleaseOptions, PublishConfig, PublishOptions, PublishResponse, ReadPackage, ReleaseConfig, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, Step, TemplatesConfig, VersionMode };
|
|
903
|
+
export type { BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, PackageBase, PackageManager, PostedRelease, ProviderReleaseOptions, PublishConfig, PublishOptions, PublishResponse, ReadPackage, ReleaseConfig, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, RootPackage, Step, TemplatesConfig, VersionMode };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as bump, c as changelog, m as checkGitStatusIfDirty, aa as confirmBump, s as createCommitAndTags, A as createGitlabRelease, f as defineConfig, o as detectGitProvider, C as detectPackageManager, D as determinePublishTag, _ as determineReleaseType, Z as determineSemverChange, X as executeBuildCmd, W as executeFormatCmd, T as executeHook, j as expandPackagesToBumpWithDependents, a2 as extractVersionFromPackageTag, n as fetchGitTags, g as generateChangelog, ab as getBumpedIndependentPackages, a9 as getBumpedPackageIndependently, V as getCIName, x as getCurrentGitBranch, y as getCurrentGitRef, e as getDefaultConfig, i as getDependentsOf, v as getFirstCommit, k as getGitStatus, N as getIndependentTag, R as getLastPackageTag, Q as getLastRepoTag, O as getLastStableTag, P as getLastTag, L as getPackageCommits, h as getPackageDependencies, a0 as getPackageNewVersion, K as getPackages, F as getPackagesToPublishInIndependentMode, E as getPackagesToPublishInSelectiveMode, a7 as getPreid, I as getRootPackage, z as github, B as gitlab, M as hasLernaJson, Y as isBumpedPackage, a8 as isChangedPreid, a6 as isGraduating, U as isInCI, a3 as isPrerelease, a5 as isPrereleaseReleaseType, a4 as isStableReleaseType, l as loadRelizyConfig, q as parseGitRemoteUrl, a as providerRelease, p as providerReleaseSafetyCheck, d as publish, G as publishPackage, u as pushCommitAndTags, H as readPackageJson, J as readPackages, r as release, S as resolveTags, t as topologicalSort, a1 as updateLernaVersion, w as writeChangelogToFile, $ as writeVersion } from './shared/relizy.
|
|
1
|
+
export { b as bump, c as changelog, m as checkGitStatusIfDirty, aa as confirmBump, s as createCommitAndTags, A as createGitlabRelease, f as defineConfig, o as detectGitProvider, C as detectPackageManager, D as determinePublishTag, _ as determineReleaseType, Z as determineSemverChange, X as executeBuildCmd, W as executeFormatCmd, T as executeHook, j as expandPackagesToBumpWithDependents, a2 as extractVersionFromPackageTag, n as fetchGitTags, g as generateChangelog, ab as getBumpedIndependentPackages, a9 as getBumpedPackageIndependently, V as getCIName, x as getCurrentGitBranch, y as getCurrentGitRef, e as getDefaultConfig, i as getDependentsOf, v as getFirstCommit, k as getGitStatus, N as getIndependentTag, R as getLastPackageTag, Q as getLastRepoTag, O as getLastStableTag, P as getLastTag, L as getPackageCommits, h as getPackageDependencies, a0 as getPackageNewVersion, K as getPackages, F as getPackagesToPublishInIndependentMode, E as getPackagesToPublishInSelectiveMode, a7 as getPreid, I as getRootPackage, z as github, B as gitlab, M as hasLernaJson, Y as isBumpedPackage, a8 as isChangedPreid, a6 as isGraduating, U as isInCI, a3 as isPrerelease, a5 as isPrereleaseReleaseType, a4 as isStableReleaseType, l as loadRelizyConfig, q as parseGitRemoteUrl, a as providerRelease, p as providerReleaseSafetyCheck, d as publish, G as publishPackage, u as pushCommitAndTags, H as readPackageJson, J as readPackages, r as release, S as resolveTags, t as topologicalSort, a1 as updateLernaVersion, w as writeChangelogToFile, $ as writeVersion } from './shared/relizy.Ymqkl0CI.mjs';
|
|
2
2
|
import '@maz-ui/node';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'node:child_process';
|
|
@@ -2157,24 +2157,27 @@ async function getRootPackage({
|
|
|
2157
2157
|
config,
|
|
2158
2158
|
changelog
|
|
2159
2159
|
});
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2160
|
+
let newVersion;
|
|
2161
|
+
if (config.monorepo?.versionMode !== "independent") {
|
|
2162
|
+
const releaseType = determineReleaseType({
|
|
2163
|
+
currentVersion: packageJson.version,
|
|
2164
|
+
commits,
|
|
2165
|
+
releaseType: config.bump.type,
|
|
2166
|
+
preid: config.bump.preid,
|
|
2167
|
+
types: config.types,
|
|
2168
|
+
force
|
|
2169
|
+
});
|
|
2170
|
+
if (!releaseType) {
|
|
2171
|
+
logger.fail("No commits require a version bump");
|
|
2172
|
+
process.exit(1);
|
|
2173
|
+
}
|
|
2174
|
+
newVersion = getPackageNewVersion({
|
|
2175
|
+
currentVersion: packageJson.version,
|
|
2176
|
+
releaseType,
|
|
2177
|
+
preid: config.bump.preid,
|
|
2178
|
+
suffix
|
|
2179
|
+
});
|
|
2171
2180
|
}
|
|
2172
|
-
const newVersion = getPackageNewVersion({
|
|
2173
|
-
currentVersion: packageJson.version,
|
|
2174
|
-
releaseType,
|
|
2175
|
-
preid: config.bump.preid,
|
|
2176
|
-
suffix
|
|
2177
|
-
});
|
|
2178
2181
|
return {
|
|
2179
2182
|
...packageJson,
|
|
2180
2183
|
path: config.cwd,
|
|
@@ -2446,7 +2449,7 @@ async function bumpUnifiedMode({
|
|
|
2446
2449
|
const currentVersion = rootPackage.version;
|
|
2447
2450
|
const newVersion = rootPackage.newVersion;
|
|
2448
2451
|
if (!newVersion) {
|
|
2449
|
-
throw new Error(`Could not determine a new version
|
|
2452
|
+
throw new Error(`Could not determine a new version`);
|
|
2450
2453
|
}
|
|
2451
2454
|
logger.debug(`Bump from ${from} to ${to}`);
|
|
2452
2455
|
logger.debug(`${currentVersion} \u2192 ${newVersion} (${config.monorepo?.versionMode || "standalone"} mode)`);
|
|
@@ -2457,7 +2460,7 @@ async function bumpUnifiedMode({
|
|
|
2457
2460
|
force
|
|
2458
2461
|
});
|
|
2459
2462
|
if (packages.length === 0) {
|
|
2460
|
-
logger.
|
|
2463
|
+
logger.debug("No packages to bump");
|
|
2461
2464
|
return { bumped: false };
|
|
2462
2465
|
}
|
|
2463
2466
|
if (!config.bump.yes) {
|
|
@@ -2524,6 +2527,9 @@ async function bumpSelectiveMode({
|
|
|
2524
2527
|
});
|
|
2525
2528
|
const currentVersion = rootPackage.version;
|
|
2526
2529
|
const newVersion = rootPackage.newVersion;
|
|
2530
|
+
if (!newVersion) {
|
|
2531
|
+
throw new Error("Could not determine a new version");
|
|
2532
|
+
}
|
|
2527
2533
|
logger.debug(`Bump from ${currentVersion} to ${newVersion}`);
|
|
2528
2534
|
logger.debug("Determining packages to bump...");
|
|
2529
2535
|
const packages = await getPackages({
|
|
@@ -2694,7 +2700,7 @@ async function bump(options = {}) {
|
|
|
2694
2700
|
logger.success(`${dryRun ? "[dry-run] " : ""}Version bump completed (${resultLog} package${resultLog === 1 || typeof resultLog === "string" ? "" : "s"} bumped)`);
|
|
2695
2701
|
} else {
|
|
2696
2702
|
logger.fail("No packages to bump, no relevant commits found");
|
|
2697
|
-
exit(
|
|
2703
|
+
exit(1);
|
|
2698
2704
|
}
|
|
2699
2705
|
await executeHook("success:bump", config, dryRun);
|
|
2700
2706
|
return result;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "relizy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.5-beta.
|
|
4
|
+
"version": "0.2.5-beta.5",
|
|
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",
|