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

Fix dot-paths in dynamic objects #315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sebmaster
Copy link

Previously nested constructs containing dot-paths as keys would lead to
a crash like "cannot find configuration param 'dot.path'". With some
careful hacking around paths we can at least enable this use-case for
dynamic objects - it is completely untested/unsupported for regular
overlaying.

Previously nested constructs containing dot-paths as keys would lead to
a crash like "cannot find configuration param 'dot.path'". With some
careful hacking around paths we can at least enable this use-case for
dynamic objects - it is completely untested/unsupported for regular
overlaying.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling d487f7d on Sebmaster:fix/nested-dotpaths into b6a7c52 on mozilla:master.

@madarche
Copy link
Collaborator

Hello @Sebmaster. Thanks for this PR. Sorry for the delay of the answer.

I would rather avoid making convict's code more complex. But this PR appears to fix #271 without breaking anything. So this is likely to be accepted.

@Sebmaster could you explain why do you use the expression dynamic objects? Isn't it just about objects with dot path values? The right choice of words is very important so the purpose of the code and the tests are as clear as possible, especially for future maintenance. Thanks.

@Sebmaster
Copy link
Author

could you explain why do you use the expression dynamic objects?

That's mainly because I'm not sure I wired this up correctly for regular schema configuration overlays, I only tested this for types where an arbitary object can be provided. I'm not sure this enables configuring a dot.path schema property.

@A-312
Copy link
Contributor

A-312 commented Jan 1, 2020

I will make a PR with full support of dot path.

bzawisza pushed a commit to bzawisza/node-convict that referenced this pull request Nov 17, 2020
Previously nested constructs containing dot-paths as keys would lead to
a crash like "cannot find configuration param 'dot.path'". With some
careful hacking around paths we can at least enable this use-case for
dynamic objects - it is completely untested/unsupported for regular
overlaying.

Previous PR that was not merged:
mozilla#315
bzawisza pushed a commit to bzawisza/node-convict that referenced this pull request Nov 17, 2020
Previously nested constructs containing dot-paths as keys would lead to
a crash like "cannot find configuration param 'dot.path'". With some
careful hacking around paths we can at least enable this use-case for
dynamic objects - it is completely untested/unsupported for regular
overlaying.

Previous PR that was not merged:
mozilla#315
bzawisza pushed a commit to bzawisza/node-convict that referenced this pull request Nov 18, 2020
Previously nested constructs containing dot-paths as keys would lead to
a crash like "cannot find configuration param 'dot.path'". With some
careful hacking around paths we can at least enable this use-case for
dynamic objects - it is completely untested/unsupported for regular
overlaying.

Previous PR that was not merged:
mozilla#315
bzawisza pushed a commit to bzawisza/node-convict that referenced this pull request Nov 23, 2020
Previously nested constructs containing dot-paths as keys would lead to
a crash like "cannot find configuration param 'dot.path'". With some
careful hacking around paths we can at least enable this use-case for
dynamic objects - it is completely untested/unsupported for regular
overlaying.

Previous PR that was not merged:
mozilla#315
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

Successfully merging this pull request may close these issues.

None yet

4 participants