Skip to content

Dev#61

Merged
flyon merged 16 commits intomainfrom
dev
Apr 6, 2026
Merged

Dev#61
flyon merged 16 commits intomainfrom
dev

Conversation

@flyon
Copy link
Copy Markdown
Contributor

@flyon flyon commented Apr 6, 2026

No description provided.

github-actions Bot and others added 16 commits April 3, 2026 15:18
chore: sync package.json version to 2.4.0 from main
…her missing fields

QueryBuilder.toJSON() was silently dropping where clauses, sort keys,
minus entries, nullSubject, and pendingContextName. This meant any
query with .where() would lose its filter when round-tripping through
JSON serialization.

- Add QueryBuilderSerialization.ts with serialize/deserialize helpers
  for WherePath, SortByPath, RawMinusEntry, and QueryArg types
- Update QueryBuilderJSON type with where, sortBy, minusEntries,
  nullSubject, and pendingContextName fields
- Update toJSON() to evaluate callbacks and serialize all fields
- Update fromJSON() to deserialize and restore all fields via
  pre-evaluated data (_where, _sortBy, _rawMinusEntries)
- Update _buildDirectRawInput() to use pre-evaluated data as fallback
  when callbacks aren't available (i.e. after JSON deserialization)
- Add 18 round-trip serialization tests confirming identical IR output

https://claude.ai/code/session_01P6n2XLm5DSugoa8RWN97yy
…lect

Preloads were the last remaining field not serialized in toJSON(). Fixed by:
- Merging preload entries into the FieldSet at serialization time (same
  merge logic as _buildDirectRawInput), so preloaded component fields
  appear as subSelect entries in the JSON
- Adding preloadSubSelect handling in FieldSet.toJSON() so it serializes
  identically to subSelect (both produce the same IR)
- Adding 3 round-trip tests confirming preload serialization

https://claude.ai/code/session_01P6n2XLm5DSugoa8RWN97yy
- Extract _fieldsWithPreloads() from duplicated preload merge logic
  in toJSON() and _buildDirectRawInput()
- Extract _evaluateMinusEntries() from duplicated minus entry
  evaluation logic, reusing a single proxy instance
- Fix WhereMethods cast from `as any` to `as WhereMethods`
- Remove unused PropertyPath import from QueryBuilderSerialization.ts
- Remove redundant inline comments that restated the code
- Add changeset patch for the toJSON fix

https://claude.ai/code/session_01P6n2XLm5DSugoa8RWN97yy
Add serialization support for QueryBuilder where/sort/minus clauses
WhereMethods, WhereEvaluationPath, WhereAndOr, and AndOrQueryToken
were not reliably exported under CJS/ESM build configs. Replace with
inline structural types cast via WherePath.

https://claude.ai/code/session_01P6n2XLm5DSugoa8RWN97yy
…tion

Fix build errors in QueryBuilderSerialization
The WherePath type was refactored on main (WhereEvaluationPath/WhereAndOr
replaced with WhereExpressionPath/WhereExistsPath). Update serialization
to work with both variants:

- Use `as unknown as` for structural casts that span both type structures
- Add ExistsCondition serialization/deserialization (exists kind)
- Dynamically resolve ExistsCondition constructor for cross-branch compat
- Guard evaluation path with runtime `in` check instead of fallthrough

https://claude.ai/code/session_01P6n2XLm5DSugoa8RWN97yy
Fix build: WherePath compat for both old and new type structures
Refine SPARQL lowering for required outer filter bindings
Fix dev->main merge test expectations
@flyon flyon merged commit bbe8a8f into main Apr 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants