Skip to content

Commit 7616f43

Browse files
authored
fix(docs): correctly handle next tag in changelog (#4485)
1 parent f6c342a commit 7616f43

File tree

3 files changed

+11
-67
lines changed

3 files changed

+11
-67
lines changed

packages/docs/modules/page-config/blocks/change-log/index.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ const versions = computed(() => Object.keys(props.changeLog));
2727
color="secondary"
2828
/>
2929
<h1 class="va-h6 va-link">
30-
<a :href="`https://github.com/epicmaxco/vuestic-ui/releases/tag/v${version}`">
30+
<template v-if="version.includes('next')">
31+
next
32+
</template>
33+
<template v-else>
34+
<a :href="`https://github.com/epicmaxco/vuestic-ui/releases/tag/v${version}`">
3135
v{{ version }}
32-
</a>
36+
</a>
37+
</template>
3338
<Anchor :text="version" />
3439
</h1>
3540
</div>

packages/docs/modules/page-config/blocks/change-log/transform.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ const sortObjectKeys = <T extends Record<string, any>>(obj: T) => {
99
return Object
1010
.keys(obj)
1111
.sort((a, b) => {
12+
if (a.includes('next')) return 1
13+
if (b.includes('next')) return -1
14+
1215
return a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' })
1316
})
1417
.reverse()
@@ -35,7 +38,7 @@ export const render = async () => {
3538
const serviceName = path.match(/services\/(.*)\/CHANGELOG.md/)?.[1]
3639
const composableName = path.match(/composables\/(.*)\/CHANGELOG.md/)?.[1]
3740

38-
const spilledByVersion = changelog.split(/# ([0-9]*\.[0-9]*\.[0-9]*)/).filter(Boolean)
41+
const spilledByVersion = changelog.split(/# ([0-9]*\.[0-9]*\.[0-9]*)|\# (next)/).filter(Boolean)
3942

4043
for (let i = 0; i < spilledByVersion.length; i += 2) {
4144
const version = spilledByVersion[i]

packages/docs/page-config/introduction/change-log/components/Changelog.vue

-64
This file was deleted.

0 commit comments

Comments
 (0)