pr-1-feedback #2

Merged
lentil merged 10 commits from pr-1-feedback into main 2025-06-15 14:26:31 -05:00

10 Commits

Author SHA1 Message Date
6c13f46714
fix(negation): improve negation chain handling and clean up logging
- Refactored isDeltaNegated to properly handle complex negation chains
- Added recursive negation detection to account for negations of negations
- Replaced console.log with debug statements in tests
- Improved test coverage and documentation
- Fixed TypeScript type issues
2025-06-15 14:15:49 -05:00
4b750c593d
feat(query): validate JSON Logic operators and improve error handling
- Add validation for JSON Logic operators in query filters
- Throw InvalidQueryOperatorError for invalid operators
- Improve error handling and logging in applyJsonLogicFilter
- Update tests to verify new error handling behavior
- Fix TypeScript linting issues and improve code style
2025-06-15 14:15:49 -05:00
51d336b88b
feat: handle undefined values in custom resolvers
- Update ResolverPlugin interface to allow resolve() to return undefined
- Modify CustomResolver to skip properties with undefined values
- Add test case for resolvers that return undefined
- Update existing tests to handle cases where no properties are resolved

This change makes the behavior more explicit when resolvers don't return a value,
which is particularly important for numeric aggregations where 0 might be a valid result.
2025-06-15 14:15:48 -05:00
d5cc436bcb
chore: remove unused _RhizomeImports from test files
- Removed unused _RhizomeImports from:
  - __tests__/compose-decompose.ts
  - __tests__/transactions.ts
  - __tests__/negation.ts
- All tests continue to pass after removal
2025-06-15 14:15:48 -05:00
35bbc974d8
refactor: move common resolve logic to base Lossy class
- Moved the resolve method implementation from individual resolvers to the base Lossy class
- Updated initializer methods to accept a LosslessViewOne parameter
- Removed redundant resolve methods from LastWriteWins, TimestampResolver, CustomResolver, and AggregationResolver
- Ensured consistent behavior across all resolver implementations
- All tests passing with the refactored code
2025-06-15 14:15:48 -05:00
dd8987563a
Fix recursion depth test validity
Previosly a failure to correctly limit the depth might not be detected
2025-06-15 14:15:47 -05:00
885630f4d9
refactor: move CommonSchemas to test-utils
- Moved CommonSchemas from src/schema/schema.ts to src/test-utils/schemas.ts
- Updated all test files to import CommonSchemas from the new location
- Fixed the Document schema to match test expectations by making the author field required
- Added additional fields to the Document schema to match the original implementation
- Ensured all tests pass with the new implementation

Addresses PR feedback that CommonSchemas is only used in tests and should be moved to test files.
2025-06-15 14:15:47 -05:00
08fb5778ba
fix: update comment about LastWriteWins tie-breaking algorithm
Addresses PR feedback about the outdated comment in concurrent-writes.ts. The comment now accurately reflects that the resolution uses the LastWriteWins resolver's tie-breaking algorithm rather than delta processing order.
2025-06-15 14:15:46 -05:00
91514289ae
Entity conforms to schema if it has all required properties, not just some 2025-06-15 14:15:46 -05:00
ada27ff1b0
removed data/ and test-data/ from repo 2025-06-15 14:15:46 -05:00