versionary 0.23.0 → 0.23.1

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.
@@ -30,6 +30,10 @@ export declare function renderPackageChangelogSection(input: {
30
30
  commits: ParsedCommit[];
31
31
  tagPrefix: string;
32
32
  cwd?: string;
33
+ dependencies?: Array<{
34
+ name: string;
35
+ version: string;
36
+ }>;
33
37
  }): string;
34
38
  export declare function prependChangelog(cwd: string, changelogFile: string, section: string, format?: VersionaryChangelogFormat): void;
35
39
  export declare function renderRNewsReleaseNotes(input: {
@@ -257,6 +257,9 @@ function renderPackageChangelogSection(input) {
257
257
  if (grouped.reverts.length > 0) {
258
258
  sections.push("### Reverts", ...grouped.reverts, "");
259
259
  }
260
+ if (input.dependencies && input.dependencies.length > 0) {
261
+ sections.push("### Dependencies", ...input.dependencies.map((dependency) => `- updated ${dependency.name} to v${dependency.version}`), "");
262
+ }
260
263
  return [header, "", ...sections].join("\n");
261
264
  }
262
265
  function prependChangelog(cwd, changelogFile, section, format = "markdown-changelog") {
@@ -315,12 +315,21 @@ function prepareReleasePr(cwd = process.cwd(), options = {}) {
315
315
  if (!packageMetadata) {
316
316
  continue;
317
317
  }
318
+ const dependencySourcePaths = packagePlan.dependencySourcePaths ?? [];
319
+ const packageDependencies = dependencySourcePaths
320
+ .map((sourcePath) => plan.packages?.find((pkg) => pkg.path === sourcePath && pkg.nextVersion))
321
+ .filter((sourcePackage) => Boolean(sourcePackage))
322
+ .map((pkg) => ({
323
+ name: pkg.path,
324
+ version: pkg.nextVersion,
325
+ }));
318
326
  const packageSection = (0, changelog_js_1.renderPackageChangelogSection)({
319
327
  currentVersion: packagePlan.currentVersion,
320
328
  nextVersion: packagePlan.nextVersion,
321
329
  commits: packagePlan.commits,
322
330
  tagPrefix: packageMetadata.tagPrefix,
323
331
  cwd,
332
+ dependencies: packageDependencies,
324
333
  });
325
334
  (0, changelog_js_1.prependChangelog)(cwd, node_path_1.default.posix.join(packagePlan.path, packageChangelogFile), packageSection, "markdown-changelog");
326
335
  updatedChangelogFiles.push(node_path_1.default.posix.join(packagePlan.path, packageChangelogFile));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "versionary",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "Automatic release framework based on conventional commits and semantic versioning",
5
5
  "keywords": [
6
6
  "releasing",