-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(adapter): update createConfig
helper to use deep merge
#38
Conversation
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.
I think this is a good and ergonomic change that makes our stuff 'closer' to playwright! I support it. I noticed one thing I think we'll want to adjust with the typing though
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.
lgtm!
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.
One optional suggestion. Given the small impact of this dependency I don't think it will be a problem but still worth to consider.
9f0c091
to
2893d4b
Compare
2893d4b
to
9b2f8b5
Compare
What is the current behavior?
With the current API, the process of overriding nested object values in the config is tedious. A user either has to use custom override options we create on a type (like
webServerCommand
), or use a.then()
on the helper to update specific values on the generated config.GitHub Issue Number: N/A
What is the new behavior?
The helper will now use a "deep merge" approach for overrides so only the specified properties in an object get changed, not the whole object. So, a call to the helper like:
Will generate the following config:
Documentation
stenciljs/site#1399
Does this introduce a breaking change?
Technically a breaking change, but this is a pre-1.0 experimental package.
Testing
Updated automated tests and confirmed the functionality in a Stencil starter project
Other information