Nested environment variables are being lowercased (regression?)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 519
- Forks
- 129
- Avg merge
- 1h 34m
- Merged PRs (30d)
- 1
Description
In v15.4.1, when passing in nested environment variables, the case of the nested fields would remain how they were defined.
e.g.
const argv = yargs.env('CONFIG')....
and defining an environment variable like CONFIG_some__nested__camelCase__id=foo.
In v15.4.1 this would parse as {some: {nested: {camelCase: {id: 'foo'}}}}
In the latest 16.2 release, I am seeing: {some: {nested: {camelcase: {id: 'foo'}}}}
Note the camelCase field is now lowercased.
I can provide a repro example, but wanted to get the issue out here, in case this was already known (either as a regression or as new behavior). Thanks!
Contributor guide
No contributing guide indexed for this repository
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
Start with the yargs.env nested environment-variable parsing described in the issue and compare the v15.4.1 and 16.2 behavior for CONFIG_some__nested__camelCase__id=foo. Done means nested field names preserve their defined casing, with regression coverage for the reported example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100