[Feature] Add option to configure npmRegistryServer for @yarnpkg/doctor
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)
- perhaps with some help
- This feature is important to have in this repository; a contrib plugin wouldn't do
Running yarn dlx @yarnpkg/doctor often fails with messages like the following:
➤ YN0000: │ Resolving uuid@^9.0.0 errored with uuid@^9.0.0 isn't supported by any available resolver
➤ YN0000: │ Resolving @types/uuid@^9.0.1 errored with @types/uuid@^9.0.1 isn't supported by any available resolver
➤ YN0000: │ Resolving drizzle-kit@^0.17.4 errored with drizzle-kit@^0.17.4 isn't supported by any available resolver
➤ YN0000: │ Resolving typescript@^5.0.4 errored with typescript@^5.0.4 isn't supported by any available resolver
➤ YN0000: │ Resolving wrangler@2.14.0 errored with wrangler@2.14.0 isn't supported by any available resolver
This is because sometimes the yarnpkg.com registry is behind the npmjs.com one, and doesn't yet have updated information for packages (ie, newer versions published).
As a developer, I'd still like to use @yarnpkg/doctor, and not run into these errors.
A potential solution would be to be able to configure the doctor tool to either:
- use the
npmRegistryServerconfigured in.yarnrc.yml(if it exists) or - allow
npmRegistryServerto be configured as a CLI option to doctor
However, registry.yarnpkg.com should still remain the default.
I can't think of any immediate drawbacks, but I am unfamiliar with the implementation details of berry.
I don't know if this could be implemented as a contrib plugin, but I also don't think it makes sense to have a plugin for a plugin. I think it'd be easier to implement directly in the plugin itself.
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
The issue points to @yarnpkg/doctor and the npmRegistryServer setting; start by locating the doctor plugin's command and configuration entry points and how .yarnrc.yml settings are read. Compare the existing registry.yarnpkg.com default with the requested configured or CLI value, then verify doctor resolves packages from the selected registry while preserving the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100