@eventcatalog/core 2.18.3 → 2.18.4
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/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-AFQD2ZW3.js → chunk-OOOLFBRN.js} +1 -1
- package/dist/{chunk-Y65KQS5Z.js → chunk-PCKSHEKP.js} +1 -1
- package/dist/{chunk-Z67TL5JF.js → chunk-RS3HF4IW.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/utils/collections/util.ts +12 -3
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-OOOLFBRN.js";
|
|
4
|
+
import "../chunk-RS3HF4IW.js";
|
|
5
|
+
import "../chunk-PCKSHEKP.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-SHCMAL37.js";
|
|
4
4
|
import {
|
|
5
5
|
log_build_default
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-OOOLFBRN.js";
|
|
7
|
+
import "./chunk-RS3HF4IW.js";
|
|
8
8
|
import {
|
|
9
9
|
catalogToAstro
|
|
10
10
|
} from "./chunk-WF34R5UT.js";
|
|
11
11
|
import {
|
|
12
12
|
VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PCKSHEKP.js";
|
|
14
14
|
import {
|
|
15
15
|
generate
|
|
16
16
|
} from "./chunk-YEQVKHST.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CollectionTypes } from '@types';
|
|
2
2
|
import type { CollectionEntry } from 'astro:content';
|
|
3
|
-
import { coerce, satisfies as satisfiesRange } from 'semver';
|
|
3
|
+
import { coerce, satisfies as satisfiesRange, compare } from 'semver';
|
|
4
4
|
|
|
5
5
|
export const getPreviousVersion = (version: string, versions: string[]) => {
|
|
6
6
|
const index = versions.indexOf(version);
|
|
@@ -22,8 +22,17 @@ export const getVersionForCollectionItem = (
|
|
|
22
22
|
.filter((i) => i.data.id === item.data.id)
|
|
23
23
|
.map((i) => i.data.version)
|
|
24
24
|
.sort();
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
|
|
26
|
+
// unique versions
|
|
27
|
+
const versions = [...new Set(allVersionsForItem)];
|
|
28
|
+
|
|
29
|
+
// Use semver to order the versions
|
|
30
|
+
const orderedVersions = versions.sort((a, b) => {
|
|
31
|
+
return compare(b, a);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const latestVersion = orderedVersions[0];
|
|
35
|
+
|
|
27
36
|
return { versions, latestVersion };
|
|
28
37
|
};
|
|
29
38
|
|