feat: add nub package manager detection#7124
Conversation
📝 WalkthroughWalkthroughThis change adds support for a new package manager called "nub" to the package manager detection utility. It introduces a Estimated code review effort: 1 (Trivial) | ~5 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant detectPackageManager
participant sniffUserAgent
participant AVAILABLE_PACKAGE_MANAGERS
Caller->>detectPackageManager: request package manager detection
detectPackageManager->>detectPackageManager: check nub.lock file existence
alt nub.lock found
detectPackageManager->>AVAILABLE_PACKAGE_MANAGERS: lookup NUB config
AVAILABLE_PACKAGE_MANAGERS-->>detectPackageManager: return nub config
else lock file not found
detectPackageManager->>sniffUserAgent: check npm_config_user_agent
sniffUserAgent-->>detectPackageManager: return PkgManager.NUB if "nub" present
end
detectPackageManager-->>Caller: return nub package manager config
Related issues: None specified. Related PRs: None specified. Suggested labels: enhancement, package-managers Suggested reviewers: None specified. 🐰 A tiny hop, a lock file found, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…view - packages/cli/packages.ts: drop the duplicate `case "nub"` left by merging main; the file now matches main's version from cloudflare#14499, resolving the no-duplicate-case lint error. - autoconfig: move the nub.lock check into convertDetectedPackageManager, with a TODO to remove it once netlify/build#7124 (nub in @netlify/build-info) is merged and released. - changeset: bump the affected packages minor instead of patch. - tests: cover nub.lock absent and malformed lock file cases in workers-utils, and nub detection via detectFramework in autoconfig.
Adds detection for nub, a package manager whose native lockfile is
nub.lock(pnpm-v9-compatible lockfile format).What changed
nubentry inAVAILABLE_PACKAGE_MANAGERS(@netlify/build-info), mirroring the existing bun entry:installCommand: 'nub install',runCommand: 'nub run',localPackageCommand/remotePackageCommand: 'nubx',lockFiles: ['nub.lock'].NUBto thePkgManagerenum and anubbranch tosniffUserAgent.nub.lockroot-detection case plus thenubuser-agent variant in the existing parametrized suite.Purely additive — no existing package manager's entry or behavior changes.
Verified with
npm run buildandvitest runinpackages/build-info(all green);oxfmt --checkandeslintclean on the touched files.