Skip to content

Commit 3a44def

Browse files
authored
chore: changelog (#5851)
* fix: modrinth hosting changelog in app changelog for github releases * chore: changelog
1 parent 176d430 commit 3a44def

2 files changed

Lines changed: 103 additions & 6 deletions

File tree

.github/workflows/theseus-release.yml

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,70 @@ jobs:
6060
const fs = require('fs');
6161
const version = process.env.VERSION.replace(/^v/, '');
6262
const src = fs.readFileSync('packages/blog/changelog.ts', 'utf8');
63-
const escaped = version.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
64-
const re = new RegExp("product:\\s*'app',\\s*version:\\s*'" + escaped + "',\\s*body:\\s*`([\\s\\S]*?)`,\\s*\\}");
65-
const m = src.match(re);
66-
if (!m) {
63+
64+
// Parse every entry in the VERSIONS array, preserving their order
65+
// (which is reverse chronological).
66+
const entryRe = /\{\s*date:\s*`([^`]+)`,\s*product:\s*'(\w+)',(?:\s*version:\s*[`']([^`']+)[`'],)?\s*body:\s*`([\s\S]*?)`,\s*\}/g;
67+
const entries = [];
68+
let match;
69+
while ((match = entryRe.exec(src)) !== null) {
70+
entries.push({
71+
date: match[1],
72+
product: match[2],
73+
version: match[3],
74+
body: match[4],
75+
});
76+
}
77+
78+
const currentIdx = entries.findIndex(
79+
(e) => e.product === 'app' && e.version === version,
80+
);
81+
if (currentIdx === -1) {
6782
console.error(`No app changelog entry found for version ${version}`);
6883
process.exit(1);
6984
}
70-
fs.writeFileSync('release-notes.md', m[1]);
85+
86+
// Find the surrounding app entries so we can scope hosting changes to
87+
// exactly what shipped between the previous app release and this one.
88+
// Entries are in reverse chronological order, so newer entries have
89+
// smaller indices than older entries.
90+
let newerAppIdx = -1;
91+
for (let i = currentIdx - 1; i >= 0; i--) {
92+
if (entries[i].product === 'app') {
93+
newerAppIdx = i;
94+
break;
95+
}
96+
}
97+
let previousAppIdx = entries.length;
98+
for (let i = currentIdx + 1; i < entries.length; i++) {
99+
if (entries[i].product === 'app') {
100+
previousAppIdx = i;
101+
break;
102+
}
103+
}
104+
105+
const hostingEntries = [];
106+
for (let i = newerAppIdx + 1; i < previousAppIdx; i++) {
107+
if (entries[i].product === 'hosting') {
108+
hostingEntries.push(entries[i]);
109+
}
110+
}
111+
112+
let output = entries[currentIdx].body;
113+
if (hostingEntries.length > 0) {
114+
// Demote any top-level section headings inside hosting bodies so
115+
// they nest cleanly under the "Modrinth Hosting (included)" header.
116+
const demoteHeadings = (body) =>
117+
body.replace(/^(#{1,5})\s/gm, (_, hashes) => `${hashes}# `);
118+
const hostingBody = hostingEntries
119+
.map((e) => demoteHeadings(e.body))
120+
.join('\n\n');
121+
output += `\n\n---\n\n## Modrinth Hosting (included)\n\n${hostingBody}`;
122+
}
123+
124+
fs.writeFileSync('release-notes.md', output);
71125
console.log(`Extracted changelog for app ${version}:`);
72-
console.log(m[1]);
126+
console.log(output);
73127
EOF
74128
75129
- name: 🛠️ Generate version manifest

packages/blog/changelog.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,49 @@ export type VersionEntry = {
1010
}
1111

1212
const VERSIONS: VersionEntry[] = [
13+
{
14+
date: `2026-04-18T19:00:59+00:00`,
15+
product: 'app',
16+
version: '0.13.2',
17+
body: `## Added
18+
- Instances on the Library page are now grouped into collapsible accordions if they have an associated group. Thanks to [@kirushkinx](https://github.com/kirushkinx)!
19+
20+
## Changed
21+
- Redesigned the "Find and Replace" tool in the instance Files tab editor to match the rest of the platform. Thanks to [@Creeperkatze](https://github.com/Creeperkatze)!
22+
23+
## Fixed
24+
- Worlds and servers in the instance Worlds tab now load almost instantly instead of taking one to two seconds.
25+
- Fixed the Modrinth+ upgrade button and ad banner not staying pinned to the bottom right.
26+
- Fixed servers in the "Jump back in" section of the home page loading slowly. Thanks to [@Creeperkatze](https://github.com/Creeperkatze)!
27+
- Fixed several issues with the splash screen.
28+
- Fixed the cancel button when changing the install directory.
29+
- Fixed symlinks breaking directory moves.`,
30+
},
31+
{
32+
date: `2026-04-18T19:00:59+00:00`,
33+
product: 'hosting',
34+
body: `## Added
35+
- Alpha and beta indicators next to Paper build numbers in the server onboarding and reset modals and on the platform settings page.
36+
37+
## Changed
38+
- Moved the "Kill server" action into a joined dropdown button with the "Stop" action.
39+
- Swapped the positions of the "Restart" and "Stop" actions in the server panel.
40+
- Redesigned the "Find and Replace" tool in the Files tab editor to match the rest of the platform. Thanks to [@Creeperkatze](https://github.com/Creeperkatze)!
41+
42+
## Fixed
43+
- Fixed slow tab switching in the server panel.
44+
- Fixed slow loading of the "Manage servers" page in the Modrinth App and slow interactions with it on the website.`,
45+
},
46+
{
47+
date: `2026-04-18T19:00:59+00:00`,
48+
product: 'web',
49+
body: `## Added
50+
- Tabs in the version edit modal for switching between version pages.
51+
52+
## Fixed
53+
- Fixed incorrect margins on project cards.
54+
- Fixed slow loading of the 404 page. Thanks to [@IsQuyet](https://github.com/IsQuyet)!`,
55+
},
1356
{
1457
date: `2026-04-15T19:39:48+00:00`,
1558
product: 'hosting',

0 commit comments

Comments
 (0)