fix: Tweaks for nub support - #13187
Merged
Merged
Conversation
colinhacks
requested review from
Copilot and
tknickman
and removed request for
a team
June 30, 2026 23:24
Contributor
|
@colinhacks is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
colinhacks
marked this pull request as draft
June 30, 2026 23:48
colinhacks
marked this pull request as ready for review
July 1, 2026 00:06
anthonyshew
approved these changes
Jul 1, 2026
Contributor
|
@colinhacks, can you update so history only has verified signatures? It's a requirement at our GitHub org level. |
…or nub
Detect nub only through the packageManager field / devEngines.packageManager,
not the presence of its lock.yaml. nub's lockfile name is neutral and nub is
lockfile-compatible with whatever the project already uses, so the file's
presence is not a reliable nub signal. Lockfile parsing once nub is detected
via the field is unchanged.
Return true from link_workspace_packages for the Nub variant. nub links a
local workspace package for a bare version specifier ("pkg": "*"), like
npm/yarn/bun, so delegating to the underlying pnpm lockfile format (which
defaults to false on pnpm 9) dropped every internal workspace edge declared
without the workspace: protocol, causing stale cache and turbo prune --docker
to drop internal deps.
Also: set the nub executable to 'nub exec' so the post-scaffold remote-cache
hint reads 'nub exec turbo login' (turbo is a local binary; nub runs local
binaries via 'nub exec', not as a bare 'nub <name>' subcommand).
colinhacks
force-pushed
the
nub-create-turbo-login-hint
branch
from
July 1, 2026 16:15
0a6499f to
ec2eacb
Compare
anthonyshew
approved these changes
Jul 1, 2026
anthonyshew
pushed a commit
that referenced
this pull request
Jul 1, 2026
## Release v2.10.3-canary.7 > [!CAUTION] > Versioned docs aliasing FAILED. [View logs](https://github.com/vercel/turborepo/actions/runs/28533309207) ### Changes - fix: Handle task executor join errors as internal errors (#13148) (`c4017e9`) - fix: Tweaks for nub support (#13187) (`ca029ee`) - release(turborepo): 2.10.3-canary.6 (#13194) (`b79f767`) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
anthonyshew
pushed a commit
that referenced
this pull request
Jul 3, 2026
## Release v2.10.3 > [!CAUTION] > Versioned docs aliasing FAILED. [View logs](https://github.com/vercel/turborepo/actions/runs/28672736782) ### Changes - feat: Add nub to create-turbo options (#13173) (`82b1cf1`) - release(turborepo): 2.10.2 (#13174) (`ec30b18`) - release(turborepo): 2.10.3-canary.1 (#13176) (`47e2b22`) - fix: Normalize package manager versions (#13177) (`658f607`) - fix: Use singular workspace in package resolution error (#13178) (`d199c53`) - fix: Support nub native lockfiles (#13179) (`50546e6`) - perf(build): Enable thin LTO + codegen-units=1 for release builds (#13160) (`628aea9`) - release(turborepo): 2.10.3-canary.2 (#13181) (`16aed08`) - feat: Add aube package manager support (#13183) (`0f78006`) - release(turborepo): 2.10.3-canary.3 (#13184) (`fec7cee`) - fix: Normalize package manager version output (#13185) (`f469ed8`) - release(turborepo): 2.10.3-canary.4 (#13186) (`406fe59`) - refactor: Richer internal dependency data (#13188) (`909c696`) - fix: Honor package manager version ranges (`136273e`) - fix: Skip node_modules in boundaries checks (#13191) (`93741a0`) - fix: Add token exchange recovery guidance (#13192) (`bef588b`) - feat: Add --production flag to turbo prune (#13190) (`3777442`) - release(turborepo): 2.10.3-canary.5 (#13193) (`ca20ca2`) - feat: Accept Bun lockfile version 2 (#13119) (`69e2085`) - fix: Handle task executor join errors as internal errors (#13148) (`c4017e9`) - fix: Tweaks for nub support (#13187) (`ca029ee`) - release(turborepo): 2.10.3-canary.6 (#13194) (`b79f767`) - release(turborepo): 2.10.3-canary.7 (#13195) (`b426736`) - chore: Upgrade TypeScript to 7.0.1-rc (#13144) (`cf07baa`) - docs: Add filtered installs to Vercel guide (#13196) (`7e70b52`) - examples: add with-mcp-servers (#12997) (`8eb4d9d`) - fix: Report malformed JSON parse errors instead of panicking (#13198) (`a69df7d`) - fix: Improve error messaging when platform binary is missing (#13199) (`8e145f0`) - release(turborepo): 2.10.3-canary.8 (#13200) (`5987ed1`) - fix(watch): recover from slow initial hash instead of timing out (#13159) (`05e26cb`) - chore: Update vitest example to vitest 4 and use native test merging (#13202) (`e2b61dc`) - feat: Toggle between the TUI and streamed logs (#13203) (`1325455`) - fix: Resolve Bun scoped package deps that share a name with a dependency (#13207) (`e4773ab`) - feat: Select tasks by clicking rows in the TUI task list (#13206) (`c568f67`) - perf: Avoid deep-cloning dependency maps in lockfile closure cache (#13209) (`abd84cf`) - perf: Cache root internal dependencies in package graph (#13211) (`7ec8c6d`) - feat: Automatically copy TUI selection to clipboard on mouse release (#13208) (`61d6013`) - perf: Cache env wildcard matches across tasks during hashing (#13210) (`148b1dd`) - perf: Replace per-package graph traversals in scope filtering (#13212) (`28d1871`) - perf: Derive dirty hash from repo index (#13213) (`b521d32`) - fix: Include untracked symlinks in repo-index dirty hash (#13218) (`c3c91ab`) - refactor: Use upstream libghostty-vt crates instead of vendored bindings (#13205) (`c2115dc`) - fix: Remove devtools feature flag (#13219) (`65efe27`) - fix: Harden TUI terminal restore during shutdown (#13220) (`dccab93`) - fix: Correct gitignore precedence in untracked walk and memoize matcher chains (#13221) (`bc32fcc`) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 task
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.
We maintain nub and have been testing Turborepo's nub support (added in #13120 / #13169 / #13179) end-to-end against a
create-turbo --package-manager nubmonorepo. This carries three fixes; each is scoped tocrates/turborepo-repository/src/package_manager/and thecreate-turbologin hint. R1 below is a heads-up only, not a code change here.1. Correct the
create-turboremote-cache login hintThe post-scaffold hint for nub printed
nub turbo login, which errors:turbois a project-local binary, and nub runs local binaries throughnub exec(aliasnubx), not as a barenub <name>subcommand. Setting the nubexecutabletonub execmakes the hint readnub exec turbo login, matching the package-binary-exec form already used for the other managers (npx,pnpm dlx,yarn dlx,bunx).2. Detect nub only via the
packageManagerfield, not the lockfile namedetect_package_managertreated the presence of nub's nativelock.yamlas a nub signal. This drops that: nub is now recognized only through thepackageManagerfield /devEngines.packageManager. nub's lockfile name is deliberately neutral and nub is lockfile-compatible with whatever the project already uses, so the file's presence is not a reliable nub signal. Lockfile parsing is unchanged — once nub is detected via the field,PackageManager::Nub { lockfile }still parseslock.yamlthrough the underlying (pnpm) path; only the name-based detection is removed.Note
Detection tradeoff: a nub project identified only by a bare
lock.yaml— nopackageManagerfield, no other recognized lockfile — is no longer detected as nub. Turborepo falls back to its normal lockfile-based detection, which finds no package manager when onlylock.yamlis present. The field is written on the adoption paths that matter: thecreate-turbonub template writesdevEngines.packageManager, andnub pm use nubwrites it when converting an existing project — so scaffolded and converted repos are covered. A hand-authored, field-less nub repo is not. We think the field is the more robust signal, but the narrower lockfile-name coverage is your call.3. Build internal workspace edges in a nub monorepo (
link_workspace_packages)In a nub monorepo, Turborepo discovers the workspace packages but builds no internal dependency edges between them:
web#builddepends on nothing, where the same scaffold under pnpm or npm depends on@repo/ui#buildet al. Two consequences: dependents serve stale cache after an internal package changes, andturbo prune --docker webdrops the internal packages entirely (the pruned build then fails to resolve@repo/ui).Root cause: the
create-turbonub template declares internal deps with a bare specifier ("@repo/ui": "*"), like the npm and bun templates — not"workspace:*".PackageManager::Nubdelegatedlink_workspace_packagesto its underlying lockfile format (pnpm), which defaults tofalseon pnpm 9, sois_internaltreated every non-workspace:internal dep as external. npm, yarn, and bun all returntruehere, and nub links a bare specifier to the local workspace package exactly as they do (nub symlinks it and recordsversion: link:...in its lockfile). This setslink_workspace_packagestotruefor nub, putting it on the same edge-resolution path as npm/bun rather than pnpm'sworkspace:-only default. It reuses the existing package.json dependency-splitting path — no new lockfile-graph machinery.Reproduction on current
main(turbo 2.10.3-canary.4):The fix puts nub on that same
truepath, so the nub scaffold resolves identically. Covered by unit tests inpackage_manager/mod.rs(test_nub_links_workspace_packages_unlike_underlying_pnpm) and the detection tests innub.rs/mod.rs.cargo test -p turborepo-repositoryis green (219 tests).R1 (heads-up, not fixed here): Turbopack workspace-root inference
On a fresh nub scaffold, the first
turbo buildhits Next/Turbopack's own workspace-root inference, which keys off recognized lockfile names and doesn't include nub'slock.yaml, so it warns and infers the wrong root. That lives in Next's root-inference code, not this module, so it's out of scope for this PR — flagging it in case the two teams want to coordinate. The identical pnpm scaffold builds clean.Happy to adjust any of these or split them if you'd prefer separate PRs.