relizy 0.2.5-beta.4 → 0.2.5-beta.6
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.BEjPuAKz.mjs} +42 -34
- 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.BEjPuAKz.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.BEjPuAKz.mjs';
|
|
2
2
|
import '@maz-ui/node';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'node:child_process';
|
|
@@ -435,21 +435,23 @@ async function generateMarkDown({
|
|
|
435
435
|
_authors.set(name, { email: /* @__PURE__ */ new Set([commit.author.email]), name });
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
for (const data of [...meta.email, meta.name]) {
|
|
445
|
-
const { user } = await fetch$1(`https://ungh.cc/users/find/${data}`).then((r) => r.json()).catch(() => ({ user: null }));
|
|
446
|
-
if (user) {
|
|
447
|
-
meta.github = user.username;
|
|
448
|
-
break;
|
|
438
|
+
if (updatedConfig.repo?.provider === "github") {
|
|
439
|
+
await Promise.all(
|
|
440
|
+
[..._authors.keys()].map(async (authorName) => {
|
|
441
|
+
const meta = _authors.get(authorName);
|
|
442
|
+
if (!meta) {
|
|
443
|
+
return;
|
|
449
444
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
445
|
+
for (const data of [...meta.email, meta.name]) {
|
|
446
|
+
const { user } = await fetch$1(`https://ungh.cc/users/find/${data}`).then((r) => r.json()).catch(() => ({ user: null }));
|
|
447
|
+
if (user) {
|
|
448
|
+
meta.github = user.username;
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
})
|
|
453
|
+
);
|
|
454
|
+
}
|
|
453
455
|
const authors = [..._authors.entries()].map((e) => ({
|
|
454
456
|
name: e[0],
|
|
455
457
|
...e[1]
|
|
@@ -2157,24 +2159,27 @@ async function getRootPackage({
|
|
|
2157
2159
|
config,
|
|
2158
2160
|
changelog
|
|
2159
2161
|
});
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2162
|
+
let newVersion;
|
|
2163
|
+
if (config.monorepo?.versionMode !== "independent") {
|
|
2164
|
+
const releaseType = determineReleaseType({
|
|
2165
|
+
currentVersion: packageJson.version,
|
|
2166
|
+
commits,
|
|
2167
|
+
releaseType: config.bump.type,
|
|
2168
|
+
preid: config.bump.preid,
|
|
2169
|
+
types: config.types,
|
|
2170
|
+
force
|
|
2171
|
+
});
|
|
2172
|
+
if (!releaseType) {
|
|
2173
|
+
logger.fail("No commits require a version bump");
|
|
2174
|
+
process.exit(1);
|
|
2175
|
+
}
|
|
2176
|
+
newVersion = getPackageNewVersion({
|
|
2177
|
+
currentVersion: packageJson.version,
|
|
2178
|
+
releaseType,
|
|
2179
|
+
preid: config.bump.preid,
|
|
2180
|
+
suffix
|
|
2181
|
+
});
|
|
2171
2182
|
}
|
|
2172
|
-
const newVersion = getPackageNewVersion({
|
|
2173
|
-
currentVersion: packageJson.version,
|
|
2174
|
-
releaseType,
|
|
2175
|
-
preid: config.bump.preid,
|
|
2176
|
-
suffix
|
|
2177
|
-
});
|
|
2178
2183
|
return {
|
|
2179
2184
|
...packageJson,
|
|
2180
2185
|
path: config.cwd,
|
|
@@ -2446,7 +2451,7 @@ async function bumpUnifiedMode({
|
|
|
2446
2451
|
const currentVersion = rootPackage.version;
|
|
2447
2452
|
const newVersion = rootPackage.newVersion;
|
|
2448
2453
|
if (!newVersion) {
|
|
2449
|
-
throw new Error(`Could not determine a new version
|
|
2454
|
+
throw new Error(`Could not determine a new version`);
|
|
2450
2455
|
}
|
|
2451
2456
|
logger.debug(`Bump from ${from} to ${to}`);
|
|
2452
2457
|
logger.debug(`${currentVersion} \u2192 ${newVersion} (${config.monorepo?.versionMode || "standalone"} mode)`);
|
|
@@ -2457,7 +2462,7 @@ async function bumpUnifiedMode({
|
|
|
2457
2462
|
force
|
|
2458
2463
|
});
|
|
2459
2464
|
if (packages.length === 0) {
|
|
2460
|
-
logger.
|
|
2465
|
+
logger.debug("No packages to bump");
|
|
2461
2466
|
return { bumped: false };
|
|
2462
2467
|
}
|
|
2463
2468
|
if (!config.bump.yes) {
|
|
@@ -2524,6 +2529,9 @@ async function bumpSelectiveMode({
|
|
|
2524
2529
|
});
|
|
2525
2530
|
const currentVersion = rootPackage.version;
|
|
2526
2531
|
const newVersion = rootPackage.newVersion;
|
|
2532
|
+
if (!newVersion) {
|
|
2533
|
+
throw new Error("Could not determine a new version");
|
|
2534
|
+
}
|
|
2527
2535
|
logger.debug(`Bump from ${currentVersion} to ${newVersion}`);
|
|
2528
2536
|
logger.debug("Determining packages to bump...");
|
|
2529
2537
|
const packages = await getPackages({
|
|
@@ -2694,7 +2702,7 @@ async function bump(options = {}) {
|
|
|
2694
2702
|
logger.success(`${dryRun ? "[dry-run] " : ""}Version bump completed (${resultLog} package${resultLog === 1 || typeof resultLog === "string" ? "" : "s"} bumped)`);
|
|
2695
2703
|
} else {
|
|
2696
2704
|
logger.fail("No packages to bump, no relevant commits found");
|
|
2697
|
-
exit(
|
|
2705
|
+
exit(1);
|
|
2698
2706
|
}
|
|
2699
2707
|
await executeHook("success:bump", config, dryRun);
|
|
2700
2708
|
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.6",
|
|
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",
|