[Bug?]: `yarn upgrade-interactive` incorrectly parses aliased packages
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
yarn upgrade-interactive incorrectly parses aliased packages
To reproduce
Sorry, I don't know how to do an interactive plugin reproduction via Sherlock, so I put together a git repo with the minimal code:
https://github.com/kkirsche/yarn-issue-repro
This includes an image of the actual output
To reproduce:
git clone https://github.com/kkirsche/yarn-issue-repro.git
cd yarn-issue-repro
yarn install
yarn upgrade-interactive
This is using the following package.json:
{
"dependencies": {
"buffer": "npm:buffer-browserify@^0.2.5"
},
"packageManager": "yarn@3.2.1"
}
Environment
System:
OS: macOS 12.4
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Binaries:
Node: 16.15.1 - /private/var/folders/62/793fz95j5856gz_3gz6yrlv80000gq/T/xfs-99a9dab4/node
Yarn: 3.2.1 - /private/var/folders/62/793fz95j5856gz_3gz6yrlv80000gq/T/xfs-99a9dab4/yarn
npm: 8.13.1 - ~/.asdf/plugins/nodejs/shims/npm
Additional context

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproduction repository linked in the issue and run its documented clone, install, and upgrade-interactive commands against the aliased dependency in package.json. Trace the upgrade-interactive package parsing behavior and add coverage showing that the alias is handled correctly; done means the command no longer misparses this dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100