-
Notifications
You must be signed in to change notification settings - Fork 20
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
Lists are handled unintuitively #12
Comments
This would make |
moqmar
added a commit
to moqmar/yaml-merge
that referenced
this issue
May 18, 2020
alexlafroscia
added a commit
that referenced
this issue
Oct 16, 2020
Fix #12 by adding a _.mergeWith customizer function
alexlafroscia
pushed a commit
that referenced
this issue
Oct 16, 2020
BREAKING CHANGE: Arrays are merged, rather than overwritten
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It makes sense, as
.hello[0]
infirst.yml
gets overwritten with.hello[0]
fromsecond.yml
, but when using this to merge e.g. configuration files, most people probably expect something like["world", "alex", "moritz"]
from that. If someone really wants the second behaviour, you could still allow the following YAML file to override values:To implement this, there's https://lodash.com/docs/4.17.15#mergeWith:
The text was updated successfully, but these errors were encountered: