Repository navigation
Conversation
With nodeLinker: pnpm, `yarn workspaces focus <ws>` on a workspace that doesn't depend on the root workspace failed with "expected the top-level package to have been registered": the package map builder required the root node. A missing root is now treated as having no top-level dependencies.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 7dbe9376-4050-40c6-a000-1cb7d4b9d8fb) |
✅ Deploy Preview for yarn-v6 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
⏱️ Benchmark Resultsgatsby install-full-cold
📊 Raw benchmark data (gatsby install-full-cold)Base times: 4.334s, 4.340s, 4.319s, 4.511s, 4.372s, 4.351s, 4.343s, 4.360s, 4.393s, 4.351s, 4.395s, 4.414s, 4.374s, 4.417s, 4.377s, 4.438s, 4.327s, 4.395s, 4.344s, 4.323s, 4.361s, 4.330s, 4.442s, 4.373s, 4.371s, 4.469s, 4.388s, 4.416s, 4.378s, 4.501s Head times: 4.346s, 4.335s, 4.364s, 4.332s, 4.369s, 4.312s, 4.420s, 4.339s, 4.385s, 4.329s, 4.346s, 4.396s, 4.289s, 4.285s, 4.400s, 4.365s, 4.252s, 4.403s, 4.251s, 4.332s, 4.376s, 4.440s, 4.371s, 4.320s, 4.380s, 4.385s, 4.306s, 4.469s, 4.550s, 4.904s gatsby install-cache-only
📊 Raw benchmark data (gatsby install-cache-only)Base times: 1.325s, 1.320s, 1.317s, 1.317s, 1.318s, 1.289s, 1.320s, 1.309s, 1.309s, 1.309s, 1.312s, 1.312s, 1.318s, 1.316s, 1.333s, 1.329s, 1.324s, 1.309s, 1.326s, 1.334s, 1.312s, 1.305s, 1.327s, 1.316s, 1.317s, 1.300s, 1.326s, 1.323s, 1.301s, 1.307s Head times: 1.287s, 1.287s, 1.299s, 1.302s, 1.306s, 1.314s, 1.325s, 1.304s, 1.291s, 1.317s, 1.301s, 1.290s, 1.302s, 1.299s, 1.303s, 1.315s, 1.310s, 1.287s, 1.299s, 1.501s, 1.319s, 1.319s, 1.322s, 1.322s, 1.323s, 1.307s, 1.297s, 1.288s, 1.290s, 1.290s gatsby install-cache-and-lock (warm, with lockfile)
📊 Raw benchmark data (gatsby install-cache-and-lock (warm, with lockfile))Base times: 0.363s, 0.370s, 0.364s, 0.375s, 0.362s, 0.374s, 0.365s, 0.368s, 0.369s, 0.364s, 0.366s, 0.367s, 0.379s, 0.373s, 0.367s, 0.374s, 0.366s, 0.372s, 0.370s, 0.372s, 0.365s, 0.361s, 0.368s, 0.364s, 0.362s, 0.375s, 0.368s, 0.389s, 0.375s, 0.367s Head times: 0.365s, 0.369s, 0.370s, 0.368s, 0.373s, 0.368s, 0.370s, 0.375s, 0.375s, 0.375s, 0.372s, 0.377s, 0.373s, 0.375s, 0.372s, 0.382s, 0.374s, 0.412s, 0.371s, 0.366s, 0.367s, 0.365s, 0.368s, 0.359s, 0.368s, 0.373s, 0.375s, 0.368s, 0.369s, 0.368s |
Issue: with
nodeLinker: pnpm,yarn workspaces focus <ws>fails withPackage map generation error: expected the top-level package to have been registeredwhenever the focused workspaces don't include the root. The package map builder requires the root node.Fix: a missing root is treated as having no top-level dependencies. Covered by an acceptance test (fails before, passes after).
This is the linker part of #365, without the
--immutable/--modeflags.Note
Low Risk
Narrow linker edge-case fix with a regression test; behavior only changes when the root workspace is omitted from a focused pnpm install.
Overview
Fixes
yarn workspaces focuswithnodeLinker: pnpmwhen the focused set does not include the root workspace, which previously failed during package map generation with expected the top-level package to have been registered.PnpmPackageMapBuilder::buildno longer requires the root locator to be registered. If the root is absent (typical for a focused install), loose package maps treat top-level dependencies as empty instead of merging from a missing root node; standard maps are unchanged.Adds an acceptance test that runs
workspaces focus foofrompackages/foounder the pnpm linker and assertsno-depsis linked correctly.Reviewed by Cursor Bugbot for commit 4b71fd3. Bugbot is set up for automated code reviews on this repo. Configure here.