From a1565c1a25d8abb9efb1c7abf513ed1cb5e750d1 Mon Sep 17 00:00:00 2001
From: Samuel Colvin Version Notice
${env.CF_PAGES_BRANCH === 'main' ? '' : `(${env.CF_PAGES_BRANCH} preview)`}
- This documentation is ahead of the last release by ${ahead_by} commit${ahead_by === 1 ? '' : 's'}.
+ This documentation is ahead of the last release by ${ahead_by}
+ commit${ahead_by === 1 ? '' : 's'}.
You may see documentation for features not yet supported in the latest release ${name}.
Date: Tue, 24 Dec 2024 20:52:35 +0000
Subject: [PATCH 1/5] link to diff in version warning
---
docs/_worker.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/_worker.js b/docs/_worker.js
index 333f6268c7..937e21f9e6 100644
--- a/docs/_worker.js
+++ b/docs/_worker.js
@@ -46,7 +46,8 @@ async function versionWarning(request, env) {
const text = await r2.text()
throw new Error(`Failed to fetch compare, response status ${r2.status}:\n${text}`)
}
- const {ahead_by} = await r2.json()
+ const r2_data = await r2.json()
+ const {ahead_by} = r2_data
if (ahead_by === 0) {
return `
Date: Tue, 24 Dec 2024 20:53:18 +0000
Subject: [PATCH 2/5] fix link
---
docs/_worker.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/_worker.js b/docs/_worker.js
index 937e21f9e6..739758eb92 100644
--- a/docs/_worker.js
+++ b/docs/_worker.js
@@ -60,8 +60,10 @@ async function versionWarning(request, env) {
Version Notice
${env.CF_PAGES_BRANCH === 'main' ? '' : `(${env.CF_PAGES_BRANCH} preview)`} - This documentation is ahead of the last release by ${ahead_by} - commit${ahead_by === 1 ? '' : 's'}. + This documentation is ahead of the last release by + + ${ahead_by} commit${ahead_by === 1 ? '' : 's'} + . You may see documentation for features not yet supported in the latest release ${name}.
` From 7f213e39afc24a5c71b634bb3a77c700d27fb914 Mon Sep 17 00:00:00 2001 From: Samuel Colvin
${env.CF_PAGES_BRANCH === 'main' ? '' : `(${env.CF_PAGES_BRANCH} preview)`}
This documentation is ahead of the last release by
-
+
${ahead_by} commit${ahead_by === 1 ? '' : 's'}
.
You may see documentation for features not yet supported in the latest release ${name}.
From b97f0ddd639879de699fe290402ecceee872967c Mon Sep 17 00:00:00 2001
From: Samuel Colvin
Date: Tue, 24 Dec 2024 20:57:39 +0000
Subject: [PATCH 4/5] fix whitespace
---
docs/_worker.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/_worker.js b/docs/_worker.js
index 594fd4a2fd..e848cd28dd 100644
--- a/docs/_worker.js
+++ b/docs/_worker.js
@@ -61,9 +61,7 @@ async function versionWarning(request, env) {
${env.CF_PAGES_BRANCH === 'main' ? '' : `(${env.CF_PAGES_BRANCH} preview)`} This documentation is ahead of the last release by - - ${ahead_by} commit${ahead_by === 1 ? '' : 's'} - . + ${ahead_by} commit${ahead_by === 1 ? '' : 's'}. You may see documentation for features not yet supported in the latest release ${name}.
` From 6dd3ed7bb5e4df2efb0ed8d4c806bdeaa26d7f37 Mon Sep 17 00:00:00 2001 From: Samuel ColvinVersion Notice
- ${env.CF_PAGES_BRANCH === 'main' ? '' : `(${env.CF_PAGES_BRANCH} preview)`} + ${branch === 'main' ? '' : `(${branch} preview)`} This documentation is ahead of the last release by - ${ahead_by} commit${ahead_by === 1 ? '' : 's'}. + ${ahead_by} commit${ahead_by === 1 ? '' : 's'}. You may see documentation for features not yet supported in the latest release ${name}.