Skip to content

Commit b8ed78f

Browse files
committed
fix(docs): validate immutable version canonical
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
1 parent 35f928b commit b8ed78f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎docs/site/scripts/smoke-docs-deployment.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ export async function smokeDocsDeployment({
8888
if (canonicalFromHtml(devHtml) !== `${productionOrigin}/dev/`) {
8989
throw new Error('/dev/ is not canonical at the protected-main mount');
9090
}
91-
if (canonicalFromHtml(versionHtml) !== `${productionOrigin}/`) {
92-
throw new Error(`${versionPath} is not an unchanged root-canonical release copy`);
91+
if (canonicalFromHtml(versionHtml) !== `${productionOrigin}${versionPath}`) {
92+
throw new Error(`${versionPath} is not canonical at the immutable version route`);
9393
}
9494
if (!rootHtml.includes(versionPath)) {
9595
throw new Error(`/ does not expose version navigation to ${versionPath}`);

‎docs/site/scripts/smoke-docs-deployment.test.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function fixture(overrides = {}) {
2727
],
2828
['/start/quickstart/', html(`${origin}/start/quickstart/`)],
2929
['/dev/', html(`${origin}/dev/`)],
30-
['/v/1.2.3/', html(`${origin}/`)],
30+
['/v/1.2.3/', html(`${origin}/v/1.2.3/`)],
3131
['/pagefind/pagefind.js', Buffer.from('search')],
3232
['/pagefind/pagefind-entry.json', Buffer.from('{}')],
3333
['/sitemap-index.xml', Buffer.from('<sitemapindex/>')],

0 commit comments

Comments
 (0)