MCPcopy
hub / github.com/date-fns/date-fns / renderChangelog

Function renderChangelog

pkgs/core/scripts/release/buildChangelog.ts:15–44  ·  view source on GitHub ↗
(changelog: ChangelogVersion)

Source from the content-addressed store, hash-verified

13})();
14
15function renderChangelog(changelog: ChangelogVersion) {
16 let markdown = `## ${renderVersion(changelog.version)} - ${format(
17 Date.now(),
18 "yyyy-MM-dd",
19 )}
20
21${sample(thanksOptions)!(renderAuthors(changelog.authors))}`;
22
23 if (changelog.fixed.length)
24 markdown += `
25
26### Fixed
27
28${changelog.fixed.map(renderItem).join("\n\n")}`;
29
30 if (changelog.changed.length)
31 markdown += `
32
33### Changed
34
35${changelog.changed.map(renderItem).join("\n\n")}`;
36
37 if (changelog.added.length)
38 markdown += `
39
40### Added
41
42${changelog.added.map(renderItem).join("\n\n")}`;
43 return markdown;
44}
45
46async function buildChangelog(): Promise<ChangelogVersion> {
47 const lastTag = last((await git.tags()).all);

Callers 1

buildChangelog.tsFile · 0.85

Calls 3

formatFunction · 0.90
renderVersionFunction · 0.85
renderAuthorsFunction · 0.85

Tested by

no test coverage detected