mirror of
https://github.com/goauthentik/authentik.git
synced 2026-08-30 18:51:39 -07:00
* website: fix ColorModeProvider crash on API reference pages Every generated page on api.goauthentik.io renders a Docusaurus error overlay instead of content: "Hook k is called outside the <ColorModeProvider>". The docusaurus group bump in #24000 moved eleven packages from 3.10.1 to 3.10.2 but left @docusaurus/theme-common and @docusaurus/types behind at ^3.10.1. That range still admits the older resolution, so pnpm kept 3.10.1 in the lockfile and website/api ended up with a second copy of theme-common nested under itself and under docusaurus-theme-openapi-docs. theme-common is where ColorModeContext is defined. theme-classic renders its provider from the hoisted 3.10.2 copy while the OpenAPI theme's components call useColorMode from the 3.10.1 copy, so the hook reads a context object that was never populated and throws. The SSR build succeeds either way, which is why this only ever showed up in a browser. Aligning the four stale specifiers and the matching override collapses the tree back to a single theme-common. Verified against a production build: the four reference pages that previously threw now load clean and the hand-authored landing page is unaffected. docs.goauthentik.io and integrations.goauthentik.io never carried a second copy and were never affected. Closes #24026 Co-Authored-By: Agent (authentik-i24026-aligned-educational-pine) <279763771+playpen-agent@users.noreply.github.com> * website: guard theme-common against a second copy Two things kept the duplicate resolution reachable after the version alignment. @goauthentik/docusaurus-theme imports useColorMode, ColorMode and ThemeClassNames from @docusaurus/theme-common across five files but never declared the dependency. It resolved anyway because the website workspace uses pnpm's hoisted linker, so the shared theme package was picking up whatever copy happened to land at the root. Declaring it makes the resolution the theme actually relies on an explicit one. The override was keyed on @goauthentik/docusaurus-config, which website consumes through link:../../packages/docusaurus-config. That path leaves the website workspace, and the version it restated there had to be kept in step with website's own manifests by hand. Rekeying it unscoped drops the second copy of the version and covers every member and transitive peer rather than one linked package. Worth recording for whoever picks up the Dependabot side: peer ranges in packages/docusaurus-config stay at ^3.10.1 deliberately. They are a compatibility floor, they are only consumed by JSDoc @import types, and dependabot-core#1242 has been open since 2019, so Dependabot would never bump them regardless. Co-Authored-By: Agent (authentik-i24026-aligned-educational-pine) <279763771+playpen-agent@users.noreply.github.com> * website: move the Docusaurus versions into the pnpm catalog The Docusaurus packages ship as one lockstep release, and eleven of them are declared across api, docs, integrations and docusaurus-theme, several in three or four manifests at once. Nothing tied those declarations together, so a group bump only had to miss one to leave two versions of a package resolvable in the same tree. #24026 is what that looks like when the package owns a React context. Each version now lives once, in the catalog, and every member references it as catalog:. Dependabot has supported catalog entries since the February 2025 GA, so bumps keep arriving as before and land on all four manifests together rather than on whichever subset the group happened to match. The theme-common override reads catalog: too, which is why its importer entries record ^3.10.2 instead of catalog: — the override resolves first and pnpm writes the specifier it actually applied. The version is still stated once. Verified with pnpm install --frozen-lockfile from a cleared node_modules, which is the check that would catch a catalog and lockfile that had drifted apart. Co-Authored-By: Agent (authentik-i24026-aligned-educational-pine) <279763771+playpen-agent@users.noreply.github.com> --------- Co-authored-by: Agent (authentik-i24026-aligned-educational-pine) <279763771+playpen-agent@users.noreply.github.com> Co-authored-by: Dewi Roberts <dewi@goauthentik.io>
36 lines
1.1 KiB
JSON
36 lines
1.1 KiB
JSON
{
|
|
"name": "@goauthentik/integration-docs",
|
|
"version": "0.0.0",
|
|
"license": "MIT",
|
|
"private": true,
|
|
"scripts": {
|
|
"build": "docusaurus build",
|
|
"build:docusaurus": "docusaurus build",
|
|
"clear": "docusaurus clear",
|
|
"docusaurus": "docusaurus",
|
|
"serve": "docusaurus serve",
|
|
"start": "docusaurus start"
|
|
},
|
|
"dependencies": {
|
|
"@docusaurus/core": "catalog:",
|
|
"@docusaurus/module-type-aliases": "catalog:",
|
|
"@docusaurus/plugin-client-redirects": "catalog:",
|
|
"@docusaurus/preset-classic": "catalog:",
|
|
"@docusaurus/theme-mermaid": "catalog:",
|
|
"@docusaurus/tsconfig": "catalog:",
|
|
"@docusaurus/types": "catalog:",
|
|
"@goauthentik/docusaurus-config": "link:../../packages/docusaurus-config",
|
|
"@goauthentik/docusaurus-theme": "workspace:*",
|
|
"@mdx-js/react": "^3.1.1",
|
|
"@types/react": "^19.2.16",
|
|
"@types/react-dom": "^19.2.3",
|
|
"prism-react-renderer": "^2.4.1",
|
|
"react": "^19.2.7",
|
|
"react-dom": "^19.2.7",
|
|
"typescript": "catalog:"
|
|
},
|
|
"engines": {
|
|
"node": ">=24"
|
|
}
|
|
}
|