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

shared-store

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shared-store - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

test/shared-store/retry.test.coffee

5

CHANGELOG.md

@@ -0,1 +1,6 @@

1.0.11
------
* emit correct @_options to meta - @chkhoo #20
* fix when store.init errors, fetches from cache & getCurrent is null - @chkhoo #19
1.0.10

@@ -2,0 +7,0 @@ ------

29

lib/shared-store.js

@@ -113,13 +113,18 @@ // Generated by CoffeeScript 1.9.0

return function(resolve, reject) {
var current, originalErr;
current = _this.getCurrent();
if (current != null) {
return resolve(current);
}
originalErr = null;
return _this.stream.take(1).map(property('data')).tapOnError(function(err) {
return originalErr = err;
})["catch"](latestCacheFile(_this._temp)).subscribe(resolve, function(err) {
return reject(originalErr);
});
var handleData, handleErr;
handleData = function(data) {
_this.removeListener('err', handleErr);
return resolve(data);
};
handleErr = function(err) {
_this.removeListener('data', handleData);
return latestCacheFile(_this._temp).subscribe(function(cache) {
_this._handleUpdate(cache);
return resolve(cache.data);
}, function() {
return reject(err);
});
};
_this.once('data', handleData);
return _this.once('err', handleErr);
};

@@ -174,3 +179,3 @@ })(this));

this._createStream();
this.emit('meta', this.options);
this.emit('meta', this._options);
this._retryTimeout *= RETRY_MULTIPLIER;

@@ -177,0 +182,0 @@ if (this._retryTimeout > TEN_MINUTES) {

{
"name": "shared-store",
"version": "1.0.10",
"version": "1.0.11",
"description": "Keeping config data in sync",

@@ -5,0 +5,0 @@ "main": "lib/shared-store.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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