yargs / yargs/yargs

Split config `extends` functionality to separate module?

Open
#1,374 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
11.5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Ref istanbuljs/load-nyc-config#2

The module in question is to be used by both nyc and babel-plugin-istanbul. The babel plugin does not use yargs (no CLI processing), but we want it to load the same configuration as nyc. Currently extends is not processed. I could probably use const applyExtends = require('yargs/lib/apply-extends') but this is not documented as a public API and the babel plugin has no reason to install yargs as a whole. It would be nice if lib/apply-extends.js were it's own stand-alone module so the babel plugin could get identical config loading functionality as nyc without pulling in all of yargs.

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 request centers on lib/apply-extends.js and its current yargs/lib/apply-extends usage; start by tracing how nyc loads configuration and how babel-plugin-istanbul needs to reuse it. Done means extends processing is available as a standalone module, without requiring the full yargs package, while preserving identical configuration behavior for both consumers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.