Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@exodus/atoms

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/atoms - npm Package Compare versions

Comparing version 7.3.0 to 7.3.1

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## [7.3.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@7.3.0...@exodus/atoms@7.3.1) (2024-05-09)
### Bug Fixes
- atoms should not hit storage after first read or write ([#6834](https://github.com/ExodusMovement/exodus-hydra/issues/6834)) ([63e23f1](https://github.com/ExodusMovement/exodus-hydra/commit/63e23f1f0bf33732f67b70feb9e95e854a8fd90e))
## [7.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/atoms@7.2.0...@exodus/atoms@7.3.0) (2024-04-17)

@@ -8,0 +14,0 @@

7

lib/factories/storage.js

@@ -7,2 +7,3 @@ import createSimpleObserver from '../simple-observer.js';

const { notify, observe } = createSimpleObserver({ enable: isSoleWriter });
let canUseCached = false;
let cached;

@@ -22,2 +23,3 @@ let writePromiseDefer;

cached = value;
canUseCached = value !== undefined;
await notify(value);

@@ -27,3 +29,3 @@ }

const get = async () => {
if (cached) {
if (canUseCached) {
return cached;

@@ -34,3 +36,3 @@ }

}
if (cached) {
if (canUseCached) {
return cached;

@@ -41,2 +43,3 @@ }

cached = value;
canUseCached = true;
}

@@ -43,0 +46,0 @@ return value;

{
"name": "@exodus/atoms",
"version": "7.3.0",
"version": "7.3.1",
"description": "Abstraction for encapsulating a piece of data behind a simple unified interface: get, set, observe",

@@ -8,3 +8,3 @@ "type": "module",

"exports": "./lib/index.js",
"author": "Exodus Movement Inc.",
"author": "Exodus Movement, Inc.",
"scripts": {

@@ -43,3 +43,3 @@ "build": "run -T tsc --build tsconfig.build.json",

"@exodus/atom-tests": "^1.0.0",
"@exodus/remote-config": "^2.3.0",
"@exodus/remote-config": "^2.4.0",
"@exodus/storage-memory": "^2.1.1",

@@ -50,3 +50,3 @@ "@types/jest": "^29.5.11",

},
"gitHead": "1a06c9388e1cb50ddcaa6dd4c92c924a48996d57"
"gitHead": "2792d27a3830bea53f036b542b34a3ddce0eee6d"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc