-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: config get
prints json for object
#9811
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
base: main
Are you sure you want to change the base?
Conversation
return { output: Array.isArray(config) ? config.join(',') : String(config), exitCode: 0 } | ||
let output: string | ||
if (Array.isArray(config)) { | ||
output = config.join(',') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was on me: #7917. I don't remember why I decided to return a comma-separated list instead of a JSON string, but changing it now would be a breaking change.
I do feel that
|
Yes, probably we should support that. But I think the field names should be separated by dots:
|
|
And escaping is necessary because dependency names can contain all kinds of symbols: |
See how Yarn also supports this: https://yarnpkg.com/cli/config/set We can check what library Yarn uses. It should be something small. |
3b1a9ef
to
e28f84f
Compare
I don't see any usage of the new library in config get/set |
It's WIP. I haven't glued them together yet. But doing so should be easy. |
8161463
to
0dc5e8d
Compare
0dc5e8d
to
aeef6df
Compare
Discovered flaws
|
Resolves #9797