fix(docs): correct versioned nav links and local dev version routing (#74)

This commit is contained in:
2026-05-18 01:07:17 -07:00
committed by GitHub
parent 6b2cb002ac
commit 799cce6991
19 changed files with 1000 additions and 57 deletions
+14
View File
@@ -2,6 +2,7 @@ import { describe, expect, test } from 'bun:test';
import {
buildVersionManifest,
compareStableVersionsDesc,
versionArchiveCacheKey,
isStableReleaseTag,
stableTagsWithDocs,
versionArchiveCacheName,
@@ -50,6 +51,19 @@ describe('docs versioning helpers', () => {
expect(versionArchiveCacheName('v0.14.0', 'abcdef1234567890')).toBe('abcdef123456-v0.14.0');
});
test('archive cache keys change when manifest contents change', () => {
const firstKey = versionArchiveCacheKey({
sharedInternalsHash: 'abcdef1234567890',
manifestJson: '{"latestStable":"v0.14.0"}',
});
const secondKey = versionArchiveCacheKey({
sharedInternalsHash: 'abcdef1234567890',
manifestJson: '{"latestStable":"v0.15.0"}',
});
expect(firstKey).not.toBe(secondKey);
});
test('archive output paths stay relative for filesystem joins', () => {
expect(versionOutputPath('v0.14.0')).toBe('v/0.14.0');
});