This PR fixes the key matching shortener logic that was preventing deep shortening of the payload.
There are a few significant changes here:
The shortner transform is moved to the beginning of the transforms. There is no point scrubbing data if we are just going to remove it.
A shortener key that ends with a '*' key will not only match everything at that level it will also match all of the children of that key.
The shortener keys are uses to set a "base level" for maxlevel. Each level deep than the shortener key is checked to see if it exceeds the maxlevel. This is only applied if the key matches and ends with a final '*' key.
Because this may have a meaningful change in the frame data we are sending, I think this should be a minor change not a patch. I also think we should release this as a beta initially. This would be v1.1.0-beta0.
Type of change
[x] Bug fix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Maintenance
[ ] New release
Related issues
447
412
Checklists
Development
[x] Lint rules pass locally
[x] The code changed/added as part of this pull request has been covered with tests
[x] All tests related to the changed code pass in development
Code review
[ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
[ ] "Ready for review" label attached to the PR and reviewers assigned
[ ] Issue from task tracker has a link to this pull request
[ ] Changes have been reviewed by at least one other engineer
Description of the change
This PR fixes the key matching shortener logic that was preventing deep shortening of the payload.
There are a few significant changes here:
'*'
key will not only match everything at that level it will also match all of the children of that key.maxlevel
. Each level deep than the shortener key is checked to see if it exceeds themaxlevel
. This is only applied if the key matches and ends with a final'*'
key.Because this may have a meaningful change in the frame data we are sending, I think this should be a minor change not a patch. I also think we should release this as a beta initially. This would be
v1.1.0-beta0
.Type of change
Related issues
447
412
Checklists
Development
Code review