Migrate docs from npm to pnpm, fix all Docusaurus deprecation warnings #70
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The docs site uses bare
npmwith no lockfile discipline, and the Docusaurus build emits deprecation warnings that will become errors in v4.npm issues:
package-lock.jsonis bloated and not deterministic across environmentsnpm installin Dockerfile is slow (no cache reuse)Deprecation warnings (from build output):
siteConfig.onBrokenMarkdownLinks— must move tositeConfig.markdown.hooks.onBrokenMarkdownLinksPlan
1. Migrate to pnpm
package-lock.jsonpnpm-lock.yaml(generated bypnpm install)packageManagerfield topackage.json:"packageManager": "pnpm@10.x"docs/Dockerfile:RUN corepack enable && corepack prepare pnpm@latest --activatenpm install→pnpm install --frozen-lockfilenpm run build→pnpm buildnpmfor docs2. Fix all deprecation warnings
pnpm buildand capture ALL warningsonBrokenMarkdownLinksconfig key needs migration3. Add .npmrc / .pnpmrc for project config
auto-install-peers=truestrict-peer-dependencies=false(Docusaurus has peer dep issues)Files
docs/package.jsondocs/package-lock.json(delete)docs/pnpm-lock.yaml(new)docs/Dockerfiledocs/docusaurus.config.jsdocs/.npmrc(new, optional)