The `yargs-test-extends` package is a specialized internal fixture designed for unit testing the `.config()` and `extends` functionality within the `yargs` command-line argument parsing library. It is not intended for general-purpose use in consumer applications, but rather serves as a static configuration source to verify `yargs`'s dynamic configuration loading capabilities. This package currently maintains version `1.0.1`. Its primary role is to demonstrate and verify that `yargs` can load configuration from an external Node.js module by inspecting its `main` entry point, which points to a static `index.json` file containing predefined configuration values. This mechanism tests `yargs`'s ability to extend configuration dynamically from installed packages rather than solely from local JSON files, ensuring robust configuration management within the `yargs` ecosystem.
npm install yargs-test-extendsVerified import paths — ran on the pinned version, not inferred.
Demonstrates `yargs` loading configuration from an external Node.js module specified by `extends`.
Avoid using 'yargs-test-extends' in production code. For dynamic configuration in your own `yargs` applications, create your own module that exports a configuration object or points to a custom JSON file.
If you need to inspect the raw configuration, direct import/require is functional. However, if you intend for `yargs` to interpret it as an extension, you must use `yargs().config({ extends: 'yargs-test-extends' })`.Understand that direct `require('yargs-test-extends')` or `import config from 'yargs-test-extends'` provides the raw JSON content. For `yargs` to process it as an extension, use `yargs().config({ extends: 'yargs-test-extends' })`.Ensure `yargs-test-extends` is listed in your project's `dependencies` or `devDependencies` (if used only for testing) and installed via `npm install yargs-test-extends` or `yarn add yargs-test-extends`.
No dependency data recorded yet.