Skip to content

Commit f65e1ac

Browse files
committed
chore: sort changelog
1 parent 998d3ef commit f65e1ac

File tree

3 files changed

+207
-44
lines changed

3 files changed

+207
-44
lines changed

gen-rss.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,33 @@ async function generate() {
1313
});
1414

1515
const posts = await fs.readdir(path.join(__dirname, "pages", "changelog"));
16-
await Promise.all(
16+
const items = await Promise.all(
1717
posts.map(async (name) => {
18-
if (name.endsWith(".json")) return;
18+
if (name.endsWith(".json")) return null;
1919
const content = await fs.readFile(
2020
path.join(__dirname, "pages", "changelog", name)
2121
);
2222

2323
const frontmatter = matter(content);
2424
const html = marked.parse(frontmatter.content);
2525

26-
feed.addItem({
26+
return {
2727
title: frontmatter.data.title,
2828
link: "/changelog/" + name.replace(/\.mdx?/, ""),
2929
date: new Date(frontmatter.data.date),
3030
content: html,
31-
});
31+
};
3232
})
3333
);
3434

35+
// Filter out null items and sort by date in descending order
36+
const sortedItems = items
37+
.filter(item => item !== null)
38+
.sort((a, b) => b.date - a.date);
39+
40+
// Add sorted items to feed
41+
sortedItems.forEach(item => feed.addItem(item));
42+
3543
await fs.writeFile("./public/changelog.xml", feed.rss2());
3644
console.log("generated changelog.xml");
3745
}

public/changelog.xml

