Skip to content

Commit ce1c847

Browse files
update to the latest version of swift-docc-render
1 parent 92c28e6 commit ce1c847

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

.github/workflows/scripts/setup-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
##
1414
##===----------------------------------------------------------------------===##
1515

16-
export NODE_VERSION=v20.19.0
16+
export NODE_VERSION=v22.21.1
1717
export NODE_PATH=/usr/local/nvm/versions/node/v20.19.0/bin
1818
export NVM_DIR=/usr/local/nvm
1919

.github/workflows/scripts/windows/install-nodejs.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
$NODEJS='https://nodejs.org/dist/v20.19.0/node-v20.19.0-x64.msi'
2-
$NODEJS_SHA256='c2654d3557abd59de08474c6dd009b1d358f420b8e4010e4debbf130b1dfb90a'
1+
$NODEJS='https://nodejs.org/dist/v22.21.1/node-v22.21.1-x64.msi'
2+
$NODEJS_SHA256='fd7a63fec3a54a665851e2d3d93e07cfead2ffb4521675ffdbceb1bb5ac009bb'
33
Set-Variable ErrorActionPreference Stop
44
Set-Variable ProgressPreference SilentlyContinue
55
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${NODEJS})

scripts/patches/swift-docc-render/01_add-live-routes.patch

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/routes.js b/src/routes.js
2-
index 0c928ce..f745003 100644
2+
index 11343be..62c13c9 100644
33
--- a/src/routes.js
44
+++ b/src/routes.js
55
@@ -9,7 +9,6 @@
@@ -10,9 +10,9 @@ index 0c928ce..f745003 100644
1010
notFoundRouteName,
1111
serverErrorRouteName,
1212
} from 'docc-render/constants/router';
13-
@@ -18,25 +17,32 @@ import NotFound from 'theme/views/NotFound.vue';
13+
@@ -31,25 +30,34 @@ export const fallbackRoutes = [
1414

15-
export default [
15+
export const pagesRoutes = [
1616
{
1717
- path: '/tutorials/:id',
1818
- name: 'tutorials-overview',
@@ -40,15 +40,14 @@ index 0c928ce..f745003 100644
4040
{
4141
- path: '/documentation*',
4242
- name: documentationTopicName,
43-
- component: () => import(
44-
- /* webpackChunkName: "documentation-topic" */ 'theme/views/DocumentationTopic.vue'
45-
- ),
4643
+ path: '/live/documentation',
4744
+ name: 'live-documentation',
48-
+ component: () => import(/* webpackChunkName: "documentation-topic" */ 'docc-render/views/DocumentationTopic.vue'),
45+
component: () => import(
46+
/* webpackChunkName: "documentation-topic" */ 'theme/views/DocumentationTopic.vue'
47+
),
4948
+ meta: {
5049
+ skipFetchingData: true,
5150
+ },
5251
},
53-
{
54-
path: '*',
52+
];
53+

scripts/update_swift_docc_render.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ function checkNodeVersion() {
2626
"Unable to determine the version of NodeJS that this script is running under."
2727
);
2828
}
29-
if (!semver.satisfies(nodeVersion, "20")) {
29+
if (!semver.satisfies(nodeVersion, "^22.17")) {
3030
throw new Error(
31-
`Cannot build swift-docc-render with NodeJS v${nodeVersion.raw}. Please install and use NodeJS v20.`
31+
`Cannot build swift-docc-render with NodeJS v${nodeVersion.raw}. Please install and use at least NodeJS v22.17.x.`
3232
);
3333
}
3434
}
@@ -38,7 +38,7 @@ async function cloneSwiftDocCRender(buildDirectory: string): Promise<string> {
3838
const swiftDocCRenderDirectory = path.join(buildDirectory, "swift-docc-render");
3939
const git = simpleGit({ baseDir: buildDirectory });
4040
console.log("> git clone https://github.com/swiftlang/swift-docc-render.git");
41-
const revision = "10b097153d89d7bfc2dd400b47181a782a0cfaa0";
41+
const revision = "c781d3783f23fda5a4721f5361c6c523772b7a62";
4242
await git.clone("https://github.com/swiftlang/swift-docc-render.git", swiftDocCRenderDirectory);
4343
await git.cwd(swiftDocCRenderDirectory);
4444
await git.reset(ResetMode.HARD, [revision]);

0 commit comments

Comments
 (0)