Conversation
481a9a2 to
8403417
Compare
chrisgervang
approved these changes
May 27, 2025
| @@ -34,24 +49,13 @@ export default class JSONConfiguration { | |||
| merge(configuration) { | |||
| for (const key in configuration) { | |||
| switch (key) { | |||
Collaborator
There was a problem hiding this comment.
Is the switch necessary?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR cleans up the JSON module API to make
JSONConfigurationsimpler and more type-safe, updates internal callers to the new shape, and expands tests/docs to cover the new behavior.Compared to
master, this PR:JSONConfigurationaround a single plain-object APIdata-filtertest assertion that was failing in full-suite runsWhat Changed
JSON API cleanup
JSONConfigurationto accept one typed config object instead of mixed or variadic forms.convertFunctionpreProcessClassPropspostProcessConvertedJsonmerge()operate on the same plain-object config shape as the constructor.JSONConverter.mergeConfiguration()to accept plain config objects again.Internal call sites
Tests
JSONConfigurationconstruction and mergingJSONConverter.mergeConfiguration()with plain objectstest/modules/extensions/data-filter.spec.tsto validate only initialized attribute values.Docs
classesand the supported hook fields.Notes
This intentionally favors a cleaner internal/API model over backward compatibility for older external JSON configuration patterns. The in-repo behavior is preserved and now covered by tests.
Validation
yarn build yarn test yarn lint