Skip to content

fix(cli): skip registry for workspace deps#523

Merged
jdx merged 1 commit intomainfrom
fix/workspace-update-outdated
May 5, 2026
Merged

fix(cli): skip registry for workspace deps#523
jdx merged 1 commit intomainfrom
fix/workspace-update-outdated

Conversation

@jdx
Copy link
Copy Markdown
Contributor

@jdx jdx commented May 5, 2026

Summary

Fixes the workspace dependency regression reported in Discussion #520.

  • passes discovered workspace package versions into aube update resolution so workspace: deps from package.json#workspaces resolve locally
  • skips registry packument fetches for workspace: root dependencies in aube outdated
  • adds Bats regressions for both commands using an unpublished workspace package name

Validation

  • cargo fmt --check
  • cargo check -p aube
  • cargo build -p aube
  • mise run test:bats test/update.bats
  • mise run test:bats test/outdated.bats

This PR was generated by Codex.


Note

Medium Risk
Changes dependency resolution and registry-fetch behavior in aube update/aube outdated, which can affect what versions are selected and when the CLI exits early. Risk is mitigated by targeted regression tests for workspace workspace: specs.

Overview
Fixes a regression where workspace: dependencies from package.json#workspaces could trigger unnecessary registry lookups and fail to resolve locally.

aube update now discovers workspace package name/version pairs and passes them into resolver workspace resolution (with a new WARN_AUBE_WORKSPACE_PACKAGE_MISSING_NAME when a workspace package lacks name). aube outdated now filters out direct deps whose specifier is workspace: so it reports “no matching dependencies” instead of attempting packument fetches.

Adds Bats regression tests covering both commands when the only dependency is an unpublished workspace package.

Reviewed by Cursor Bugbot for commit a5280b2. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 5, 2026

Greptile Summary

This PR fixes a regression where aube update and aube outdated would attempt registry fetches for workspace: protocol dependencies, producing "package not found" errors for packages that only exist locally.

  • aube outdated: adds a second filter pass after the type/pattern check that strips any DirectDep whose stored specifier satisfies is_workspace_spec, then exits early with (no matching dependencies) if nothing remains — preventing packument fetches for purely local deps.
  • aube update: introduces workspace_package_versions() to build a name→version map from all discovered workspace packages, then switches from resolve(...) to resolve_workspace([(".", root_manifest)], ..., &versions) — which is exactly how the internal resolve shim calls resolve_workspace, now additionally seeded with real local versions so the resolver can satisfy workspace: ranges without touching the registry.
  • Bats regression tests for both commands are added, covering the end-to-end flow with an unpublished workspace package name.

Confidence Score: 5/5

Safe to merge; the core resolution path change mirrors the existing internal resolve shim contract exactly.

The update path change from resolve to resolve_workspace with a single-element manifest array is provably equivalent to the old behavior for non-workspace projects, and the outdated path adds a straightforward filter before any I/O. Both changes are covered by dedicated Bats regression tests.

No files require special attention.

Important Files Changed

Filename Overview
crates/aube/src/commands/outdated.rs Adds a second roots-filter that strips workspace-spec'd deps before registry fetches; the two empty-check blocks use opposite JSON-condition orderings (cosmetic, same output).
crates/aube/src/commands/update.rs Switches from resolve to resolve_workspace with a single root importer and newly-collected workspace name→version map; matches the internal contract of resolve exactly and is safe for non-workspace projects.
crates/aube-codes/src/warnings.rs Adds WARN_AUBE_WORKSPACE_PACKAGE_MISSING_NAME constant and its CodeMeta entry under the correct UPDATE_PRERELEASE category.
docs/error-codes.data.json Keeps the generated JSON in sync with the new warning constant; category and description match the Rust source.
test/outdated.bats Adds a Bats regression test that verifies aube outdated succeeds and emits (no matching dependencies) instead of a registry error for a workspace-only dep.
test/update.bats Adds a Bats regression test that verifies aube update succeeds and installs the workspace-linked package into node_modules without a registry lookup error.

Fix All in Claude Code

Reviews (2): Last reviewed commit: "fix(cli): skip registry for workspace de..." | Re-trigger Greptile

Comment thread crates/aube/src/commands/outdated.rs
Comment thread crates/aube/src/commands/update.rs
@jdx jdx force-pushed the fix/workspace-update-outdated branch from 9acad10 to a5280b2 Compare May 5, 2026 21:09
@jdx jdx merged commit 5e71c9d into main May 5, 2026
18 checks passed
@jdx jdx deleted the fix/workspace-update-outdated branch May 5, 2026 21:18
@greptile-apps greptile-apps Bot mentioned this pull request May 5, 2026
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.

1 participant