Upgrade to Docusaurus 3.10.2 and Yarn 4.17.1#178
Conversation
- Upgrade Docusaurus from 3.9.2 to 3.10.2 - Upgrade Yarn from 4.13.0 to 4.17.1 - Update React, MDX, TypeScript, and related website dependencies - Adopt Docusaurus’s simplified `future.faster` configuration - Regenerate the Yarn lockfile with the updated toolchain
Miggets7
left a comment
There was a problem hiding this comment.
Build passes and the faster: true rename matches the Docusaurus 3.10 migration. A few findings below.
Nit: the PR description says Yarn 4.13.0 → 4.17.1, but the diff removes yarn-4.12.0.cjs, so the actual upgrade is 4.12.0 → 4.17.1.
| "@docusaurus/types": "^3.10.2", | ||
| "@types/react": "^19", | ||
| "typescript": "~5.6.2" | ||
| "typescript": "~6.0.3" |
There was a problem hiding this comment.
Bug: yarn typecheck fails on TypeScript 6 because baseUrl (set in @docusaurus/tsconfig and our tsconfig.json) is deprecated:
error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Fix: add "ignoreDeprecations": "6.0" to compilerOptions in tsconfig.json — the Docusaurus 3.10 site template ships this. CI only runs yarn build, so it won't catch this.
| @@ -1,9 +1,14 @@ | |||
| approvedGitRepositories: | |||
| - "**" | |||
There was a problem hiding this comment.
Risk: approvedGitRepositories: "**" approves every git repo, and the lockfile has no git dependencies. Suggest removing it — the wildcard disables the Yarn 4.14 protection for any git dependency added later.
|
|
||
| enableGlobalCache: false | ||
|
|
||
| enableScripts: true |
There was a problem hiding this comment.
Risk: this re-enables all third-party postinstall scripts, undoing the Yarn 4.14 hardened default. Suggest dropping it. If a specific package needs its build script, keep the global default and allow-list that package via dependenciesMeta.<pkg>.built: true.
| "@mdx-js/react": "^3.1.1", | ||
| "clsx": "^2.1.1", | ||
| "docusaurus-plugin-openapi-docs": "^5.1.2", | ||
| "docusaurus-theme-openapi-docs": "^5.1.2", |
There was a problem hiding this comment.
Risk: docusaurus-plugin-openapi-docs 4.5.1 → 5.1.2 is a major bump, but docs/rest-api/ and docs/provisioning-api/ were not regenerated, so the committed MDX is still from the v4 generator. Run yarn clean-api-docs all && yarn gen-api-docs all in this PR, and check the custom api.mustache against the v5 base template — v5 adapted to the Tabs context refactor in Docusaurus 3.10.
future.fasterconfiguration