Skip to content

Conversation

overthemike
Copy link
Collaborator

@overthemike overthemike commented Sep 15, 2025

Related Bug Reports or Discussions

#1165
Fixes #1165

Reverts #1074

Summary

Added deepProxy function and reverted deepClone back to original form. Split the tests for deepProxy and deepClone into different test files.

Check List

  • [ x ] pnpm run fix for formatting and linting code and docs

Copy link

vercel bot commented Sep 15, 2025

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

Project Deployment Preview Comments Updated (UTC)
valtio Ready Ready Preview Comment Sep 25, 2025 3:36am

Copy link

codesandbox-ci bot commented Sep 15, 2025

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.

Copy link

pkg-pr-new bot commented Sep 15, 2025

More templates

npm i https://pkg.pr.new/valtio@1169

commit: 99ff603

Copy link

github-actions bot commented Sep 15, 2025

Size Change: +671 B (+4.88%) 🔍

Total Size: 14.4 kB

Filename Size Change
./dist/esm/vanilla/utils.mjs 3.56 kB +329 B (+10.18%) ⚠️
./dist/vanilla/utils.js 3.6 kB +342 B (+10.48%) ⚠️
ℹ️ View Unchanged
Filename Size
./dist/esm/index.mjs 63 B
./dist/esm/react.mjs 694 B
./dist/esm/react/utils.mjs 257 B
./dist/esm/utils.mjs 68 B
./dist/esm/vanilla.mjs 2.34 kB
./dist/index.js 243 B
./dist/react.js 686 B
./dist/react/utils.js 278 B
./dist/utils.js 248 B
./dist/vanilla.js 2.38 kB

compressed-size-action

@overthemike
Copy link
Collaborator Author

I still need to do the documentation and it could use a few more tests. Wanted to push the code up first to get feedback first.

@dai-shi
Copy link
Member

dai-shi commented Sep 16, 2025

Added deepProxy function and reverted deepClone back to original form.

Thanks. This feels more comfortable and I think we could deprecate deepClone in the near future.

@overthemike
Copy link
Collaborator Author

I added tests and updated some docs for new exports from proxyMap/proxySet. Only thing left really is adding documentation for deepProxy. I'm wondering if we should add it as it's own small page within utils like proxyMap and proxySet have. I think it depends on if this is something we're going to want to keep around or if we eventually would like to deprecate it like we will with deepClone. @dai-shi thoughts?

@dai-shi
Copy link
Member

dai-shi commented Sep 24, 2025

I think it depends on if this is something we're going to want to keep around or if we eventually would like to deprecate it like we will with deepClone.

I think it's something to keep around, but I'm not very sure.
So, what I would do is to name it unstable_deepProxy, and add it to doc. And we hope to get feedback.

@overthemike
Copy link
Collaborator Author

Added page for unstable_deepProxy to the docs and updated a few other places. I think this should be good to go.

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dai-shi dai-shi merged commit 8a057d5 into main Sep 25, 2025
33 checks passed
@dai-shi dai-shi deleted the 1165 branch September 25, 2025 09:18
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.

2 participants