@eventcatalog/core 2.7.0 → 2.7.1
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.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -4,11 +4,11 @@ import { getCollection, type CollectionEntry } from 'astro:content';
|
|
|
4
4
|
export type ChangeLog = CollectionEntry<'changelogs'>;
|
|
5
5
|
|
|
6
6
|
export const getChangeLogs = async (item: CollectionEntry<CollectionTypes>): Promise<ChangeLog[]> => {
|
|
7
|
-
const { collection, data } = item;
|
|
7
|
+
const { collection, data, slug } = item;
|
|
8
8
|
|
|
9
9
|
// Get all logs for collection type and filter by given collection
|
|
10
10
|
const logs = await getCollection('changelogs', (log) => {
|
|
11
|
-
return log.id.includes(`${collection}/`) && log.
|
|
11
|
+
return log.id.includes(`${collection}/`) && log.slug.includes(slug);
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
const hydratedLogs = logs.map((log) => {
|