Skip to content

Conversation

@Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Dec 5, 2025

Description

Checklist

Please update this checklist as you complete each item:

  • Tests have been developed for bug fixes or new functionality.
  • The changelog has been updated, if necessary.
  • Documentation has been updated, if necessary.
  • GitHub Issues closed by this PR have been linked.

By submitting this pull request I agree that all contributions comply with this project's open source license(s).

@Archmonger Archmonger marked this pull request as ready for review December 6, 2025 14:57
Copy link

Copilot AI left a 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 uvu to vitest/bun:test testing 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 Archmonger merged commit af2ca22 into reactive-python:main Dec 7, 2025
20 checks passed
@Archmonger Archmonger deleted the rewrite-event-to-object branch December 7, 2025 06:36
Archmonger added a commit that referenced this pull request Dec 7, 2025
Archmonger added a commit that referenced this pull request Dec 7, 2025
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.

Rewrite event_to_object package

1 participant