relizy 1.0.0-beta.1 → 1.0.0-beta.2

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 { a7 as isInCI, a8 as getCIName, b as bump, c as changelog, e as publish, a as providerRelease, f as social, r as release } from './shared/relizy.Bpj1yhpn.mjs';
8
+ import { a7 as isInCI, a8 as getCIName, b as bump, c as changelog, e as publish, a as providerRelease, f as social, r as release } from './shared/relizy.H6UfHwti.mjs';
9
9
  import 'changelogen';
10
10
  import 'fast-glob';
11
11
  import '@inquirer/prompts';
package/dist/index.d.mts CHANGED
@@ -70,6 +70,7 @@ declare function getDefaultConfig(): {
70
70
  twitter: {
71
71
  enabled: false;
72
72
  onlyStable: true;
73
+ postMaxLength: number;
73
74
  };
74
75
  slack: {
75
76
  enabled: boolean;
@@ -331,15 +332,16 @@ declare function getTwitterCredentials({ socialCredentials, tokenCredentials }:
331
332
  socialCredentials?: TwitterCredentials;
332
333
  tokenCredentials?: TwitterCredentials;
333
334
  }): ResolvedTwitterCredentials | null;
334
- declare function formatTweetMessage({ template, projectName, version, changelog, releaseUrl, changelogUrl }: {
335
+ declare function formatTweetMessage({ template, projectName, version, changelog, releaseUrl, changelogUrl, postMaxLength }: {
335
336
  template: string;
336
337
  projectName: string;
337
338
  version: string;
338
339
  changelog: string;
339
340
  releaseUrl?: string;
340
341
  changelogUrl?: string;
342
+ postMaxLength: number;
341
343
  }): string;
342
- declare function postReleaseToTwitter({ version, projectName, changelog, releaseUrl, changelogUrl, credentials, template, dryRun, }: TwitterOptions): Promise<twitter_api_v2.TweetV2PostTweetResult | undefined>;
344
+ declare function postReleaseToTwitter({ version, projectName, changelog, releaseUrl, changelogUrl, credentials, template, postMaxLength, dryRun, }: TwitterOptions): Promise<twitter_api_v2.TweetV2PostTweetResult | undefined>;
343
345
 
344
346
  /**
345
347
  * Execute a hook
@@ -1047,14 +1049,19 @@ interface TwitterSocialConfig {
1047
1049
  onlyStable?: boolean;
1048
1050
  /**
1049
1051
  * Custom message template
1050
- * Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1051
- * @default '🚀 {{projectName}} {{version}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
1052
+ * Available variables: {{projectName}}, {{newVersion}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1053
+ * @default '🚀 {{projectName}} {{newVersion}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
1052
1054
  */
1053
1055
  template?: string;
1054
1056
  /**
1055
1057
  * Twitter credentials (optional - falls back to environment variables)
1056
1058
  */
1057
1059
  credentials?: TwitterCredentials;
1060
+ /**
1061
+ * Maximum length of the tweet
1062
+ * @default 280
1063
+ */
1064
+ postMaxLength?: number;
1058
1065
  }
1059
1066
  interface SlackCredentials {
1060
1067
  /**
@@ -1081,7 +1088,7 @@ interface SlackSocialConfig {
1081
1088
  channel: string;
1082
1089
  /**
1083
1090
  * Custom message template
1084
- * Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1091
+ * Available variables: {{projectName}}, {{newVersion}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1085
1092
  */
1086
1093
  template?: string;
1087
1094
  /**
@@ -1143,6 +1150,11 @@ interface TwitterOptions {
1143
1150
  * @default false
1144
1151
  */
1145
1152
  dryRun?: boolean;
1153
+ /**
1154
+ * Maximum length of the tweet
1155
+ * @default 280
1156
+ */
1157
+ postMaxLength: number;
1146
1158
  }
1147
1159
  interface SlackOptions {
1148
1160
  /**
@@ -1202,13 +1214,13 @@ interface TemplatesConfig {
1202
1214
  emptyChangelogContent?: string;
1203
1215
  /**
1204
1216
  * Twitter message template
1205
- * Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1206
- * @default '🚀 {{projectName}} {{version}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
1217
+ * Available variables: {{projectName}}, {{newVersion}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1218
+ * @default '🚀 {{projectName}} {{newVersion}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
1207
1219
  */
1208
1220
  twitterMessage?: string;
1209
1221
  /**
1210
1222
  * Slack message template (optional - if not provided, uses rich blocks format)
1211
- * Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1223
+ * Available variables: {{projectName}}, {{newVersion}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1212
1224
  * @default undefined
1213
1225
  */
1214
1226
  slackMessage?: string;
package/dist/index.d.ts CHANGED
@@ -70,6 +70,7 @@ declare function getDefaultConfig(): {
70
70
  twitter: {
71
71
  enabled: false;
72
72
  onlyStable: true;
73
+ postMaxLength: number;
73
74
  };
74
75
  slack: {
75
76
  enabled: boolean;
@@ -331,15 +332,16 @@ declare function getTwitterCredentials({ socialCredentials, tokenCredentials }:
331
332
  socialCredentials?: TwitterCredentials;
332
333
  tokenCredentials?: TwitterCredentials;
333
334
  }): ResolvedTwitterCredentials | null;
334
- declare function formatTweetMessage({ template, projectName, version, changelog, releaseUrl, changelogUrl }: {
335
+ declare function formatTweetMessage({ template, projectName, version, changelog, releaseUrl, changelogUrl, postMaxLength }: {
335
336
  template: string;
336
337
  projectName: string;
337
338
  version: string;
338
339
  changelog: string;
339
340
  releaseUrl?: string;
340
341
  changelogUrl?: string;
342
+ postMaxLength: number;
341
343
  }): string;
342
- declare function postReleaseToTwitter({ version, projectName, changelog, releaseUrl, changelogUrl, credentials, template, dryRun, }: TwitterOptions): Promise<twitter_api_v2.TweetV2PostTweetResult | undefined>;
344
+ declare function postReleaseToTwitter({ version, projectName, changelog, releaseUrl, changelogUrl, credentials, template, postMaxLength, dryRun, }: TwitterOptions): Promise<twitter_api_v2.TweetV2PostTweetResult | undefined>;
343
345
 
344
346
  /**
345
347
  * Execute a hook
@@ -1047,14 +1049,19 @@ interface TwitterSocialConfig {
1047
1049
  onlyStable?: boolean;
1048
1050
  /**
1049
1051
  * Custom message template
1050
- * Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1051
- * @default '🚀 {{projectName}} {{version}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
1052
+ * Available variables: {{projectName}}, {{newVersion}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1053
+ * @default '🚀 {{projectName}} {{newVersion}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
1052
1054
  */
1053
1055
  template?: string;
1054
1056
  /**
1055
1057
  * Twitter credentials (optional - falls back to environment variables)
1056
1058
  */
1057
1059
  credentials?: TwitterCredentials;
1060
+ /**
1061
+ * Maximum length of the tweet
1062
+ * @default 280
1063
+ */
1064
+ postMaxLength?: number;
1058
1065
  }
1059
1066
  interface SlackCredentials {
1060
1067
  /**
@@ -1081,7 +1088,7 @@ interface SlackSocialConfig {
1081
1088
  channel: string;
1082
1089
  /**
1083
1090
  * Custom message template
1084
- * Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1091
+ * Available variables: {{projectName}}, {{newVersion}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1085
1092
  */
1086
1093
  template?: string;
1087
1094
  /**
@@ -1143,6 +1150,11 @@ interface TwitterOptions {
1143
1150
  * @default false
1144
1151
  */
1145
1152
  dryRun?: boolean;
1153
+ /**
1154
+ * Maximum length of the tweet
1155
+ * @default 280
1156
+ */
1157
+ postMaxLength: number;
1146
1158
  }
1147
1159
  interface SlackOptions {
1148
1160
  /**
@@ -1202,13 +1214,13 @@ interface TemplatesConfig {
1202
1214
  emptyChangelogContent?: string;
1203
1215
  /**
1204
1216
  * Twitter message template
1205
- * Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1206
- * @default '🚀 {{projectName}} {{version}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
1217
+ * Available variables: {{projectName}}, {{newVersion}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1218
+ * @default '🚀 {{projectName}} {{newVersion}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
1207
1219
  */
1208
1220
  twitterMessage?: string;
1209
1221
  /**
1210
1222
  * Slack message template (optional - if not provided, uses rich blocks format)
1211
- * Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1223
+ * Available variables: {{projectName}}, {{newVersion}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
1212
1224
  * @default undefined
1213
1225
  */
1214
1226
  slackMessage?: string;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { b as bump, c as changelog, o as checkGitStatusIfDirty, ar as confirmBump, y as createCommitAndTags, F as createGitlabRelease, i as defineConfig, u as detectGitProvider, H as detectPackageManager, I as determinePublishTag, af as determineReleaseType, ae as determineSemverChange, aa as executeBuildCmd, a9 as executeFormatCmd, a6 as executeHook, m as expandPackagesToBumpWithDependents, X as extractChangelogSummary, aj as extractVersionFromPackageTag, au as extractVersionFromTag, q as fetchGitTags, U as formatChangelogForSlack, V as formatSlackMessage, a4 as formatTweetMessage, g as generateChangelog, L as getAuthCommand, as as getBumpedIndependentPackages, aq as getBumpedPackageIndependently, a8 as getCIName, C as getCurrentGitBranch, D as getCurrentGitRef, h as getDefaultConfig, k as getDependentsOf, B as getFirstCommit, n as getGitStatus, Z as getIndependentTag, a1 as getLastPackageTag, a0 as getLastRepoTag, _ as getLastStableTag, $ as getLastTag, x as getModifiedReleaseFilePatterns, R as getPackageCommits, j as getPackageDependencies, ah as getPackageNewVersion, Q as getPackages, ac as getPackagesOrBumpedPackages, K as getPackagesToPublishInIndependentMode, J as getPackagesToPublishInSelectiveMode, ao as getPreid, Y as getReleaseUrl, O as getRootPackage, T as getSlackToken, a3 as getTwitterCredentials, E as github, G as gitlab, S as hasLernaJson, ab as isBumpedPackage, ap as isChangedPreid, an as isGraduating, ad as isGraduatingToStableBetweenVersion, a7 as isInCI, ak as isPrerelease, am as isPrereleaseReleaseType, al as isStableReleaseType, av as isTagVersionCompatibleWithCurrent, l as loadRelizyConfig, v as parseGitRemoteUrl, W as postReleaseToSlack, a5 as postReleaseToTwitter, a as providerRelease, p as providerReleaseSafetyCheck, e as publish, M as publishPackage, d as publishSafetyCheck, z as pushCommitAndTags, N as readPackageJson, P as readPackages, r as release, a2 as resolveTags, A as rollbackModifiedFiles, at as shouldFilterPrereleaseTags, f as social, s as socialSafetyCheck, t as topologicalSort, ai as updateLernaVersion, w as writeChangelogToFile, ag as writeVersion } from './shared/relizy.Bpj1yhpn.mjs';
1
+ export { b as bump, c as changelog, o as checkGitStatusIfDirty, ar as confirmBump, y as createCommitAndTags, F as createGitlabRelease, i as defineConfig, u as detectGitProvider, H as detectPackageManager, I as determinePublishTag, af as determineReleaseType, ae as determineSemverChange, aa as executeBuildCmd, a9 as executeFormatCmd, a6 as executeHook, m as expandPackagesToBumpWithDependents, X as extractChangelogSummary, aj as extractVersionFromPackageTag, au as extractVersionFromTag, q as fetchGitTags, U as formatChangelogForSlack, V as formatSlackMessage, a4 as formatTweetMessage, g as generateChangelog, L as getAuthCommand, as as getBumpedIndependentPackages, aq as getBumpedPackageIndependently, a8 as getCIName, C as getCurrentGitBranch, D as getCurrentGitRef, h as getDefaultConfig, k as getDependentsOf, B as getFirstCommit, n as getGitStatus, Z as getIndependentTag, a1 as getLastPackageTag, a0 as getLastRepoTag, _ as getLastStableTag, $ as getLastTag, x as getModifiedReleaseFilePatterns, R as getPackageCommits, j as getPackageDependencies, ah as getPackageNewVersion, Q as getPackages, ac as getPackagesOrBumpedPackages, K as getPackagesToPublishInIndependentMode, J as getPackagesToPublishInSelectiveMode, ao as getPreid, Y as getReleaseUrl, O as getRootPackage, T as getSlackToken, a3 as getTwitterCredentials, E as github, G as gitlab, S as hasLernaJson, ab as isBumpedPackage, ap as isChangedPreid, an as isGraduating, ad as isGraduatingToStableBetweenVersion, a7 as isInCI, ak as isPrerelease, am as isPrereleaseReleaseType, al as isStableReleaseType, av as isTagVersionCompatibleWithCurrent, l as loadRelizyConfig, v as parseGitRemoteUrl, W as postReleaseToSlack, a5 as postReleaseToTwitter, a as providerRelease, p as providerReleaseSafetyCheck, e as publish, M as publishPackage, d as publishSafetyCheck, z as pushCommitAndTags, N as readPackageJson, P as readPackages, r as release, a2 as resolveTags, A as rollbackModifiedFiles, at as shouldFilterPrereleaseTags, f as social, s as socialSafetyCheck, t as topologicalSort, ai as updateLernaVersion, w as writeChangelogToFile, ag as writeVersion } from './shared/relizy.H6UfHwti.mjs';
2
2
  import '@maz-ui/node';
3
3
  import 'node:process';
4
4
  import 'node:fs';
@@ -2008,7 +2008,7 @@ function getDefaultConfig() {
2008
2008
  tagMessage: "Bump version to {{newVersion}}",
2009
2009
  tagBody: "v{{newVersion}}",
2010
2010
  emptyChangelogContent: "No relevant changes for this release",
2011
- twitterMessage: "\u{1F680} {{projectName}} {{version}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}",
2011
+ twitterMessage: "\u{1F680} {{projectName}} {{newVersion}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}",
2012
2012
  slackMessage: void 0
2013
2013
  // Use rich blocks format by default (no template)
2014
2014
  },
@@ -2058,7 +2058,8 @@ function getDefaultConfig() {
2058
2058
  social: {
2059
2059
  twitter: {
2060
2060
  enabled: false,
2061
- onlyStable: true
2061
+ onlyStable: true,
2062
+ postMaxLength: 280
2062
2063
  },
2063
2064
  slack: {
2064
2065
  enabled: false,
@@ -2854,7 +2855,7 @@ async function publishPackage({
2854
2855
  }
2855
2856
  }
2856
2857
 
2857
- function extractChangelogSummary(changelog, maxLength = 150) {
2858
+ function extractChangelogSummary(changelog, maxLength) {
2858
2859
  if (changelog.trim() === "") {
2859
2860
  return "";
2860
2861
  }
@@ -2866,7 +2867,7 @@ function extractChangelogSummary(changelog, maxLength = 150) {
2866
2867
  const sentences = cleanedResult.split(/[.!?]\s+/);
2867
2868
  let summary = "";
2868
2869
  for (const sentence of sentences) {
2869
- if ((summary + sentence).length > maxLength || sentence.trim() === "") {
2870
+ if (maxLength && (summary + sentence).length > maxLength || sentence.trim() === "") {
2870
2871
  break;
2871
2872
  }
2872
2873
  summary += `${sentence}. `;
@@ -2909,7 +2910,7 @@ function formatChangelogForSlack(changelog, maxLength = 500) {
2909
2910
  function formatSlackMessage({ projectName, version, changelog, releaseUrl, changelogUrl, template }) {
2910
2911
  if (template) {
2911
2912
  const summary = extractChangelogSummary(changelog, 500);
2912
- let message = template.replace("{{projectName}}", projectName).replace("{{version}}", version).replace("{{changelog}}", summary);
2913
+ let message = template.replace("{{projectName}}", projectName).replace("{{newVersion}}", version).replace("{{changelog}}", summary);
2913
2914
  if (releaseUrl) {
2914
2915
  message = message.replace("{{releaseUrl}}", releaseUrl);
2915
2916
  } else {
@@ -3070,10 +3071,11 @@ function getTwitterCredentials({ socialCredentials, tokenCredentials }) {
3070
3071
  accessTokenSecret
3071
3072
  };
3072
3073
  }
3073
- function formatTweetMessage({ template, projectName, version, changelog, releaseUrl, changelogUrl }) {
3074
- const TWITTER_MAX_LENGTH = 280;
3074
+ function formatTweetMessage({ template, projectName, version, changelog, releaseUrl, changelogUrl, postMaxLength }) {
3075
+ const MAX_LENGTH = postMaxLength;
3075
3076
  const ELLIPSIS = "...";
3076
- let templateWithValues = template.replace("{{projectName}}", projectName).replace("{{version}}", version);
3077
+ const changelogSummary = extractChangelogSummary(changelog, postMaxLength);
3078
+ let templateWithValues = template.replace("{{projectName}}", projectName).replace("{{newVersion}}", version);
3077
3079
  if (releaseUrl) {
3078
3080
  templateWithValues = templateWithValues.replace("{{releaseUrl}}", releaseUrl);
3079
3081
  } else {
@@ -3085,15 +3087,15 @@ function formatTweetMessage({ template, projectName, version, changelog, release
3085
3087
  templateWithValues = templateWithValues.replace("{{changelogUrl}}", "");
3086
3088
  }
3087
3089
  const templateWithoutChangelog = templateWithValues.replace("{{changelog}}", "");
3088
- const availableForChangelog = TWITTER_MAX_LENGTH - templateWithoutChangelog.length;
3089
- let finalChangelog = changelog;
3090
- if (changelog.length > availableForChangelog) {
3090
+ const availableForChangelog = MAX_LENGTH - templateWithoutChangelog.length;
3091
+ let finalChangelog = changelogSummary;
3092
+ if (changelogSummary.length > availableForChangelog) {
3091
3093
  const maxLength = Math.max(0, availableForChangelog - ELLIPSIS.length);
3092
- finalChangelog = changelog.substring(0, maxLength) + ELLIPSIS;
3094
+ finalChangelog = changelogSummary.substring(0, maxLength) + ELLIPSIS;
3093
3095
  }
3094
3096
  let message = templateWithValues.replace("{{changelog}}", finalChangelog).trim();
3095
- if (message.length > TWITTER_MAX_LENGTH) {
3096
- message = message.substring(0, TWITTER_MAX_LENGTH - ELLIPSIS.length) + ELLIPSIS;
3097
+ if (message.length > MAX_LENGTH) {
3098
+ message = message.substring(0, MAX_LENGTH - ELLIPSIS.length) + ELLIPSIS;
3097
3099
  }
3098
3100
  return message;
3099
3101
  }
@@ -3105,22 +3107,23 @@ async function postReleaseToTwitter({
3105
3107
  changelogUrl,
3106
3108
  credentials,
3107
3109
  template,
3110
+ postMaxLength,
3108
3111
  dryRun = false
3109
3112
  }) {
3110
3113
  logger.debug("Preparing Twitter post...");
3111
- const changelogSummary = extractChangelogSummary(changelog, 150);
3112
3114
  const message = formatTweetMessage({
3113
3115
  template,
3114
3116
  projectName,
3115
3117
  version,
3116
- changelog: changelogSummary,
3118
+ changelog,
3117
3119
  releaseUrl,
3118
- changelogUrl
3120
+ changelogUrl,
3121
+ postMaxLength
3119
3122
  });
3120
3123
  logger.debug(`Tweet message (${message.length} chars):
3121
3124
  ${message}`);
3122
3125
  if (dryRun) {
3123
- logger.info("[dry-run] Would post tweet:", message);
3126
+ logger.info("[dry-run] Would post tweet:", `"${message}"`);
3124
3127
  return;
3125
3128
  }
3126
3129
  try {
@@ -3482,7 +3485,13 @@ ${packageChangelogs.join("\n\n")}`;
3482
3485
  changelog: aggregatedChangelog,
3483
3486
  dryRun
3484
3487
  });
3485
- logger.debug("Aggregated root changelog written");
3488
+ if (dryRun) {
3489
+ logger.info(`[dry-run] Root package "${rootPackageRead.name}" - ${date} - Changelog:
3490
+
3491
+ ${aggregatedChangelog}`);
3492
+ } else {
3493
+ logger.debug("Aggregated root changelog written");
3494
+ }
3486
3495
  }
3487
3496
  async function generateSimpleRootChangelog({
3488
3497
  config,
@@ -3523,17 +3532,20 @@ async function generateSimpleRootChangelog({
3523
3532
  dryRun,
3524
3533
  newVersion
3525
3534
  });
3526
- if (rootChangelog) {
3527
- writeChangelogToFile({
3528
- cwd: config.cwd,
3529
- changelog: rootChangelog,
3530
- pkg: rootPackage,
3531
- dryRun
3532
- });
3533
- logger.debug("Root changelog written");
3535
+ writeChangelogToFile({
3536
+ cwd: config.cwd,
3537
+ changelog: rootChangelog,
3538
+ pkg: rootPackage,
3539
+ dryRun
3540
+ });
3541
+ if (dryRun) {
3542
+ logger.info(`[dry-run] Root package "${rootPackage.name}" - ${fromTag}...${to} - Changelog:
3543
+
3544
+ ${rootChangelog}`);
3534
3545
  } else {
3535
- logger.debug("No changelog to generate for root package");
3546
+ logger.debug("Root changelog written");
3536
3547
  }
3548
+ return rootChangelog;
3537
3549
  }
3538
3550
  async function changelog(options = {}) {
3539
3551
  const config = await loadRelizyConfig({
@@ -3598,14 +3610,18 @@ async function changelog(options = {}) {
3598
3610
  dryRun,
3599
3611
  newVersion
3600
3612
  });
3601
- if (changelog2) {
3602
- writeChangelogToFile({
3603
- cwd: config.cwd,
3604
- pkg,
3605
- changelog: changelog2,
3606
- dryRun
3607
- });
3608
- generatedCount++;
3613
+ writeChangelogToFile({
3614
+ cwd: config.cwd,
3615
+ pkg,
3616
+ changelog: changelog2,
3617
+ dryRun
3618
+ });
3619
+ generatedCount++;
3620
+ if (dryRun) {
3621
+ logger.info(`[dry-run] ${pkg.name}: changelog generated:
3622
+
3623
+ ${changelog2}`);
3624
+ } else {
3609
3625
  logger.debug(`${pkg.name}: changelog written`);
3610
3626
  }
3611
3627
  }
@@ -3941,17 +3957,16 @@ async function handleTwitterPost({
3941
3957
  const changelogUrl = config.social?.changelogUrl;
3942
3958
  logger.debug(`Changelog URL: ${changelogUrl || "none"}`);
3943
3959
  logger.debug(`Changelog generated (${changelog.length} chars)`);
3944
- const changelogSummary = extractChangelogSummary(changelog, 150);
3945
- logger.debug(`Changelog summary: ${changelogSummary.substring(0, 50)}...`);
3946
3960
  const response = await postReleaseToTwitter({
3947
3961
  template: config.social.twitter.template || config.templates.twitterMessage,
3948
3962
  version: newVersion,
3949
3963
  projectName: rootPackageBase.name,
3950
- changelog: changelogSummary,
3964
+ changelog,
3951
3965
  releaseUrl,
3952
3966
  changelogUrl,
3953
3967
  credentials,
3954
- dryRun
3968
+ dryRun,
3969
+ postMaxLength: config.social.twitter.postMaxLength
3955
3970
  });
3956
3971
  await executeHook("success:twitter", config, dryRun);
3957
3972
  return { success: true, response };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "relizy",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.1",
4
+ "version": "1.0.0-beta.2",
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",
@@ -106,7 +106,6 @@
106
106
  ]
107
107
  },
108
108
  "scripts": {
109
- "preinstall": "npx only-allow pnpm",
110
109
  "build": "unbuild",
111
110
  "dev": "unbuild --stub",
112
111
  "relizy": "node bin/relizy.mjs",