Lines changed: 148 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,156 @@
44
<title>Loro Changelog</title>
55
<link>https://loro.dev</link>
66
<description>changelog of loro crdt</description>
7-
<lastBuildDate>Wed, 08 Jan 2025 15:37:10 GMT</lastBuildDate>
7+
<lastBuildDate>Thu, 03 Apr 2025 03:43:47 GMT</lastBuildDate>
88
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
99
<generator>https://github.com/jpmonette/feed</generator>
10+
<item>
11+
<title><![CDATA[release v1.4.7]]></title>
12+
<link>/changelog/v1.4.7</link>
13+
<guid>/changelog/v1.4.7</guid>
14+
<pubDate>Mon, 31 Mar 2025 16:00:00 GMT</pubDate>
15+
<content:encoded><![CDATA[<h2>New</h2>
16+
<ul>
17+
<li>You can get the version of Loro by <code>LORO_VERSION</code></li>
18+
<li><code>setNextCommitOrigin(origin: string)</code>: Set the origin of the next commit.</li>
19+
<li><code>setNextCommitTimestamp(timestamp: number)</code>: Set the timestamp of the next commit.</li>
20+
<li><code>setNextCommitOptions(options: CommitOption)</code>: Set the options of the next commit.</li>
21+
<li><code>clearNextCommitOptions()</code>: Clear the options of the next commit.</li>
22+
<li><code>configDefaultTextStyle(style: TextStyle)</code>: Configures the default text style for the document.</li>
23+
<li><code>getUncommittedOpsAsJson()</code>: Get the pending operations from the current transaction in JSON format</li>
24+
</ul>
25+
<h2>Fix</h2>
26+
<ul>
27+
<li>fix: memory leak issue <a href="https://github.com/loro-dev/loro/pull/647">#647</a></li>
28+
<li>fix: mark err on detached LoroText <a href="https://github.com/loro-dev/loro/pull/659">#659</a></li>
29+
<li>fix: detached loro text issues <a href="https://github.com/loro-dev/loro/pull/665">#665</a></li>
30+
<li>fix: entity index when the tree is empty <a href="https://github.com/loro-dev/loro/pull/670">#670</a></li>
31+
</ul>
32+
]]></content:encoded>
33+
</item>
34+
<item>
35+
<title><![CDATA[release v1.4.0]]></title>
36+
<link>/changelog/v1.4.0</link>
37+
<guid>/changelog/v1.4.0</guid>
38+
<pubDate>Wed, 12 Feb 2025 16:00:00 GMT</pubDate>
39+
<content:encoded><![CDATA[<h2>New</h2>
40+
<ul>
41+
<li>add <code>unsubscribe()</code> for Subscription.</li>
42+
</ul>
43+
<h2>Fix</h2>
44+
<ul>
45+
<li>fix: getting values by path in LoroTree <a href="https://github.com/loro-dev/loro/pull/643">#643</a></li>
46+
<li>fix: should be able to call subscription after diffing [#637]</li>
47+
<li>fix: update long text may fail <a href="https://github.com/loro-dev/loro/pull/633">#633</a></li>
48+
<li>fix: map.keys() may return keys from deleted entries <a href="https://github.com/loro-dev/loro/pull/618">#618</a></li>
49+
</ul>
50+
]]></content:encoded>
51+
</item>
52+
<item>
53+
<title><![CDATA[release v1.3.0]]></title>
54+
<link>/changelog/v1.3.0</link>
55+
<guid>/changelog/v1.3.0</guid>
56+
<pubDate>Wed, 08 Jan 2025 16:00:00 GMT</pubDate>
57+
<content:encoded><![CDATA[<h2>New</h2>
58+
<ul>
59+
<li>UndoManager&#39;s <code>onPush</code> now can access the change event.</li>
60+
<li>add getShallowValue for each container.</li>
61+
</ul>
62+
<h3>LoroDoc</h3>
63+
<ul>
64+
<li><code>toJsonWithReplacer(replacer: (k, v)=&gt;Value)</code>: Convert the document to a JSON value with a custom replacer function.</li>
65+
<li><code>revertTo(frontiers: Frontiers)</code>: Revert the document to the given frontiers.</li>
66+
<li><code>findIdSpansBetween(from: Frontiers, to: Frontiers)</code>: Find the op id spans that between the <code>from</code> version and the <code>to</code> version.</li>
67+
<li><code>exportJsonInIdSpan(idSpan: IdSpan)</code>: Export the readable [<code>Change</code>]s in the given [<code>IdSpan</code>].</li>
68+
</ul>
69+
<h2>Fix</h2>
70+
<ul>
71+
<li>fix: prevent merging remote changes based on local <code>changeMergeInterval</code> config <a href="https://github.com/loro-dev/loro/pull/643">#643</a></li>
72+
<li>fix: should commit before travel_change_ancestors <a href="https://github.com/loro-dev/loro/pull/599">#599</a></li>
73+
<li>fix: panic when detach then attach <a href="https://github.com/loro-dev/loro/pull/592">#592</a></li>
74+
<li>fix: move child in current parent <a href="https://github.com/loro-dev/loro/pull/589">#589</a></li>
75+
<li>fix: panic when returned non-boolean value from text.iter(f) <a href="https://github.com/loro-dev/loro/pull/578">#578</a></li>
76+
</ul>
77+
]]></content:encoded>
78+
</item>
79+
<item>
80+
<title><![CDATA[release v1.2.0]]></title>
81+
<link>/changelog/v1.2.0</link>
82+
<guid>/changelog/v1.2.0</guid>
83+
<pubDate>Mon, 09 Dec 2024 16:00:00 GMT</pubDate>
84+
<content:encoded><![CDATA[<h2>New</h2>
85+
<ul>
86+
<li>Add <code>isDeleted()</code> method to all container types (Text, Map, List, Tree, etc.)</li>
87+
</ul>
88+
<h3>LoroDoc</h3>
89+
<ul>
90+
<li><code>changeCount()</code>: Get the number of changes in the oplog.</li>
91+
<li><code>opCount()</code>: Get the number of ops in the oplog.</li>
92+
</ul>
93+
<h3>VersionVector</h3>
94+
<ul>
95+
<li><code>setEnd(id: ID)</code>: Set the exclusive ending point. target id will NOT be included by self.</li>
96+
<li><code>setLast(id: ID)</code>: Set the inclusive ending point. target id will be included.</li>
97+
<li><code>remove(peer: PeerID)</code>: Remove the specific peer id.</li>
98+
<li><code>length()</code>: Get the number of peers in the VersionVector.</li>
99+
</ul>
100+
<h2>Change</h2>
101+
<ul>
102+
<li>Return <code>ImportStatus</code> in the <code>importUpdateBatch</code> method.</li>
103+
<li>Fractional index is enabled by default now.</li>
104+
</ul>
105+
<h2>Fix</h2>
106+
<ul>
107+
<li>fix: getOrCreateContainer should not throw if value is null <a href="https://github.com/loro-dev/loro/pull/576">#576</a></li>
108+
<li>fix: dead loop when importing updates <a href="https://github.com/loro-dev/loro/pull/570">#570</a></li>
109+
</ul>
110+
]]></content:encoded>
111+
</item>
112+
<item>
113+
<title><![CDATA[release v1.1.0]]></title>
114+
<link>/changelog/v1.1.0</link>
115+
<guid>/changelog/v1.1.0</guid>
116+
<pubDate>Fri, 08 Nov 2024 16:00:00 GMT</pubDate>
117+
<content:encoded><![CDATA[<h2>New</h2>
118+
<h3>LoroDoc</h3>
119+
<ul>
120+
<li><code>forkAt(frontiers: Frontiers)</code>: Fork the document at the given frontiers.</li>
121+
<li><code>getChangedContainersIn(id: ID, len: number)</code>: Gets container IDs modified in the given ID range.</li>
122+
<li>``</li>
123+
</ul>
124+
<h3>LoroText</h3>
125+
<ul>
126+
<li><code>getEditorOf(pos: number)</code>: Get the editor of the text at the given position.</li>
127+
<li><code>push(s: string)</code>: Push a string to the end of the text.</li>
128+
</ul>
129+
<h3>LoroMap</h3>
130+
<ul>
131+
<li><code>getLastEditor(key: string)</code>: Get the peer id of the last editor on the given entry</li>
132+
</ul>
133+
<h3>LoroList</h3>
134+
<ul>
135+
<li><code>getIdAt(pos: number)</code>: Get the ID of the list item at the given position.</li>
136+
<li><code>pushContainer(child: Container)</code>: Push a container to the end of the list.</li>
137+
</ul>
138+
<h3>LoroMovableList</h3>
139+
<ul>
140+
<li><code>getCreatorAt(pos: number)</code>: Get the creator of the list item at the given position.</li>
141+
<li><code>getLastMoverAt(pos: number)</code>: Get the last mover of the list item at the given position.</li>
142+
<li><code>getLastEditorAt(pos: number)</code>: Get the last editor of the list item at the given position.</li>
143+
<li><code>pushContainer(child: Container)</code>: Push a container to the end of the list.</li>
144+
</ul>
145+
<h3>LoroTree</h3>
146+
<ul>
147+
<li><code>toJSON()</code>: Get JSON format of the LoroTreeNode.</li>
148+
</ul>
149+
<h2>Fix</h2>
150+
<ul>
151+
<li>fix get correct encode blob info <a href="https://github.com/loro-dev/loro/pull/545">#545</a></li>
152+
<li>fix: avoid creating non-root containers that doesn&#39;t exist by get_container api <a href="https://github.com/loro-dev/loro/pull/541">#541</a></li>
153+
<li>fix: define the fork behavior when the doc is detached <a href="https://github.com/loro-dev/loro/pull/537">#537</a></li>
154+
</ul>
155+
]]></content:encoded>
156+
</item>
10157
<item>
11158
<title><![CDATA[release v1.0.0]]></title>
12159
<link>/changelog/v1.0.0-beta</link>

0 commit comments

Comments
 (0)