yarnpkg / yarnpkg/berry

[Feature] automatically offer to migrate RC files

Open
#775 0 comments 5 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
  • This feature can already be implemented through a plugin

Describe the user story

Since berry doesn’t support npmrc files, it means anything in those files is ignored when you bring it into an existing project. In our case, this means custom NPM registries are ignored, which is annoying because the error handling just says can’t download packages, 404. It’s technically the right error, but it’s not correct because it doesn’t have the right registry. It would be nice if on first install berry offered to do the migration for me and create the new .yarnrc.yml file based off of an existing .npmrc or .yarnrc so I don’t have to.

Describe the solution you'd like

berry will automatically create my RC file on first install if a “legacy” rc file already exists.

Describe the drawbacks of your solution

Depending on the current support, it is possible not all rc entries are supported at this time.

Describe alternatives you've considered

Maybe clearer messaging at least that checks if an existing rc file is around and just fail quick to tell the user they need to migrate the file before running first install

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

The issue concerns first-install handling of legacy .npmrc or .yarnrc files and creation of .yarnrc.yml, but it names no implementation files or tests. Start by tracing configuration loading during the first install and determine which legacy entries can be migrated. Done means offering or performing migration with clear handling for unsupported entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
cli, developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.