feat(manager/aube): add aube manager#44428
Conversation
Assisted-by: Claude Code:claude-opus-4-8[1m] Signed-off-by: JP-Ellis <josh@jpellis.me>
Assisted-by: Claude Code:claude-opus-4-8[1m] Signed-off-by: JP-Ellis <josh@jpellis.me>
Assisted-by: Claude Code:claude-opus-4-8[1m] Signed-off-by: JP-Ellis <josh@jpellis.me>
Assisted-by: Claude Code:claude-opus-4-8[1m] Signed-off-by: JP-Ellis <josh@jpellis.me>
Assisted-by: Claude Code:claude-opus-4-8[1m] Signed-off-by: JP-Ellis <josh@jpellis.me>
typeof null === 'object', so the workspaces-shape check threw a TypeError when a package.json set "workspaces": null. Because extraction runs all managers under a single Promise.all, the uncaught throw aborted extraction for every manager in the repo run. Assisted-by: Claude Code:claude-opus-4-8[1m] Signed-off-by: JP-Ellis <josh@jpellis.me>
The .npmrc mutation applied before running the install command (which can carry host-rule registry auth tokens) was only reverted on the success path. Any install failure left the mutated .npmrc on disk for subsequent steps. Reset it in the catch block too, matching the reference manager's implementation. Assisted-by: Claude Code:claude-opus-4-8[1m] Signed-off-by: JP-Ellis <josh@jpellis.me>
aube implements the same ignoreScripts/allowScripts gating as bun but was missing from the supportedManagers list, so generated config option docs under-reported aube support. Assisted-by: Claude Code:claude-opus-4-8[1m] Signed-off-by: JP-Ellis <josh@jpellis.me>
|
Tested the branch against my own website and can confirm it seems to work just fine. Bash Script#!/usr/bin/env bash
#
# Test the `aube` manager against a real repo containing an aube lockfile.
#
# Usage:
# ./test-aube.sh <renovate-src-dir> <target-repo-dir>
#
# Example:
# ./test-aube.sh ~/src/renovatebot/renovate ~/src/JP-Ellis/jpellis.me
#
set -euo pipefail
RENOVATE_SRC="${1:?path to the renovate source checkout (with the aube manager)}"
TARGET_REPO="${2:?path to the repo containing the aube lockfile to update}"
LOG="/tmp/renovate-aube.log"
echo "Renovate source: $RENOVATE_SRC"
echo "Renovate branch: $(git -C "$RENOVATE_SRC" rev-parse --abbrev-ref HEAD)"
echo "Renovate commit: $(git -C "$RENOVATE_SRC" rev-parse HEAD)"
echo "Target repo: $TARGET_REPO"
echo "Log file: $LOG"
echo
echo "Regenerating manager imports..."
(cd "$RENOVATE_SRC" && node tools/generate-imports.mjs)
echo
cd "$TARGET_REPO"
echo "Running Renovate against $TARGET_REPO..."
RENOVATE_PLATFORM=local \
RENOVATE_ENABLED_MANAGERS=aube \
RENOVATE_DRY_RUN=lookup \
LOG_LEVEL=debug \
node "$RENOVATE_SRC/lib/renovate.ts" >"$LOG" 2>&1
echo "=== Extract ==="
grep -E "Matched [0-9]+ file|fileCount|depCount" "$LOG" || true
echo
echo "=== Proposed updates (depName / newValue / newVersion / updateType) ==="
grep -E '"depName"|"newValue"|"newVersion"|"updateType"' "$LOG" || true
echo
echo "Full debug log: $LOG"Script OutputFull LogAlso tested it for real (using my credentials) and it seems to work: |
| // Support the nested packages property shape | ||
| if ( | ||
| workspaces !== null && | ||
| typeof workspaces === 'object' && |
There was a problem hiding this comment.
is.plainObject(workspaces)
| import type { Opt, ToolConfig, ToolConstraint, ToolName } from './types.ts'; | ||
|
|
||
| export const allToolConfig: Record<ToolName, ToolConfig> = { | ||
| aube: { |
There was a problem hiding this comment.
maybe wrong containerbase entry @viceice
The manager url is github.com/jdx/aube, and lib/data/mise-registry.json already resolves aube to jdx/aube via github/aqua, not npm.
Please, confirm the datasource and packageName.
There was a problem hiding this comment.
Aube is published in a number of places:
- https://github.com/jdx/aube (and GitHub releases therein)
- https://www.npmjs.com/package/@endevco/aube
- https://crates.io/crates/aube
- via Aqua https://github.com/aquaproj/aqua-registry/tree/main/pkgs/jdx/aube
So yeah, I'm not sure what the action item here is. Is the entry in mise-registry.json sufficient? Or do we need a PR upstreain in containerbase?
There was a problem hiding this comment.
this needs to match the source containerbase will use to install aube
Signed-off-by: JP-Ellis <josh@jpellis.me>
Changes
Adds a new
aubemanager for aube, a Node.js package manager by jdx (author of mise). aube consumes a standardpackage.jsonand resolves dependencies into anaube-lock.yamllock file, refreshed by runningaube install.Requested in discussion #42866.
What the manager does
aube-lock.yamlwith its siblingpackage.json, reusing npm's existingextractPackageJson/resolveNpmrclogic. Full workspace support (theworkspaces: [...]array form and theworkspaces: { packages: [...] }object form).aube-lock.yamlby shelling out toaube install(with--ignore-scriptswhen scripts are disallowed), including npmrc/host-rules handling and lock-file-maintenance.index.tsmirrors the npm-family managers (supersedesManagers: ['npm'], npm + github-tags datasources,supportsLockFileMaintenance), plus registration in the managerapi.ts,toolDefinitions/allToolConfig(@endevco/aubeon the npm datasource), and theignoreScriptssupported-managers list.Reuse of the
bunmanageraube is architecturally near-identical to the existing
bunmanager (both consumepackage.jsonand maintain their own lock file via a CLI). To avoid duplicating the workspace-matching logic across the two managers, the shared helper was extracted frombun/utils.tsintonpm/workspaces.ts, andbunwas updated to import from the new shared location. The oldbun/utils.tsand its spec were removed.aubethen consumes the same helper. No behavioural change tobun.While building aube against
bunas the template, I suspect I found two bugs in the existingbunmanager that would have been copied verbatim. They are fixed inaubehere (aligning with the more-correctnpm/artifacts.tsreference), and left untouched inbun, but I'm flagging them here for possible follow-up:"workspaces": null. The nested-packageschecktypeof workspaces === 'object' && 'packages' in workspacesthrowsTypeError: Cannot use 'in' operator to search for 'packages' in null, becausetypeof null === 'object'. Since the extract phase runs all managers under a singlePromise.allwith no per-manager catch, a repo whosepackage.jsoncontains"workspaces": nullwould abort extraction for every manager in the run. aube guards againstnulland adds a regression test..npmrcnot reset on the install error path.npm/artifacts.tsresets the temporarily-mutated.npmrcon both the success and error paths;bun/artifacts.tsonly resets on success. On anyaube installfailure this would leave a host-rule-derived.npmrc(which can carry registry auth tokens) on disk for subsequent steps. aube resets in thecatchblock, matchingnpm.Note on binary dependency
For this to be fully supported, this manager requires access to the
aubebinary to runaube install. A similar PR to this one for mise will be needed upstream so that Renovate's containerbase can ship anaubeinstaller.Context
Please select one of the following:
This PR originates from discussion #42866.
AI assistance disclosure
Did you use AI tools to create any part of this pull request?
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: