Skip to content

fix(sdk): align context update types across browser React and Vue - #772

Draft
roncohen wants to merge 1 commit into
mainfrom
fix/context-update-types
Draft

roncohen wants to merge 1 commit into
mainfrom
fix/context-update-types

Conversation

@roncohen

Copy link
Copy Markdown
Contributor

Summary

Fix a pre-existing mismatch between JSON-compatible context types and the narrower context update APIs. Split out of #770; no flag event changes are included.

  • Accept typed UserContext/CompanyContext values and partial updates in the browser SDK while preserving string/number IDs.
  • Derive React/Vue update-hook parameters from the browser methods so their types stay consistent.
  • Align other-context updates and deprecated provider props with the existing context types.
  • Add runtime/type coverage and patch changesets for browser, React, and Vue.

No JSON serialization or runtime context-merge behavior changes.

Validation

Validated independently on a branch based on main:

  • Browser SDK: 194 tests passed, excluding test/sse.test.ts.
  • React SDK: 65 tests passed.
  • Vue SDK: 13 tests passed.
  • Browser source TypeScript check and production bundles passed, with declarations restricted to source files.
  • React/Vue type tests and production builds passed.
  • Oxlint, formatting, and git diff --check passed.

The existing SSE tests have seven constructor-mock failures under the local Vitest 3.2.6 installation. No SSE source, tests, or repository test configuration were changed.

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.

1 participant