Skip to content
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

Incorrect nesting of Object when value is Object and Object properties contain a colon #393

Open
dbrixey opened this issue Nov 20, 2021 · 0 comments

Comments

@dbrixey
Copy link

dbrixey commented Nov 20, 2021

Hi,

This looks similar to issue #301, but is still present.

nconf version - ^0.11.3
node version - v14.18.1

Example code:

  nconf.add('env', {type: 'file', file: configFilePath, accessSeparator: '.', logicalSeparator: '.'})
  const metaData = {
    'https://some.site.com##metadata' : {
      siteKey: 'siteValue'
    }
  };
  nconf.set('metaData', metaData)
  console.log(nconf.get('metaData'));
  // Output (internal object split by default separator)
  // { https: { '//some.site.com##metadata': { siteKey: 'siteValue' } } }

I expect the object structure of 'metaData' to be preserved.

output of default.json:

{
  "isTest": true
}

FWIW I tried the beta version and still experienced the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant