yarnpkg / yarnpkg/berry

[Feature] Add `yarn upgrade` as an alias for `yarn up`

Open
#246 11 comments 33 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
8.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

  • I'd be willing to implement this feature (Possibly, but not in the very near-term)
  • This feature can already be implemented through a plugin

Describe the user story

Exploring using berry for my team's project, I found that when I ran yarn upgrade typescript (the same command I would use in v1), I got an unhelpful error message:

PS E:\VSO\typescript-repro> yarn upgrade typescript@latest
Error: Couldn't find a script named "upgrade".

Usage: run <name> [... args] [-T,--top-level]

Describe the solution you'd like

Berry should either add yarn upgrade as an alias for yarn up, for backwards compatibility,or at least add a custom error message directing the user to the new CLI command.

This likely applies to other commands as well.

Describe the drawbacks of your solution

The only drawback I see is that it removes upgrade as a package script that can be run without having to use yarn run upgrade

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CLI handling for yarn up and the error path that treats upgrade as a script, then check how existing command aliases are tested. Done means yarn upgrade typescript@latest behaves like yarn up typescript@latest, or produces a clear message directing users to the new command.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.