Skip to content

Fix build: WherePath compat for both old and new type structures#63

Merged
flyon merged 1 commit intodevfrom
claude/fix-build-wherepath-compat
Apr 6, 2026
Merged

Fix build: WherePath compat for both old and new type structures#63
flyon merged 1 commit intodevfrom
claude/fix-build-wherepath-compat

Conversation

@flyon
Copy link
Copy Markdown
Contributor

@flyon flyon commented Apr 6, 2026

Summary

  • Fix build errors caused by WherePath type mismatch between dev (old: WhereEvaluationPath | WhereAndOr | WhereExpressionPath) and main (new: WhereExpressionPath | WhereExistsPath)
  • Use as unknown as for structural casts guarded by runtime in checks
  • Add ExistsCondition serialization/deserialization support (dynamically resolved so it compiles on both branches)

Test plan

  • npm run build succeeds
  • Both tsconfig-cjs.json and tsconfig-esm.json compile clean
  • All serialization tests pass

https://claude.ai/code/session_01P6n2XLm5DSugoa8RWN97yy

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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 6, 2026

⚠️ No changeset found. If this PR should trigger a release, run npx changeset and commit the generated file.

If this change doesn't need a release (docs, CI config, etc.), you can ignore this message.

@flyon flyon merged commit eba4115 into dev Apr 6, 2026
4 checks passed
@flyon flyon deleted the claude/fix-build-wherepath-compat branch April 6, 2026 14:25
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