@exodus/atoms 5.7.2 → 5.7.3-hotfix.0
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 +6 -0
- package/package.json +3 -4
- package/src/enforce-rules.js +5 -2
- package/src/index.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.7.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.7.2...@exodus/atoms@5.7.3) (2023-10-20)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- import from atoms index ([#4508](https://github.com/ExodusMovement/exodus-hydra/issues/4508)) ([923fb99](https://github.com/ExodusMovement/exodus-hydra/commit/923fb992328b63e45401c78176b5a6ef7b666eee))
|
|
11
|
+
|
|
6
12
|
## [5.7.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@5.7.1...@exodus/atoms@5.7.2) (2023-10-12)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/atoms",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.3-hotfix.0",
|
|
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.",
|
|
@@ -36,6 +36,5 @@
|
|
|
36
36
|
"delay": "^5.0.0",
|
|
37
37
|
"eslint": "^8.44.0",
|
|
38
38
|
"jest": "^29.1.2"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
}
|
|
39
|
+
}
|
|
40
|
+
}
|
package/src/enforce-rules.js
CHANGED
|
@@ -43,9 +43,12 @@ const enforceObservableRules = ({ defaultValue, getInitialized = () => true, log
|
|
|
43
43
|
}
|
|
44
44
|
})
|
|
45
45
|
return atom.observe((value) => {
|
|
46
|
-
if (valueEmittedFromGet
|
|
46
|
+
if (valueEmittedFromGet) {
|
|
47
|
+
const isAlreadyEmitted = value === valueEmittedFromGet
|
|
47
48
|
valueEmittedFromGet = undefined // ignore changes from observe only for first call
|
|
48
|
-
|
|
49
|
+
if (isAlreadyEmitted) {
|
|
50
|
+
return
|
|
51
|
+
}
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
return publishSerially(postProcessValue(value))
|
package/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { default as createRemoteConfigAtomFactory } from './factories/remote-con
|
|
|
5
5
|
export { default as createKeystoreAtom } from './factories/keystore'
|
|
6
6
|
export { default as createSequencedKeystoreAtom } from './factories/sequenced-keystore'
|
|
7
7
|
export { default as createAtomObserver } from './factories/observer'
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
export { default as compute } from './enhancers/compute'
|
|
10
10
|
export { default as blockUntil } from './enhancers/block-until'
|
|
11
11
|
export { default as difference } from './enhancers/difference'
|
|
@@ -16,4 +16,9 @@ export { default as dedupe } from './enhancers/dedupe'
|
|
|
16
16
|
export { default as warnOnSameValueSet } from './enhancers/warn-on-same-value-set'
|
|
17
17
|
export { default as swallowObserverErrors } from './enhancers/swallow-observer-errors'
|
|
18
18
|
export { default as timeoutObservers } from './enhancers/timeout-observers'
|
|
19
|
+
export { default as optimisticNotifier } from './enhancers/optimistic-notifier'
|
|
20
|
+
|
|
21
|
+
export { default as waitUntil } from './effects/wait-until'
|
|
22
|
+
|
|
19
23
|
export { default as enforceObservableRules } from './enforce-rules'
|
|
24
|
+
export { default as fromEventEmitter } from './event-emitter'
|