Skip to content

feat(tool): add nub package manager#7054

Open
colinhacks wants to merge 2 commits into
containerbase:mainfrom
colinhacks:feat/nub-tool
Open

feat(tool): add nub package manager#7054
colinhacks wants to merge 2 commits into
containerbase:mainfrom
colinhacks:feat/nub-tool

Conversation

@colinhacks

@colinhacks colinhacks commented Jul 7, 2026

Copy link
Copy Markdown

Adds a nub tool.

Nub is a Node package manager published as @nubjs/nub on npm. This lets Containerbase provision it the same way it provisions the other Node package managers, so a runtime using the default binarySource=install can install nub to run lockfile updates.

Implementation

NubInstallService extends NpmBaseInstallService and overrides tool() to return @nubjs/nub — the tool name (nub) differs from the npm package, the same shape as YarnInstallService returning @yarnpkg/cli-dist for Yarn berry. It installs via npm install @nubjs/nub@<version> and is added to NoPrepareTools.

Scripts run on install (no --ignore-scripts): @nubjs/nub's postinstall selects and places the per-platform binary from its @nubjs/nub-<platform> optional dependencies (glibc and musl variants for linux-x64 and linux-arm64), so the tool is usable after install.

Context

Related: renovatebot/renovate#44422 — the companion Renovate manager PR (nub package-manager manager) that depends on this tool for its default binarySource=install runtime.

AI assistance disclosure

This change was written with substantive assistance from an AI coding agent (Claude).

Add nub (https://nubjs.com) as an npm-distributed tool. Installs @nubjs/nub via the shared NpmBaseInstallService; the tool name (nub) differs from the npm package (@nubjs/nub), so tool() is overridden like YarnInstallService does for berry.
Copilot AI review requested due to automatic review settings July 7, 2026 17:41
@github-actions github-actions Bot requested a review from viceice July 7, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@viceice viceice left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please link al relevant renovate discussion / issue / pr

Comment thread src/cli/tools/node/npm.ts Outdated
Comment on lines +35 to +37
override async test(): Promise<void> {
await this._spawn(this.name, ['--version']);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not needed and should work out of the box

The base NpmBaseInstallService.test() already strips the package scope
(@nubjs/nub -> nub) before spawning --version, so the override was
identical to the inherited behavior.
@colinhacks

Copy link
Copy Markdown
Author

Removed the test() override in c2a3118 — you're right, NpmBaseInstallService.test() already strips the @nubjs/ scope from tool() before spawning --version, so it was identical to the inherited behavior. Only the tool() override remains, since the package is @nubjs/nub rather than nub.

Linked the companion Renovate manager PR (renovatebot/renovate#44422) in the description — it's the only related Renovate change, no separate issue or discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants