Repository navigation
chore(monorepo): use pnpm isolated nodeLinker, fix stale linkWorkspacePackages comment (AI-assisted) - #12535
Merged
Conversation
Internal @docusaurus/* deps already use workspace:*. The setting is still needed because the create-docusaurus init templates use real versions so they can be copied as-is; it links them to local packages. Co-Authored-By: Claude Opus 5.5 <[email protected]>
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
- Switch nodeLinker from hoisted to isolated (pnpm default) - Shorten the linkWorkspacePackages comment - Un-export DocFrontMatterSchema: its inferred type referenced joi, which plugin-content-docs doesn't depend on directly (TS2883 under isolated) - Strip node_modules/.pnpm/<id>/node_modules/ from test snapshots Co-Authored-By: Claude Opus 5.5 <[email protected]>
…space-packages-comment
…isted) - plugin-pwa, theme-search-algolia: add @types/react-dom devDependency - root: add vite devDependency (imported by vitest.config.ts) Co-Authored-By: Claude Opus 5.5 <[email protected]>
- plugin-pwa: resolve babel-loader with require.resolve() instead of a bare loader name resolved from the site dir - module-type-aliases: add @types/react-dom dependency (types reference react-dom/client) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…isted) The swizzle CI test ejects theme-classic components into the website. Without hoisting, their imports must be website dependencies. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 2, 2026
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-flight checklist
Motivation
Switch the monorepo from
nodeLinker: hoistedtoisolated(pnpm's default), resolving the existing TODO.Hoisting let packages import dependencies they don't declare.
isolatedmatches what pnpm users get, so CI now catches these. It already found two user-facing bugs:plugin-pwapassed a bare'babel-loader'loader name, resolved from the site dir. It fails on sites installed with pnpm's default linker. Now usesrequire.resolve().module-type-aliasespublishes types referencingreact-dom/clientwithout depending on@types/react-dom.Other fixes needed for
isolated:@types/react-dom(plugin-pwa,theme-search-algolia),vite(root, used byvitest.config.ts), and website devDeps used by theme components ejected in the swizzle CI test (Knip-ignored).plugin-content-docs: un-exportDocFrontMatterSchema. Its inferred type referencedjoi, an undeclared dependency (TS2883).node_modules/.pnpm/<id>/node_modules/<pkg>becomesnode_modules/<pkg>.Also fixes the stale
linkWorkspacePackagescomment. Internal deps already useworkspace:*, but the setting is still needed. Init templates keep real versions ("@docusaurus/core": "4.0.0") so create-docusaurus copies them as-is. Without it,pnpm dedupe --checkand the Windows in-workspace e2e fail, since 4.0.0 isn't on npm.(AI-assisted)
Test Plan
CI, plus locally in a worktree outside the main checkout. A nested worktree resolves the parent checkout's hoisted
node_modulesand hides missing deps.build:packages,pnpm test,pnpm lint:ciExpected failure while this PR is open: Build Size Report. The PR build passes. The job then installs the base branch (
hoisted) over this PR'sisolatednode_modules, breaking bin shims. Goes away once both useisolated.Test links
Deploy preview: https://deploy-preview-12535--docusaurus-2.netlify.app/
Related issues/PRs
hoisted)workspace:*)🤖 Generated with Claude Code