From 384dea7233ca2a5bade4ede90ec90f7e6796bfbd Mon Sep 17 00:00:00 2001 From: Colin McDonnell <3084745+colinhacks@users.noreply.github.com> Date: Tue, 7 Jul 2026 10:31:45 -0700 Subject: [PATCH] feat(tool): add nub 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. --- src/cli/install-tool/index.ts | 2 ++ src/cli/tools/index.ts | 1 + src/cli/tools/node/npm.ts | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/src/cli/install-tool/index.ts b/src/cli/install-tool/index.ts index d056aa131b..6eae5ddba9 100644 --- a/src/cli/install-tool/index.ts +++ b/src/cli/install-tool/index.ts @@ -68,6 +68,7 @@ import { MiseInstallService, MiseVersionResolver } from '../tools/mise.ts'; import { NixInstallService } from '../tools/nix.ts'; import { NodeInstallService } from '../tools/node/index.ts'; import { + NubInstallService, RenovateInstallService, YarnInstallService, YarnSlimInstallService, @@ -171,6 +172,7 @@ async function prepareInstallContainer(): Promise { container.bind(INSTALL_TOOL_TOKEN).to(NixInstallService); container.bind(INSTALL_TOOL_TOKEN).to(NugetInstallService); container.bind(INSTALL_TOOL_TOKEN).to(NodeInstallService); + container.bind(INSTALL_TOOL_TOKEN).to(NubInstallService); container.bind(INSTALL_TOOL_TOKEN).to(PaketInstallService); container.bind(INSTALL_TOOL_TOKEN).to(PhpInstallService); container.bind(INSTALL_TOOL_TOKEN).to(PixiInstallService); diff --git a/src/cli/tools/index.ts b/src/cli/tools/index.ts index 67fc281d88..adcd231655 100644 --- a/src/cli/tools/index.ts +++ b/src/cli/tools/index.ts @@ -33,6 +33,7 @@ export const NoPrepareTools = [ 'nix', 'nuget', 'npm', + 'nub', 'paket', 'pdm', 'pip-tools', diff --git a/src/cli/tools/node/npm.ts b/src/cli/tools/node/npm.ts index 39bbc4df86..deb8268091 100644 --- a/src/cli/tools/node/npm.ts +++ b/src/cli/tools/node/npm.ts @@ -20,6 +20,23 @@ export class RenovateInstallService extends NpmBaseInstallService { } } +@injectable() +@injectFromHierarchy() +export class NubInstallService extends NpmBaseInstallService { + override readonly name: string = 'nub'; + + // The tool is `nub`, but it ships on npm under the scoped package + // `@nubjs/nub` (with per-platform binary optionalDependencies), so the + // install target differs from the tool name. + protected override tool(): string { + return '@nubjs/nub'; + } + + override async test(): Promise { + await this._spawn(this.name, ['--version']); + } +} + @injectable() @injectFromHierarchy() export class YarnInstallService extends NpmBaseInstallService {