-
-
Notifications
You must be signed in to change notification settings - Fork 332
Rewrite event-to-object package
#1306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite event-to-object package
#1306
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
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).