Skip to content

fix(outdated): preserve global registry aliases - #10326

Open
ychampion wants to merge 2 commits into
npm:latestfrom
ychampion:fix/global-registry-aliases
Open

ychampion wants to merge 2 commits into
npm:latestfrom
ychampion:fix/global-registry-aliases

Conversation

@ychampion

Copy link
Copy Markdown
Contributor

Fixes #9706.

A package installed as cowsay@npm:[email protected] lives under cowsay. Global npm outdated used that folder name for the registry lookup. Global npm update could then replace TypeScript with cowsay.

Use the installed package's registry name for global alias lookups. The report keeps the install name and shows the target in each version, such as [email protected]. Both named and bulk updates keep the alias and select a new version of its target. Global installs have no root manifest, so the update uses the usual global version selector.

I reproduced both failures against a local registry with a scoped alias target and a separate package under the alias name. After the fix, named and bulk updates both installed the new version of the scoped target. The bulk run also updated an ordinary global package.

Thanks to @liangmiQwQ for the reproduction and to @Sanjays2402 for the earlier work on the outdated report in #9707.

@ychampion
ychampion requested a review from a team as a code owner November 21, 2026 02:43
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.

[BUG] Global alias packages have wrong outdated / update version

1 participant