diff --git a/.github/workflows/scripts/setup-linux.sh b/.github/workflows/scripts/setup-linux.sh index 01cc9530d..2d4a32e9e 100755 --- a/.github/workflows/scripts/setup-linux.sh +++ b/.github/workflows/scripts/setup-linux.sh @@ -13,8 +13,8 @@ ## ##===----------------------------------------------------------------------===## -export NODE_VERSION=v20.19.0 -export NODE_PATH=/usr/local/nvm/versions/node/v20.19.0/bin +export NODE_VERSION=v22.21.1 +export NODE_PATH=/usr/local/nvm/versions/node/${NODE_VERSION}/bin export NVM_DIR=/usr/local/nvm apt-get update && apt-get install -y rsync curl gpg libasound2 libgbm1 libgtk-3-0 libnss3 xvfb build-essential diff --git a/.github/workflows/scripts/windows/install-nodejs.ps1 b/.github/workflows/scripts/windows/install-nodejs.ps1 index 749dc065b..fd6b71119 100644 --- a/.github/workflows/scripts/windows/install-nodejs.ps1 +++ b/.github/workflows/scripts/windows/install-nodejs.ps1 @@ -1,5 +1,5 @@ -$NODEJS='https://nodejs.org/dist/v20.19.0/node-v20.19.0-x64.msi' -$NODEJS_SHA256='c2654d3557abd59de08474c6dd009b1d358f420b8e4010e4debbf130b1dfb90a' +$NODEJS='https://nodejs.org/dist/v22.21.1/node-v22.21.1-x64.msi' +$NODEJS_SHA256='fd7a63fec3a54a665851e2d3d93e07cfead2ffb4521675ffdbceb1bb5ac009bb' Set-Variable ErrorActionPreference Stop Set-Variable ProgressPreference SilentlyContinue Write-Host -NoNewLine ('Downloading {0} ... ' -f ${NODEJS}) diff --git a/scripts/patches/swift-docc-render/01_add-live-routes.patch b/scripts/patches/swift-docc-render/01_add-live-routes.patch index 71f700fec..2bf0fc1a7 100644 --- a/scripts/patches/swift-docc-render/01_add-live-routes.patch +++ b/scripts/patches/swift-docc-render/01_add-live-routes.patch @@ -1,5 +1,5 @@ diff --git a/src/routes.js b/src/routes.js -index 0c928ce..f745003 100644 +index 11343be..62c13c9 100644 --- a/src/routes.js +++ b/src/routes.js @@ -9,7 +9,6 @@ @@ -10,9 +10,9 @@ index 0c928ce..f745003 100644 notFoundRouteName, serverErrorRouteName, } from 'docc-render/constants/router'; -@@ -18,25 +17,32 @@ import NotFound from 'theme/views/NotFound.vue'; +@@ -31,25 +30,34 @@ export const fallbackRoutes = [ - export default [ + export const pagesRoutes = [ { - path: '/tutorials/:id', - name: 'tutorials-overview', @@ -40,15 +40,14 @@ index 0c928ce..f745003 100644 { - path: '/documentation*', - name: documentationTopicName, -- component: () => import( -- /* webpackChunkName: "documentation-topic" */ 'theme/views/DocumentationTopic.vue' -- ), + path: '/live/documentation', + name: 'live-documentation', -+ component: () => import(/* webpackChunkName: "documentation-topic" */ 'docc-render/views/DocumentationTopic.vue'), + component: () => import( + /* webpackChunkName: "documentation-topic" */ 'theme/views/DocumentationTopic.vue' + ), + meta: { + skipFetchingData: true, + }, }, - { - path: '*', + ]; + diff --git a/scripts/update_swift_docc_render.ts b/scripts/update_swift_docc_render.ts index 8ea6eb9af..19c43cc15 100644 --- a/scripts/update_swift_docc_render.ts +++ b/scripts/update_swift_docc_render.ts @@ -26,9 +26,9 @@ function checkNodeVersion() { "Unable to determine the version of NodeJS that this script is running under." ); } - if (!semver.satisfies(nodeVersion, "20")) { + if (!semver.satisfies(nodeVersion, "^22.17")) { throw new Error( - `Cannot build swift-docc-render with NodeJS v${nodeVersion.raw}. Please install and use NodeJS v20.` + `Cannot build swift-docc-render with NodeJS v${nodeVersion.raw}. Please install and use at least NodeJS v22.17.x.` ); } } @@ -38,7 +38,7 @@ async function cloneSwiftDocCRender(buildDirectory: string): Promise { const swiftDocCRenderDirectory = path.join(buildDirectory, "swift-docc-render"); const git = simpleGit({ baseDir: buildDirectory }); console.log("> git clone https://github.com/swiftlang/swift-docc-render.git"); - const revision = "10b097153d89d7bfc2dd400b47181a782a0cfaa0"; + const revision = "c781d3783f23fda5a4721f5361c6c523772b7a62"; await git.clone("https://github.com/swiftlang/swift-docc-render.git", swiftDocCRenderDirectory); await git.cwd(swiftDocCRenderDirectory); await git.reset(ResetMode.HARD, [revision]);