Skip to content

Conversation

@s524797336
Copy link

Summary

1. Enable per-proxy granularity for unstable_enableOp

  • Problem: Previously, unstable_enableOp functioned as a global static toggle. Once enabled, it affected all proxies globally, making it impossible to isolate operation tracking for specific state objects.
  • Solution: The enableOp state is now captured at the moment of proxy() initialization.
  • Behavior: Only proxies created while the toggle is true will include the op parameter in their subscription callbacks. This allows for fine-grained control over performance and debugging metadata.
  • Example:
unstable_enableOp(true)
const obj1 = proxy({ count: 0 }) // Op enabled for obj1

unstable_enableOp(false)
const obj2 = proxy({ count: 0 }) // Op disabled for obj2

2. DX (Developer Experience) Improvements

  • Test Environment: Switched from jsdom to happy-dom for the test suite to resolve local environment compatibility issues and improve execution speed. I cannot get jsdom running.

Checklist

  • pnpm run fix executed for code/docs formatting and linting.
  • Verified that existing tests pass with the new granular logic.

@vercel
Copy link

vercel bot commented Jan 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
valtio Ready Ready Preview, Comment Jan 16, 2026 10:51am

Review with Vercel Agent

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 16, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

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