Rewrite event-to-object package#1306
Merged
Archmonger merged 23 commits intoreactive-python:mainfrom Dec 7, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR completely rewrites the event-to-object JavaScript package to be more robust at handling event properties and DOM serialization. The rewrite moves from a type-specific approach to a generic recursive object conversion approach.
Key changes:
- Complete rewrite of event-to-object package with generic object-to-JSON conversion
- Migration from
uvutovitest/bun:testtesting framework - Addition of comprehensive tests for recursion handling, file inputs, and DOM properties
- Python code cleanup (alphabetical slot ordering, hash implementation fixes)
- CI/configuration improvements (test environment setup, JavaScript test re-enabling)
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/js/packages/event-to-object/src/index.ts | Complete rewrite with generic recursive conversion logic, cycle detection, and depth limiting |
| src/js/packages/event-to-object/tests/*.ts | New comprehensive test suite with vitest, including recursion, file inputs, and DOM property tests |
| src/js/packages/event-to-object/package.json | Version bump to 1.0.0, author change, dependency updates (vitest, happy-dom 15.0.0) |
| src/js/packages/event-to-object/vitest.config.ts | New vitest configuration for test environment |
| tests/conftest.py | Fix for nested Hatch environment issue with HATCH_ENV_ACTIVE |
| src/reactpy/utils.py | Added __hash__ = None to Ref class for proper hashability |
| src/reactpy/core/events.py | Added __hash__ = None to EventHandler, refactored eq method |
| src/reactpy/core/hooks.py | Alphabetically ordered slots in _CurrentState and _Memo |
| src/reactpy/core/component.py | Alphabetically ordered slots in Component |
| src/reactpy/web/utils.py | Removed unused version variable assignment |
| pyproject.toml | Changed test dependencies to use features, simplified JS test command, added PLC0415 lint ignore |
| .github/workflows/check.yml | Re-enabled JavaScript tests (removed temporary disable) |
| .github/workflows/.hatch-run.yml | Removed uv from pip install dependencies |
| docs/source/about/changelog.rst | Added changelog entry for the rewrite |
| src/js/bun.lockb | Updated lockfile with new dependencies |
Archmonger
added a commit
that referenced
this pull request
Dec 7, 2025
Archmonger
added a commit
that referenced
this pull request
Dec 7, 2025
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.
Description
event_to_objectpackage #1196Checklist
Please update this checklist as you complete each item:
By submitting this pull request I agree that all contributions comply with this project's open source license(s).