2.6 blog post (#12412)
* Generate * Generate * Add TS4.6 changelog * Regenerate * Add changelog to switch to esbuild * Add category * Update changelog_unreleased/blog-post-intro.md Co-authored-by: Jed Fox <git@jedfox.com> * Address review * Regenerate * Highlight TS 4.6 * Update changelog_unreleased/blog-post-intro.md Co-authored-by: Jed Fox <git@jedfox.com> * Regenerate * Update changelog_unreleased/typescript/12390.md Co-authored-by: Jed Fox <git@jedfox.com> * Add thanks message for sponsors * Address review! * Update cspell.json * Fix link of Ubie * Generate * Add `Thanks to our sponsors!` * Update cspell * Address review * Update changelog_unreleased/blog-post-intro.md Co-authored-by: Alexander Kachkaev <alexander@kachkaev.ru> * Regenerate * Add `--print-truncate` option * Address review * Generate Co-authored-by: Jed Fox <git@jedfox.com> Co-authored-by: Alexander Kachkaev <alexander@kachkaev.ru>
This commit is contained in:
19 files changed
+894
-21
No files matched your search
@@ -49,6 +49,7 @@ const categories = [
|
||||
{ dir: "yaml", title: "YAML" },
|
||||
{ dir: "api", title: "API" },
|
||||
{ dir: "cli", title: "CLI" },
|
||||
{ dir: "misc", title: "Miscellaneous" },
|
||||
];
|
||||
|
||||
const categoriesByDir = new Map(
|
||||
@@ -68,12 +69,17 @@ for (const dir of changelogUnreleasedDirs) {
|
||||
|
||||
rimraf.sync(postGlob);
|
||||
|
||||
const introFileData = fs.readFileSync(introFile, "utf8").trim();
|
||||
|
||||
const TRUNCATE_COMMENT = "<!--truncate-->";
|
||||
const shouldPrintTruncate = introFileData.includes(TRUNCATE_COMMENT);
|
||||
|
||||
fs.writeFileSync(
|
||||
postFile,
|
||||
replaceVersions(
|
||||
[
|
||||
fs.readFileSync(introFile, "utf8").trim(),
|
||||
"<!--truncate-->",
|
||||
introFileData,
|
||||
shouldPrintTruncate ? TRUNCATE_COMMENT : "",
|
||||
...printEntriesWithTitle({
|
||||
title: "Highlights",
|
||||
filter: (entry) => entry.section === "highlight",
|
||||
@@ -90,7 +96,9 @@ fs.writeFileSync(
|
||||
title: "Other Changes",
|
||||
filter: (entry) => !entry.section,
|
||||
}),
|
||||
].join("\n\n") + "\n",
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("\n\n") + "\n",
|
||||
previousVersion,
|
||||
version
|
||||
)
|
||||
|
||||
@@ -17,4 +17,5 @@ export const CHANGELOG_CATEGORIES = [
|
||||
"typescript",
|
||||
"vue",
|
||||
"yaml",
|
||||
"misc",
|
||||
];
|
||||
Reference in new issue
Block a user