Skip to content

Releases: pmndrs/valtio

v1.12.1

28 Nov 01:42
Compare
Choose a tag to compare

Some improvements in valtio/utils.

What's Changed

  • fix(utils): useProxy to avoid re-renders when no props are touched by @dai-shi in #809
  • feat: Support promise in watch util by @LiamMartens in #825

New Contributors

Full Changelog: v1.12.0...v1.12.1

v1.12.0

03 Nov 02:07
Compare
Choose a tag to compare

This version moves derive to a dependency. Please open a new discussion if you find some problems.

What's Changed

New Contributors

Full Changelog: v1.11.3...v1.12.0

v1.11.3

23 Oct 02:52
Compare
Choose a tag to compare

This fixes some edge cases.

What's Changed

New Contributors

Full Changelog: v1.11.2...v1.11.3

v1.11.2

12 Aug 11:30
Compare
Choose a tag to compare

This improves some TypeScript issues.

What's Changed

  • fix: declare @types/react as peerDep to avoid phantom dep by @wjw99830 in #769
  • fix(utils): improve devtools typing to avoid depending on @redux-devtools/extension by @fukumasuya in #777

New Contributors

Full Changelog: v1.11.1...v1.11.2

v1.11.1

27 Jul 01:38
Compare
Choose a tag to compare

This reverts the change made in v1.11.0, which turns out to be troublesome for RN users.

It's basically the same as v1.10.7.

git diff v1.10.7...v1.11.1 src
diff --git a/src/vanilla.ts b/src/vanilla.ts
index dc19c87..86faef8 100644
--- a/src/vanilla.ts
+++ b/src/vanilla.ts
@@ -60,7 +60,7 @@ type ProxyState = readonly [
   target: object,
   ensureVersion: (nextCheckVersion?: number) => number,
   createSnapshot: CreateSnapshot,
-  addListener: AddListener
+  addListener: AddListener,
 ]
 
 // shared state
diff --git a/src/vanilla/utils/derive.ts b/src/vanilla/utils/derive.ts
index 832f542..c9af01a 100644
--- a/src/vanilla/utils/derive.ts
+++ b/src/vanilla/utils/derive.ts
@@ -16,7 +16,7 @@ type SourceObjectEntry = [
   subscriptions: Set<Subscription>,
   unsubscribe: () => void,
   pendingCount: number,
-  pendingCallbacks: Set<() => void>
+  pendingCallbacks: Set<() => void>,
 ]
 
 type DerivedObjectEntry = [subscriptions: Set<Subscription>]
diff --git a/src/vanilla/utils/proxyWithComputed.ts b/src/vanilla/utils/proxyWithComputed.ts
index 076d11b..f6d47a2 100644
--- a/src/vanilla/utils/proxyWithComputed.ts
+++ b/src/vanilla/utils/proxyWithComputed.ts
@@ -8,7 +8,7 @@ import type { INTERNAL_Snapshot as Snapshot } from '../../vanilla.ts'
  */
 export function proxyWithComputed_DEPRECATED<
   T extends object,
-  U extends object
+  U extends object,
 >(
   initialObject: T,
   computedFns: {

What's Changed

Full Changelog: v1.11.0...v1.11.1

v1.11.0

20 Jul 06:52
Compare
Choose a tag to compare

This adds a new behavior to trap defineProperty for certain cases.

What's Changed

  • feat(vanilla): Support class fields (defineProperty) by @pastelmind in #760

New Contributors

Full Changelog: v1.10.7...v1.11.0

v1.10.7

10 Jul 14:41
Compare
Choose a tag to compare

Some improvements for edge cases.

What's Changed

  • fix(vanilla): Snapshot ignores branded primitive types by @pastelmind in #748
  • fix(vanilla): Prevent adding new property on snapshot by @pastelmind in #752

New Contributors

Full Changelog: v1.10.6...v1.10.7

v1.10.6

21 Jun 11:57
Compare
Choose a tag to compare

It comes with some improvements.

What's Changed

  • Allow passthrough of Redux devtools options by @sarimarton in #713
  • fix(proxyWithHistory): ref-aware deep clone by @dai-shi in #727
  • fix(build): mode env for "import" condition" by @dai-shi in #734

New Contributors

Full Changelog: v1.10.5...v1.10.6

v1.10.5

04 May 14:58
Compare
Choose a tag to compare

This may improve performance in some edge cases.

What's Changed

New Contributors

Full Changelog: v1.10.4...v1.10.5

v1.10.4

04 Apr 05:00
Compare
Choose a tag to compare

The first one is a small improvement/fix. The second one is hoping to to support Deno, but unconfirmed.

What's Changed

New Contributors

Full Changelog: v1.10.3...v1.10.4