@exodus/atoms 5.7.0 → 5.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,302 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [5.7.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.7.1...@exodus/atoms@5.7.2) (2023-10-12)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **warn:** avoid android freeze due to JSON.stringify ([#4414](https://github.com/ExodusMovement/exodus-hydra/issues/4414)) ([b7fe284](https://github.com/ExodusMovement/exodus-hydra/commit/b7fe284573a2203bdf4753def4eddecfc6e50bec))
11
+
12
+ ## [5.7.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.7.0...@exodus/atoms@5.7.1) (2023-09-20)
13
+
14
+ ### Bug Fixes
15
+
16
+ - don't emit same obj ([#4148](https://github.com/ExodusMovement/exodus-hydra/issues/4148)) ([2d4db15](https://github.com/ExodusMovement/exodus-hydra/commit/2d4db15947b8888740bbc6df8c8677e5799dcd47))
17
+
18
+ ## [5.7.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.6.0...@exodus/atoms@5.7.0) (2023-09-07)
19
+
20
+ ### Features
21
+
22
+ - avoid notifying on unchanged values in dedupe ([#3876](https://github.com/ExodusMovement/exodus-hydra/issues/3876)) ([6cefcab](https://github.com/ExodusMovement/exodus-hydra/commit/6cefcab4ee01d45eecefac3d18a8aca18cbfe268))
23
+ - register atom observers on creation ([#3893](https://github.com/ExodusMovement/exodus-hydra/issues/3893)) ([19a21af](https://github.com/ExodusMovement/exodus-hydra/commit/19a21afd55f475a49284c4e82f72738df3dfd23c))
24
+
25
+ ## [5.6.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.5.0...@exodus/atoms@5.6.0) (2023-08-29)
26
+
27
+ ### Features
28
+
29
+ - add optimisticNotifier enhancer ([#3669](https://github.com/ExodusMovement/exodus-hydra/issues/3669)) ([19e194b](https://github.com/ExodusMovement/exodus-hydra/commit/19e194b9d3b9fa9ff7ef4da86e8064d518f48a27))
30
+
31
+ ### Bug Fixes
32
+
33
+ - always get source value when no subscribers ([#3694](https://github.com/ExodusMovement/exodus-hydra/issues/3694)) ([a6ce256](https://github.com/ExodusMovement/exodus-hydra/commit/a6ce256ece91088f636e1d32db5b75621449302a))
34
+
35
+ ## [5.5.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.4.0...@exodus/atoms@5.5.0) (2023-08-14)
36
+
37
+ ### Features
38
+
39
+ - add atom observer factory ([#3308](https://github.com/ExodusMovement/exodus-hydra/issues/3308)) ([8407db8](https://github.com/ExodusMovement/exodus-hydra/commit/8407db824160fb6a89efd93c998d7c3448403719))
40
+
41
+ ## [5.4.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.3.0...@exodus/atoms@5.4.0) (2023-08-01)
42
+
43
+ ### Features
44
+
45
+ - shallow compare in compute ([#3061](https://github.com/ExodusMovement/exodus-hydra/issues/3061)) ([1a02017](https://github.com/ExodusMovement/exodus-hydra/commit/1a020179baeba69e0d662b171cb62106b1ace15c))
46
+
47
+ ## [5.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.2.3...@exodus/atoms@5.3.0) (2023-07-27)
48
+
49
+ ### Features
50
+
51
+ - remove limit for listeners on memory atoms ([#2982](https://github.com/ExodusMovement/exodus-hydra/issues/2982)) ([06a09e1](https://github.com/ExodusMovement/exodus-hydra/commit/06a09e179bb147a081461d15a380261e48a2d558))
52
+
53
+ ## [5.2.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.2.2...@exodus/atoms@5.2.3) (2023-07-21)
54
+
55
+ ### Bug Fixes
56
+
57
+ - dedupe to avoid fn form of set() for undefined values ([#2821](https://github.com/ExodusMovement/exodus-hydra/issues/2821)) ([2561416](https://github.com/ExodusMovement/exodus-hydra/commit/2561416b5e769f81b492ec5da4b37af6914ca0da))
58
+
59
+ ## [5.2.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.2.1...@exodus/atoms@5.2.2) (2023-07-18)
60
+
61
+ ### Bug Fixes
62
+
63
+ - **combine:** unsubscribe source atoms when no observers left ([#2208](https://github.com/ExodusMovement/exodus-hydra/issues/2208)) ([bb016ae](https://github.com/ExodusMovement/exodus-hydra/commit/bb016ae78bf81fed7b6a8beaa7469bc49d5f4d5b))
64
+ - storage atom wait write operation ([#2679](https://github.com/ExodusMovement/exodus-hydra/issues/2679)) ([1581f1e](https://github.com/ExodusMovement/exodus-hydra/commit/1581f1e2e5246ccecc6da73b6513c8e20142d609))
65
+
66
+ ## [5.2.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.2.0...@exodus/atoms@5.2.1) (2023-06-30)
67
+
68
+ ### Bug Fixes
69
+
70
+ - make atom.set concurrent ([#2182](https://github.com/ExodusMovement/exodus-hydra/issues/2182)) ([6e36f93](https://github.com/ExodusMovement/exodus-hydra/commit/6e36f93276c0d1d69092e62ba2aa3b97af7f10ef))
71
+
72
+ ## [5.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.1.0...@exodus/atoms@5.2.0) (2023-06-23)
73
+
74
+ ### Features
75
+
76
+ - **compute:** remove second argument of callback ([#2080](https://github.com/ExodusMovement/exodus-hydra/issues/2080)) ([4a42ab6](https://github.com/ExodusMovement/exodus-hydra/commit/4a42ab687f74496719d166f13bd2eaa3730fb9b6))
77
+
78
+ ## [5.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.0.0...@exodus/atoms@5.1.0) (2023-06-21)
79
+
80
+ ### Features
81
+
82
+ - add dedupe enhancer ([#2075](https://github.com/ExodusMovement/exodus-hydra/issues/2075)) ([e704008](https://github.com/ExodusMovement/exodus-hydra/commit/e704008818bdc057a7e94e97de4ff3085776660d))
83
+
84
+ ## [5.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@4.0.1...@exodus/atoms@5.0.0) (2023-06-21)
85
+
86
+ ### ⚠ BREAKING CHANGES
87
+
88
+ - remove fusion atom factory (#1983)
89
+ - remove local config factory (#1954)
90
+
91
+ ### Features
92
+
93
+ - remove fusion atom factory ([#1983](https://github.com/ExodusMovement/exodus-hydra/issues/1983)) ([171e741](https://github.com/ExodusMovement/exodus-hydra/commit/171e7413479b8a8447d905af802aab29300b886b))
94
+
95
+ ### Bug Fixes
96
+
97
+ - don't emit identical object again ([#2025](https://github.com/ExodusMovement/exodus-hydra/issues/2025)) ([e9ac6e4](https://github.com/ExodusMovement/exodus-hydra/commit/e9ac6e492cb0ea7293de62d5e6af500de15c429b))
98
+ - enforceObservableRules race conditions ([#2013](https://github.com/ExodusMovement/exodus-hydra/issues/2013)) ([a61be64](https://github.com/ExodusMovement/exodus-hydra/commit/a61be644755c12eab7e60de5590ca3e12001816b))
99
+ - get()/observe() race condition, difference statefulness ([#1975](https://github.com/ExodusMovement/exodus-hydra/issues/1975)) ([2bfacca](https://github.com/ExodusMovement/exodus-hydra/commit/2bfacca76d209707dd33e954b9bd636f8aba90d0))
100
+ - support function in `set` on `withSerialization` atom ([#2017](https://github.com/ExodusMovement/exodus-hydra/issues/2017)) ([e1240be](https://github.com/ExodusMovement/exodus-hydra/commit/e1240bed498249d5e730a6c35f6e188cf11d7a82))
101
+
102
+ ### Performance Improvements
103
+
104
+ - dont set same value on observable again ([#2007](https://github.com/ExodusMovement/exodus-hydra/issues/2007)) ([3582c76](https://github.com/ExodusMovement/exodus-hydra/commit/3582c76fcfaebfc447c5ceb4d8be73ab28286047))
105
+
106
+ ### Code Refactoring
107
+
108
+ - remove local config factory ([#1954](https://github.com/ExodusMovement/exodus-hydra/issues/1954)) ([77645a0](https://github.com/ExodusMovement/exodus-hydra/commit/77645a049829072339be9f1b16568605183d1106))
109
+
110
+ ## [4.0.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@4.0.0...@exodus/atoms@4.0.1) (2023-06-13)
111
+
112
+ ### Bug Fixes
113
+
114
+ - swallowObserverErrors and warnOnSameValueSet to avoid hanging atom.set() calls ([#1917](https://github.com/ExodusMovement/exodus-hydra/issues/1917)) ([a8e6d16](https://github.com/ExodusMovement/exodus-hydra/commit/a8e6d168495ba6876542a32136c88b1a5b6a9c77))
115
+
116
+ ## [4.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.7.0...@exodus/atoms@4.0.0) (2023-06-12)
117
+
118
+ ### ⚠ BREAKING CHANGES
119
+
120
+ - swallowObserverErrors enhancer (#1889)
121
+ - warnOnSameValueSet enhancer (#1888)
122
+
123
+ ### Features
124
+
125
+ - swallowObserverErrors enhancer ([#1889](https://github.com/ExodusMovement/exodus-hydra/issues/1889)) ([1de1d05](https://github.com/ExodusMovement/exodus-hydra/commit/1de1d05cf33c1d1f2e5a6fdc0b9b1c894eb61749))
126
+ - timeout-observers enhancer ([#1890](https://github.com/ExodusMovement/exodus-hydra/issues/1890)) ([8528e4a](https://github.com/ExodusMovement/exodus-hydra/commit/8528e4a611c7c0ccc504f93e0bda36be281f88cd))
127
+ - warnOnSameValueSet enhancer ([#1888](https://github.com/ExodusMovement/exodus-hydra/issues/1888)) ([1504173](https://github.com/ExodusMovement/exodus-hydra/commit/15041732533988d5e85ad584499972de727938a8))
128
+
129
+ ## [3.7.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.6.0...@exodus/atoms@3.7.0) (2023-06-06)
130
+
131
+ ### Features
132
+
133
+ - add option to warn on same value set ([#1797](https://github.com/ExodusMovement/exodus-hydra/issues/1797)) ([47f749d](https://github.com/ExodusMovement/exodus-hydra/commit/47f749d495c53bf624b7169a86938079b8217965))
134
+
135
+ ## [3.6.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.5.3...@exodus/atoms@3.6.0) (2023-05-25)
136
+
137
+ ### Features
138
+
139
+ - support fn in atom.set(), a la react's setState ([#1691](https://github.com/ExodusMovement/exodus-hydra/issues/1691)) ([2aba2c1](https://github.com/ExodusMovement/exodus-hydra/commit/2aba2c106dfec5d847f0875ed660f4e7f42f7c60))
140
+
141
+ ## [3.5.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.5.2...@exodus/atoms@3.5.3) (2023-05-12)
142
+
143
+ ### Bug Fixes
144
+
145
+ - don't emit from atom till value resolved ([#1607](https://github.com/ExodusMovement/exodus-hydra/issues/1607)) ([fa54352](https://github.com/ExodusMovement/exodus-hydra/commit/fa54352c665bb2e1c43943f9a64697f669caaedb))
146
+ - master ci ([#1613](https://github.com/ExodusMovement/exodus-hydra/issues/1613)) ([44e3063](https://github.com/ExodusMovement/exodus-hydra/commit/44e306304338d5ce3cbc21757b6b3e91f5d95210))
147
+
148
+ ## [3.5.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.5.1...@exodus/atoms@3.5.2) (2023-05-04)
149
+
150
+ ### Bug Fixes
151
+
152
+ - wait till value defined ([#1520](https://github.com/ExodusMovement/exodus-hydra/issues/1520)) ([f0a657f](https://github.com/ExodusMovement/exodus-hydra/commit/f0a657ff9b0e571fc048f1e10da5a51ad3c2e431))
153
+
154
+ ## [3.5.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.5.0...@exodus/atoms@3.5.1) (2023-04-25)
155
+
156
+ **Note:** Version bump only for package @exodus/atoms
157
+
158
+ ## [3.5.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.4.1...@exodus/atoms@3.5.0) (2023-04-24)
159
+
160
+ ### Features
161
+
162
+ - add sequenced keystore atom factory ([#1324](https://github.com/ExodusMovement/exodus-hydra/issues/1324)) ([6267665](https://github.com/ExodusMovement/exodus-hydra/commit/62676651a5bd9bbbf304acc09510c1bd89219f2b))
163
+
164
+ ## [3.4.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.4.0...@exodus/atoms@3.4.1) (2023-04-19)
165
+
166
+ ### Bug Fixes
167
+
168
+ - combine atoms enhancer ([#1296](https://github.com/ExodusMovement/exodus-hydra/issues/1296)) ([2b8de0d](https://github.com/ExodusMovement/exodus-hydra/commit/2b8de0dcec4ecbe5dd5e67f416835c3b687318f2))
169
+
170
+ ## [3.4.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.3.0...@exodus/atoms@3.4.0) (2023-04-18)
171
+
172
+ ### Features
173
+
174
+ - keystore atom ([#1286](https://github.com/ExodusMovement/exodus-hydra/issues/1286)) ([de02008](https://github.com/ExodusMovement/exodus-hydra/commit/de02008c67ffc28879d64b5a58b55194e15ab53d))
175
+
176
+ ## [3.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.2.0...@exodus/atoms@3.3.0) (2023-04-10)
177
+
178
+ ### Features
179
+
180
+ - atom/waitUntil ([#1142](https://github.com/ExodusMovement/exodus-hydra/issues/1142)) ([4432b3c](https://github.com/ExodusMovement/exodus-hydra/commit/4432b3c645f37fc1de002b845c4253a684235d3e))
181
+
182
+ ## [3.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.1.0...@exodus/atoms@3.2.0) (2023-03-31)
183
+
184
+ ### Features
185
+
186
+ - add seedDerivedId atom ([#1071](https://github.com/ExodusMovement/exodus-hydra/issues/1071)) ([05befdb](https://github.com/ExodusMovement/exodus-hydra/commit/05befdb525de7925b4bb5f0b544adbfeaf4641e3))
187
+
188
+ ## [3.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@3.0.0...@exodus/atoms@3.1.0) (2023-03-17)
189
+
190
+ ### Features
191
+
192
+ - support selector for remote-config atom ([#990](https://github.com/ExodusMovement/exodus-hydra/issues/990)) ([b4e7a3f](https://github.com/ExodusMovement/exodus-hydra/commit/b4e7a3f885b33ae7fe8d738e7ad95a80702df145))
193
+
194
+ ## [3.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.10.0...@exodus/atoms@3.0.0) (2023-02-20)
195
+
196
+ ### ⚠ BREAKING CHANGES
197
+
198
+ - enabled-assets to module/ atoms/ folders and auto-binding config (#801)
199
+
200
+ ### Features
201
+
202
+ - add `restricted-imports` eslint rule ([#719](https://github.com/ExodusMovement/exodus-hydra/issues/719)) ([175de9c](https://github.com/ExodusMovement/exodus-hydra/commit/175de9c19ec00e5a12441022c313837d58f38882))
203
+
204
+ ### Bug Fixes
205
+
206
+ - **atoms:** don't double proxy-freeze on observe init ([#797](https://github.com/ExodusMovement/exodus-hydra/issues/797)) ([1ea428f](https://github.com/ExodusMovement/exodus-hydra/commit/1ea428f159974c96898415cc71422c572c6ba84a))
207
+ - combine atom shouldn't mutate ([#910](https://github.com/ExodusMovement/exodus-hydra/issues/910)) ([b7292cf](https://github.com/ExodusMovement/exodus-hydra/commit/b7292cfa033f3e1e396b4f0e5913ca347995c6cd))
208
+
209
+ ### Code Refactoring
210
+
211
+ - enabled-assets to module/ atoms/ folders and auto-binding config ([#801](https://github.com/ExodusMovement/exodus-hydra/issues/801)) ([24fe279](https://github.com/ExodusMovement/exodus-hydra/commit/24fe279ab1e0aeb4f557e4f5f6e841179cfd8c0e))
212
+
213
+ ## [2.10.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.9.1...@exodus/atoms@2.10.0) (2022-12-21)
214
+
215
+ ### Features
216
+
217
+ - add test for observe ([#595](https://github.com/ExodusMovement/exodus-hydra/issues/595)) ([279e14c](https://github.com/ExodusMovement/exodus-hydra/commit/279e14c76b4161dc1d6ce78af31dd9b8ff11c2f8))
218
+ - read-only atom enhancer ([#564](https://github.com/ExodusMovement/exodus-hydra/issues/564)) ([df83983](https://github.com/ExodusMovement/exodus-hydra/commit/df83983aad1678af7f69e13c7ca5e2edce72a3a0))
219
+ - use 'events' from node_modules ([#635](https://github.com/ExodusMovement/exodus-hydra/issues/635)) ([3f8376](https://github.com/ExodusMovement/exodus-hydra/commit/3f8376c760d7ca213345c9015562ac76eb205cb5))
220
+
221
+ ## [2.9.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.9.0...@exodus/atoms@2.9.1) (2022-12-02)
222
+
223
+ ### Bug Fixes
224
+
225
+ - export blockUntil from index ([e181d6c](https://github.com/ExodusMovement/exodus-hydra/commit/e181d6c219325a3d9bac1dabd4fbac0251049ce2))
226
+
227
+ ## [2.9.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.8.0...@exodus/atoms@2.9.0) (2022-12-02)
228
+
229
+ ### Features
230
+
231
+ - add blockUntil enhancer ([#557](https://github.com/ExodusMovement/exodus-hydra/issues/557)) ([ca69c6d](https://github.com/ExodusMovement/exodus-hydra/commit/ca69c6debeb05c31cbf6fb7dc4617b78526d42e6))
232
+
233
+ ## [2.8.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.7.0...@exodus/atoms@2.8.0) (2022-12-01)
234
+
235
+ ### Features
236
+
237
+ - combine atom ([#472](https://github.com/ExodusMovement/exodus-hydra/issues/472)) ([bd005a8](https://github.com/ExodusMovement/exodus-hydra/commit/bd005a893a126c360bb153c8e9309e9a63e14a14))
238
+
239
+ ## [2.7.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.6.0...@exodus/atoms@2.7.0) (2022-11-29)
240
+
241
+ ### Features
242
+
243
+ - allow in-memory atom without default ([#526](https://github.com/ExodusMovement/exodus-hydra/issues/526)) ([dfbb1a7](https://github.com/ExodusMovement/exodus-hydra/commit/dfbb1a703ed1be380c7cd881057e5dff4f55d3ba))
244
+
245
+ ## [2.6.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.5.1...@exodus/atoms@2.6.0) (2022-11-18)
246
+
247
+ ### Features
248
+
249
+ - add disabledAssets Atom to handle disabled unverified tokens ([#480](https://github.com/ExodusMovement/exodus-hydra/issues/480)) ([c69f575](https://github.com/ExodusMovement/exodus-hydra/commit/c69f57594c28879de9de4308ff71ae8c983f0a6d))
250
+
251
+ ## [2.5.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.5.0...@exodus/atoms@2.5.1) (2022-11-02)
252
+
253
+ ### Bug Fixes
254
+
255
+ - remove async from observe ([#403](https://github.com/ExodusMovement/exodus-hydra/issues/403)) ([fdcad8c](https://github.com/ExodusMovement/exodus-hydra/commit/fdcad8c7ddad0f304d331c963c4522a39413f55f))
256
+
257
+ ### Performance Improvements
258
+
259
+ - cache values of storage atom if sole writer ([#399](https://github.com/ExodusMovement/exodus-hydra/issues/399)) ([5c065c9](https://github.com/ExodusMovement/exodus-hydra/commit/5c065c94d6e2922b152fcfd64da1cc7ee6d04d0d))
260
+
261
+ ## [2.5.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.4.0...@exodus/atoms@2.5.0) (2022-10-27)
262
+
263
+ ### Features
264
+
265
+ - add difference enhancer ([#380](https://github.com/ExodusMovement/exodus-hydra/issues/380)) ([8ff7a7d](https://github.com/ExodusMovement/exodus-hydra/commit/8ff7a7d9cd6d92e735d07f6904f0998f1b0c99fe))
266
+
267
+ ## [2.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.2.1...@exodus/atoms@2.3.0) (2022-10-03)
268
+
269
+ ### Features
270
+
271
+ - enabledAssetsAtom ([#265](https://github.com/ExodusMovement/exodus-hydra/issues/265)) ([cb3fe91](https://github.com/ExodusMovement/exodus-hydra/commit/cb3fe91d353945b812e34158872627d24d6f796e))
272
+
273
+ ## [2.2.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.2.0...@exodus/atoms@2.2.1) (2022-08-22)
274
+
275
+ ### Bug Fixes
276
+
277
+ - atoms package released files ([#194](https://github.com/ExodusMovement/exodus-hydra/issues/194)) ([ba90ab3](https://github.com/ExodusMovement/exodus-hydra/commit/ba90ab33ec02e7cd0b1b6367b045db34e278c700))
278
+
279
+ ## [2.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.1.0...@exodus/atoms@2.2.0) (2022-08-22)
280
+
281
+ ### Features
282
+
283
+ - add compute and serialization atom enhancers ([#189](https://github.com/ExodusMovement/exodus-hydra/issues/189)) ([615b6bb](https://github.com/ExodusMovement/exodus-hydra/commit/615b6bbd7a5b50d5b4538b32312a5a3822269328))
284
+
285
+ # [2.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.0.0...@exodus/atoms@2.1.0) (2022-08-18)
286
+
287
+ ### Features
288
+
289
+ - add observe method to storage atom ([#172](https://github.com/ExodusMovement/exodus-hydra/issues/172)) ([ab9ecb3](https://github.com/ExodusMovement/exodus-hydra/commit/ab9ecb39e4819388b9e7e0a4ce2201eae0a5f0e0))
290
+ - storageAtom.set call delete with undefined ([#176](https://github.com/ExodusMovement/exodus-hydra/issues/176)) ([e03b734](https://github.com/ExodusMovement/exodus-hydra/commit/e03b7340714a2e2d27fc88c8090f40498cdf3fd8))
291
+
292
+ ## [2.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@2.0.0...@exodus/atoms@1.1.0) (2022-08-11)
293
+
294
+ ### Features
295
+
296
+ - make atom compatible with latest remote config ([9555139](https://github.com/ExodusMovement/exodus-hydra/commit/95551359aa5dcce7854cc3d4e276e4245fa86a7c))
297
+
298
+ ## [1.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@1.0.0...@exodus/atoms@1.1.0) (2022-08-05)
299
+
300
+ ### Features
301
+
302
+ - **atom:** localConfig atom factory ([#142](https://github.com/ExodusMovement/exodus-hydra/issues/142)) ([0606278](https://github.com/ExodusMovement/exodus-hydra/commit/060627878bb45cb4acbfb17191b205e391e439c0))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/atoms",
3
- "version": "5.7.0",
3
+ "version": "5.7.2",
4
4
  "main": "src/index.js",
5
5
  "description": "Abstraction for encapsulating a piece of data behind a simple unified interface: get, set, observe",
6
6
  "author": "Exodus Movement Inc.",
@@ -10,7 +10,8 @@
10
10
  "lint:fix": "yarn lint --fix"
11
11
  },
12
12
  "files": [
13
- "src"
13
+ "src",
14
+ "CHANGELOG.md"
14
15
  ],
15
16
  "repository": {
16
17
  "type": "git",
@@ -36,5 +37,5 @@
36
37
  "eslint": "^8.44.0",
37
38
  "jest": "^29.1.2"
38
39
  },
39
- "gitHead": "d6c6919e0879a84f30a6fa5c2f2e0d9a35ce7d2f"
40
+ "gitHead": "cb5b1ba99a8fb8fe272f76ff61eb94490006c8f7"
40
41
  }
@@ -26,6 +26,7 @@ const enforceObservableRules = ({ defaultValue, getInitialized = () => true, log
26
26
 
27
27
  const observe = (listener) => {
28
28
  let called = false
29
+ let valueEmittedFromGet
29
30
  listener = withChangeDetection(listener)
30
31
 
31
32
  const publishSerially = (value) => {
@@ -35,8 +36,20 @@ const enforceObservableRules = ({ defaultValue, getInitialized = () => true, log
35
36
 
36
37
  // note: call observe() first to give it a chance to throw if it's not supported
37
38
  // if the subscription already fired once, ignore first get
38
- get().then((value) => !called && publishSerially(value))
39
- return atom.observe((value) => publishSerially(postProcessValue(value)))
39
+ get().then((value) => {
40
+ if (!called) {
41
+ valueEmittedFromGet = value
42
+ publishSerially(value)
43
+ }
44
+ })
45
+ return atom.observe((value) => {
46
+ if (valueEmittedFromGet && value === valueEmittedFromGet) {
47
+ valueEmittedFromGet = undefined // ignore changes from observe only for first call
48
+ return
49
+ }
50
+
51
+ return publishSerially(postProcessValue(value))
52
+ })
40
53
  }
41
54
 
42
55
  const set = makeConcurrent(async (value) => {
@@ -1,6 +1,32 @@
1
1
  import assert from 'minimalistic-assert'
2
2
  import { isEqual as deepEqual } from 'lodash'
3
3
 
4
+ const STRINGIFY_LIMIT = 1000
5
+
6
+ /**
7
+ * Serialize an object to a JSON string with a limit on the number of properties shown
8
+ * @param {Object} obj - The object to be serialized
9
+ * @param {number} limit - The maximum number of properties to include in the output
10
+ * @returns {string} - The JSON string representation of the object
11
+ */
12
+ const limitedStringify = (obj, limit = STRINGIFY_LIMIT) => {
13
+ let count = 0
14
+
15
+ return JSON.stringify(obj, (_, value) => {
16
+ if (count > limit) {
17
+ return
18
+ }
19
+
20
+ if (count === limit) {
21
+ count++
22
+ return '...more properties not shown'
23
+ }
24
+
25
+ count++
26
+ return value
27
+ })
28
+ }
29
+
4
30
  const warnOnSameValueSet = ({ atom, isEqual = deepEqual, logger }) => {
5
31
  assert(atom, 'expected "atom')
6
32
  assert(typeof logger?.warn === 'function', 'expected logger with ".warn" function')
@@ -8,8 +34,9 @@ const warnOnSameValueSet = ({ atom, isEqual = deepEqual, logger }) => {
8
34
  let previousValue
9
35
  atom.observe((value) => {
10
36
  if (value !== undefined && isEqual(value, previousValue)) {
37
+ // limit value shown to avoid a CPU spike that can lead to Android freezing
11
38
  logger.warn(
12
- `Atom was called with the same value it currently holds: ${JSON.stringify(value)}`
39
+ `Atom was called with the same value it currently holds: ${limitedStringify(value)}`
13
40
  )
14
41
  }
15
42