relizy 0.2.5-beta.6 → 0.2.5-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -5,7 +5,7 @@ import process from 'node:process';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { printBanner, logger } from '@maz-ui/node';
7
7
  import { Command } from 'commander';
8
- import { 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';
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.cH6JI7VO.mjs';
9
9
  import 'node:child_process';
10
10
  import '@maz-ui/utils';
11
11
  import 'c12';
@@ -130,7 +130,7 @@ program.command("provider-release").description("Publish release to git provider
130
130
  process.exit(1);
131
131
  }
132
132
  });
133
- program.command("release").description("Complete release workflow (bump + changelog + commit + tag + push to remote + publish release)").option("--major", "Bump major version").option("--minor", "Bump minor version").option("--patch", "Bump patch version").option("--prerelease", "Bump prerelease version").option("--premajor", "Bump premajor version").option("--preminor", "Bump preminor version").option("--prepatch", "Bump prepatch version").option("--preid <id>", "Prerelease identifier (alpha, beta, rc, etc.)").option("--suffix <suffix>", "Custom suffix for prerelease versions - replace the last .X with .suffix (e.g. 1.0.0-beta.0 -> 1.0.0-beta.suffix)").option("--from <ref>", "Start commit reference").option("--to <ref>", "End commit reference").option("--no-push", "Skip push changes and tags to remote").option("--no-provider-release", "Skip release creation (GitHub/GitLab)").option("--no-publish", "Skip npm publish").option("--registry <url>", "Custom npm registry URL").option("--tag <tag>", "Publish with specific tag (default: latest for stable, next for prerelease)").option("--access <type>", "Package access level (public or restricted)").option("--otp <code>", "One-time password for 2FA").option("--no-verify", "Skip git hooks during commit").option("--format-cmd <cmd>", 'Command to format CHANGELOG files after generation (e.g. "pnpm lint")').option("--build-cmd <cmd>", 'Command to build packages before publish (e.g. "pnpm build")').option("--no-root-changelog", "Skip generation of root changelog file").option("--token <token>", "Git token (github or gitlab)").option("--force", "Bump even if there are no commits").option("--no-clean", "Skip check if the working directory is clean").option("--no-commit", "Skip commit and tag").option("--no-changelog", "Skip changelog generation files").option("--provider <provider>", "Git provider (github or gitlab)").option("--yes", "Skip confirmation prompt about bumping packages").action(async (options) => {
133
+ program.command("release").description("Complete release workflow (bump + changelog + commit + tag + push to remote + publish release)").option("--major", "Bump major version").option("--minor", "Bump minor version").option("--patch", "Bump patch version").option("--prerelease", "Bump prerelease version").option("--premajor", "Bump premajor version").option("--preminor", "Bump preminor version").option("--prepatch", "Bump prepatch version").option("--preid <id>", "Prerelease identifier (alpha, beta, rc, etc.)").option("--suffix <suffix>", "Custom suffix for prerelease versions - replace the last .X with .suffix (e.g. 1.0.0-beta.0 -> 1.0.0-beta.suffix)").option("--from <ref>", "Start commit reference").option("--to <ref>", "End commit reference").option("--no-push", "Skip push changes and tags to remote").option("--no-provider-release", "Skip release creation (GitHub/GitLab)").option("--no-publish", "Skip npm publish").option("--registry <url>", "Custom npm registry URL").option("--tag <tag>", "Publish with specific tag (default: latest for stable, next for prerelease)").option("--access <type>", "Package access level (public or restricted)").option("--otp <code>", "One-time password for 2FA").option("--no-verify", "Skip git hooks during commit").option("--format-cmd <cmd>", 'Command to format CHANGELOG files after generation (e.g. "pnpm lint")').option("--build-cmd <cmd>", 'Command to build packages before publish (e.g. "pnpm build")').option("--no-root-changelog", "Skip generation of root changelog file").option("--token <token>", "Git token (github or gitlab)").option("--force", "Bump even if there are no commits").option("--no-clean", "Skip check if the working directory is clean").option("--no-commit", "Skip commit and tag").option("--no-git-tag", "Skip tag creation").option("--no-changelog", "Skip changelog generation files").option("--provider <provider>", "Git provider (github or gitlab)").option("--yes", "Skip confirmation prompt about bumping packages").action(async (options) => {
134
134
  try {
135
135
  await release({
136
136
  type: getReleaseType(options),
@@ -143,6 +143,7 @@ program.command("release").description("Complete release workflow (bump + change
143
143
  push: hasCliFlag("--no-push") || hasCliFlag("--no-commit") ? false : void 0,
144
144
  publish: hasCliFlag("--no-publish") ? false : void 0,
145
145
  providerRelease: hasCliFlag("--no-provider-release") ? false : void 0,
146
+ gitTag: hasCliFlag("--no-git-tag") ? false : void 0,
146
147
  noVerify: hasCliFlag("--no-verify") ? true : void 0,
147
148
  clean: hasCliFlag("--no-clean") ? false : void 0,
148
149
  registry: options.registry,
package/dist/index.d.mts CHANGED
@@ -115,7 +115,8 @@ declare function createCommitAndTags({ config, noVerify, bumpedPackages, newVers
115
115
  dryRun?: boolean;
116
116
  logLevel: LogLevel;
117
117
  }): Promise<string[]>;
118
- declare function pushCommitAndTags({ dryRun, logLevel, cwd }: {
118
+ declare function pushCommitAndTags({ config, dryRun, logLevel, cwd }: {
119
+ config: ResolvedRelizyConfig;
119
120
  dryRun: boolean;
120
121
  logLevel?: LogLevel;
121
122
  cwd: string;
@@ -720,6 +721,11 @@ interface ReleaseConfig {
720
721
  * @default false
721
722
  */
722
723
  clean?: boolean;
724
+ /**
725
+ * Create tag
726
+ * @default true
727
+ */
728
+ gitTag?: boolean;
723
729
  }
724
730
  interface ReleaseOptions extends ReleaseConfig, BumpConfig, ChangelogConfig, PublishConfig {
725
731
  /**
package/dist/index.d.ts CHANGED
@@ -115,7 +115,8 @@ declare function createCommitAndTags({ config, noVerify, bumpedPackages, newVers
115
115
  dryRun?: boolean;
116
116
  logLevel: LogLevel;
117
117
  }): Promise<string[]>;
118
- declare function pushCommitAndTags({ dryRun, logLevel, cwd }: {
118
+ declare function pushCommitAndTags({ config, dryRun, logLevel, cwd }: {
119
+ config: ResolvedRelizyConfig;
119
120
  dryRun: boolean;
120
121
  logLevel?: LogLevel;
121
122
  cwd: string;
@@ -720,6 +721,11 @@ interface ReleaseConfig {
720
721
  * @default false
721
722
  */
722
723
  clean?: boolean;
724
+ /**
725
+ * Create tag
726
+ * @default true
727
+ */
728
+ gitTag?: boolean;
723
729
  }
724
730
  interface ReleaseOptions extends ReleaseConfig, BumpConfig, ChangelogConfig, PublishConfig {
725
731
  /**
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.BEjPuAKz.mjs';
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.cH6JI7VO.mjs';
2
2
  import '@maz-ui/node';
3
3
  import 'node:process';
4
4
  import 'node:child_process';
@@ -256,7 +256,7 @@ async function createCommitAndTags({
256
256
  }
257
257
  const rootPackage = readPackageJson(internalConfig.cwd);
258
258
  newVersion = newVersion || rootPackage.version;
259
- const versionForMessage = internalConfig.monorepo?.versionMode === "independent" ? bumpedPackages?.map((pkg) => getIndependentTag(pkg)).join(", ") || "unknown" : newVersion || "unknown";
259
+ const versionForMessage = internalConfig.monorepo?.versionMode === "independent" ? bumpedPackages?.map((pkg) => getIndependentTag({ name: pkg.name, version: pkg.newVersion || pkg.version })).join(", ") || "unknown" : newVersion || "unknown";
260
260
  const commitMessage = internalConfig.templates.commitMessage?.replaceAll("{{newVersion}}", versionForMessage) || `chore(release): bump version to ${versionForMessage}`;
261
261
  const noVerifyFlag = noVerify ? "--no-verify " : "";
262
262
  logger.debug(`No verify: ${noVerify}`);
@@ -275,7 +275,7 @@ async function createCommitAndTags({
275
275
  const signTags = internalConfig.signTags ? "-s" : "";
276
276
  logger.debug(`Sign tags: ${internalConfig.signTags}`);
277
277
  const createdTags = [];
278
- if (internalConfig.monorepo?.versionMode === "independent" && bumpedPackages && bumpedPackages.length > 0) {
278
+ if (internalConfig.monorepo?.versionMode === "independent" && bumpedPackages && bumpedPackages.length > 0 && internalConfig.release.gitTag) {
279
279
  logger.debug(`Creating ${bumpedPackages.length} independent package tags`);
280
280
  for (const pkg of bumpedPackages) {
281
281
  if (!pkg.newVersion) {
@@ -304,7 +304,7 @@ async function createCommitAndTags({
304
304
  createdTags.push(tagName);
305
305
  }
306
306
  logger.success(`Created ${createdTags.length} tags for independent packages, ${createdTags.join(", ")}`);
307
- } else {
307
+ } else if (internalConfig.release.gitTag) {
308
308
  const tagName = internalConfig.templates.tagBody?.replaceAll("{{newVersion}}", newVersion);
309
309
  const tagMessage = internalConfig.templates?.tagMessage?.replaceAll("{{newVersion}}", newVersion) || tagName;
310
310
  if (dryRun) {
@@ -337,13 +337,14 @@ async function createCommitAndTags({
337
337
  throw error;
338
338
  }
339
339
  }
340
- async function pushCommitAndTags({ dryRun, logLevel, cwd }) {
340
+ async function pushCommitAndTags({ config, dryRun, logLevel, cwd }) {
341
341
  logger.start("Start push changes and tags");
342
+ const command = config.release.gitTag ? "git push --follow-tags" : "git push";
342
343
  if (dryRun) {
343
- logger.info("[dry-run] git push --follow-tags");
344
+ logger.info(`[dry-run] ${command}`);
344
345
  } else {
345
- logger.debug("Executing: git push --follow-tags");
346
- await execPromise("git push --follow-tags", { noStderr: true, noStdout: true, logLevel, cwd });
346
+ logger.debug(`Executing: ${command}`);
347
+ await execPromise(command, { noStderr: true, noStdout: true, logLevel, cwd });
347
348
  }
348
349
  logger.success("Pushing changes and tags completed!");
349
350
  }
@@ -1258,7 +1259,7 @@ async function gitlab(options = {}) {
1258
1259
  from,
1259
1260
  to
1260
1261
  });
1261
- logger.debug(`Root package: ${getIndependentTag(rootPackage)}`);
1262
+ logger.debug(`Root package: ${getIndependentTag({ name: rootPackage.name, version: rootPackage.newVersion || rootPackage.version })}`);
1262
1263
  return await gitlabUnified({
1263
1264
  config,
1264
1265
  dryRun,
@@ -2084,7 +2085,7 @@ async function publishPackage({
2084
2085
  dryRun
2085
2086
  }) {
2086
2087
  const tag = determinePublishTag(pkg.version, config.publish.tag);
2087
- const packageNameAndVersion = getIndependentTag(pkg);
2088
+ const packageNameAndVersion = getIndependentTag({ name: pkg.name, version: pkg.newVersion || pkg.version });
2088
2089
  const baseCommand = packageManager === "yarn" && isYarnBerry() ? "yarn npm" : packageManager;
2089
2090
  logger.debug(`Building publish command for ${pkg.name}`);
2090
2091
  let dynamicOtp;
@@ -3060,7 +3061,7 @@ async function publish(options = {}) {
3060
3061
  });
3061
3062
  for (const pkg of sortedPackages) {
3062
3063
  if (publishedPackages.some((p) => p.name === pkg.name)) {
3063
- logger.debug(`Publishing ${getIndependentTag(pkg)}...`);
3064
+ logger.debug(`Publishing ${getIndependentTag({ name: pkg.name, version: pkg.newVersion || pkg.version })}...`);
3064
3065
  await publishPackage({
3065
3066
  pkg,
3066
3067
  config,
@@ -3121,7 +3122,8 @@ function getReleaseConfig(options = {}) {
3121
3122
  publish: options.publish,
3122
3123
  noVerify: options.noVerify,
3123
3124
  providerRelease: options.providerRelease,
3124
- clean: options.clean
3125
+ clean: options.clean,
3126
+ gitTag: options.gitTag
3125
3127
  },
3126
3128
  safetyCheck: options.safetyCheck
3127
3129
  }
@@ -3198,7 +3200,12 @@ async function release(options = {}) {
3198
3200
  if (config.release.push && config.release.commit) {
3199
3201
  await executeHook("before:push", config, dryRun);
3200
3202
  try {
3201
- await pushCommitAndTags({ dryRun, logLevel: config.logLevel, cwd: config.cwd });
3203
+ await pushCommitAndTags({
3204
+ config,
3205
+ dryRun,
3206
+ logLevel: config.logLevel,
3207
+ cwd: config.cwd
3208
+ });
3202
3209
  await executeHook("success:push", config, dryRun);
3203
3210
  } catch (error) {
3204
3211
  await executeHook("error:push", config, dryRun);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "relizy",
3
3
  "type": "module",
4
- "version": "0.2.5-beta.6",
4
+ "version": "0.2.5-beta.8",
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",