@afoures/auto-release 0.2.1 → 0.2.3

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.
@@ -72,19 +72,17 @@ const generate_release_pr = create_command({
72
72
  logger.note(`Release ${app.name} ${next_version}`, message_lines.join("\n"));
73
73
  if (dry_run) continue;
74
74
  for (const change of changes.list) {
75
- const relative_path = relative(root, change.filename);
76
- await delete_file(relative_path);
75
+ const change_file_path = join(config.changes_dir, app.name, change.filename);
76
+ await delete_file(change_file_path);
77
77
  }
78
78
  for (const component of app.components) for (const part of component.parts) {
79
- const relative_path = relative(root, part.file);
80
- const initial_content = await read_file(relative_path);
79
+ const initial_content = await read_file(part.file);
81
80
  if (initial_content === null) continue;
82
81
  const updated_content = part.update_version(initial_content, next_version);
83
- await write_file(relative_path, updated_content);
82
+ await write_file(part.file, updated_content);
84
83
  }
85
84
  const formatter = app.versioning.formatter;
86
- const changelog_relative_path = relative(root, app.changelog);
87
- const changelog_as_mdast = fromMarkdown(await read_file(changelog_relative_path) ?? "", {
85
+ const changelog_as_mdast = fromMarkdown(await read_file(app.changelog) ?? "", {
88
86
  extensions: [gfm()],
89
87
  mdastExtensions: [gfmFromMarkdown()]
90
88
  });
@@ -96,7 +94,7 @@ const generate_release_pr = create_command({
96
94
  changes: changes.list
97
95
  }, ...changelog.releases.filter((release) => release.version !== next_version)].sort((a, b) => app.versioning.compare(b.version, a.version))
98
96
  }, { app: { name: app.name } });
99
- await write_file(changelog_relative_path, updated_changelog_content);
97
+ await write_file(app.changelog, updated_changelog_content);
100
98
  const file_operations = await diff(root);
101
99
  await reset(root);
102
100
  const platform = config.git.platform;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afoures/auto-release",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "A file based release management tool for monorepos",
5
5
  "homepage": "https://github.com/afoures/auto-release#readme",
6
6
  "bugs": {