Fix conflict between parent validation and function validation #441
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to splatting
...config
after populating thevalidation
property invalidator.ts
, the parents array would be overwritten whenever the user had avalidation
property in their top-levelconfig
— notably, when function validation is enabled. This PR fixes that issue and makes parent validation work as expected when function validation is turned on. It also adds a test case to explicitly check that this works.The PR also adds support for setting
render: false
on a slot. Previously, therender
attribute for a slot could only be used to change the prop name where the slot appears in the render tree. But there are cases where it's desirable to not have the slot render and be able to manually determine how to handle it in a transform function. I made a one-line change to makerender: false
work, consistent with how therender
property works on regular tag attributes. I also added a marktest case for it.Also increments the version number in
package.json
so that I can push a new release after these fixes land.