-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Move config resolution to it's own package #264
Comments
We already have import {Configuration} from '@berry/core';
import npmPlugin, {npmConfigUtils} from '@berry/plugin-npm';
const configuration = await Configuration.find(__dirname, [npmPlugin], {strict: false});
const registry = npmConfigUtils.getDefaultRegistry({configuration});
console.log(registry); Does that match what you have in mind? The plugins aren't published yet so you can't access |
This seems like it could work, if access tokens are accessible too (I assume via
Do you plan on having berry support parsing |
Sorry, I missed your answer:
No, Berry exclusively reads the |
Going to close for now as the OP request seems to be already possible, but feel free to keep the discussion going if you have other questions 🙂 |
Describe the user story
Tools like https://github.com/rexxars/registry-auth-token and https://github.com/sindresorhus/registry-url need a way to access configuration settings like registry and auth tokens without having to re-implement yarn's config resolution mechanism.
Describe the solution you'd like
Move config resolution to its own package, e.g.
@berry/config
so that other modules can import and use it, e.g.import config from '@berry/config'
should yield a configuration object for the current working directory.Describe the drawbacks of your solution
Have to maintain one additional package.
Describe alternatives you've considered
None
Additional context
None
The text was updated successfully, but these errors were encountered: