[Feature] `yarn up` should be able to exclude workspace dependencies.
Nobody has claimed this yet.
- 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 (contributing guide)
- This feature is important to have in this repository; a contrib plugin wouldn't do
Describe the user story
Given I own of Yarn workspace
And I publish my workspace packages to a public package registry
When I want to blanket update my workspace's dependencies (yarn up "*" or yarn up "@*/*")
Then I expect all non-workspace dependencies to be updated.
(An optional flag, like yarn up "*" "@*/*" --no-workspace is acceptable.)
Instead, for each workspace package, I am prompted with
➤ YN0027: @SCOPE/PACKAGE@workspace:^ has multiple possible upgrade strategies; use -i to disambiguate manually
When I use yarn up "*" "@*/*" -i, I must manually choose how to upgrade every dependency referenced in my workspace.
Describe the solution you'd like
Either the default behavior of yarn up, or when an optional flag like --no-workspace is passed, will skip upgrading any dependency with a version reference containing workspace:.
Describe the drawbacks of your solution
- A default behavior change could be considered a breaking change.
- Additional flags could push the command towards doing too many things.
Describe alternatives you've considered
As an alternative, a custom script could automate the -i prompt based on whether the choice contains workspace: (keep) or not (upgrade to latest). I have not pursued this solution, because I don't know how to make a script that interacts with interactive prompts, and the user experience of executing this script in multiple repositories would be dubious.
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 by tracing the yarn up command and its -i interactive upgrade flow, using the contributing guide to understand the repository workflow. The change should let users skip dependencies whose version references contain workspace: while still updating other matching dependencies; add or update coverage for the requested behavior if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100