Skip to content

Commit

Permalink
Merge branch 'next' into infra/release/publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Jul 11, 2024
2 parents 2acfa73 + 43dc7d8 commit 8f19560
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ versions.json
/docs/.vitepress/cache
/docs/.vitepress/dist
/docs/public/api-diff-index.json
/lib

# Faker
TAGS
Expand Down
2 changes: 2 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ function getSideBarWithExpandedEntry(entryToExpand: string): SidebarItem[] {
],
},
];

for (const entry of links) {
entry.collapsed = entry.text !== entryToExpand;
}

return links;
}

Expand Down
36 changes: 20 additions & 16 deletions docs/.vitepress/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@ function readBranchName(): string {
}

function readOtherLatestReleaseTagNames(): string[] {
const latestReleaseTagNames = execSync('git tag -l')
.toString('utf8')
.split('\n')
.filter((tag) => semver.valid(tag))
// Only consider tags for our deployed website versions
.filter((tag) => semver.major(tag) >= 6)
// Find the latest tag for each major version
.reduce<Record<number, string>>((latestTagByMajor, tag) => {
const majorVersion = semver.major(tag);
const tags = execSync('git tag -l').toString('utf8').split('\n');
const latestTagByMajor: Record<string, string> = {};
for (const tag of tags) {
if (!semver.valid(tag)) {
continue;
}

const latestTag = latestTagByMajor[majorVersion];
if (latestTag == null || semver.lt(latestTag, tag)) {
latestTagByMajor[majorVersion] = tag;
}
const majorVersion = semver.major(tag);
if (majorVersion < 6) {
continue;
}

return latestTagByMajor;
}, {});
return Object.values(latestReleaseTagNames).sort(semver.rcompare);
const latestTag = latestTagByMajor[majorVersion];
if (latestTag == null || semver.lt(latestTag, tag)) {
latestTagByMajor[majorVersion] = tag;
}
}

return Object.values(latestTagByMajor).sort(semver.rcompare);
}

// Set by netlify
Expand All @@ -42,12 +43,15 @@ export const versionBannerInfix: string | null = (() => {
if (deployContext === 'production') {
return null;
}

if (isReleaseBranch) {
return '"an old version"';
}

if (branchName === 'next') {
return '"the next (unreleased) version"';
}

return '"a development version"';
})();

Expand Down
2 changes: 1 addition & 1 deletion src/locales/de/location/street_name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ export default [
'Unterölbach',
'Unterstr.',
'Uppersberg',
"Van\\'t-Hoff-Str.",
"Van't-Hoff-Str.",
'Veit-Stoß-Str.',
'Vereinsstr.',
'Viktor-Meyer-Str.',
Expand Down

0 comments on commit 8f19560

Please sign in to comment.