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

optimism

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

optimism - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

lib/local.js

36

lib/entry.js

@@ -118,16 +118,32 @@ "use strict";

var currentParentEntry;
var getLocal = require("./local.js").get;
Ep.recompute = function recompute() {
this.forgetChildren();
var local = getLocal();
var oldParentEntry = local.currentParentEntry;
local.currentParentEntry = this;
// Set this.dirty = true so that we can tell if the try block threw an
// exception below, even though we aren't catching the exception.
this.dirty = true;
var oldParentEntry = currentParentEntry;
currentParentEntry = this;
try {
this.value = this.fn.apply(null, this.args);
this.dirty = false;
} finally {
currentParentEntry = oldParentEntry;
assert.strictEqual(local.currentParentEntry, this);
local.currentParentEntry = oldParentEntry;
if (! this.dirty) {
this.updateParents();
if (oldParentEntry) {
this.parents.add(oldParentEntry);
}
this.parents.forEach(function (parent) {
parent.reportCleanChild(this);
}, this);
return this.value;

@@ -152,11 +168,1 @@ }

};
Ep.updateParents = function updateParents() {
if (currentParentEntry) {
this.parents.add(currentParentEntry);
}
this.parents.forEach(function (parent) {
parent.reportCleanChild(this);
}, this);
};
{
"name": "optimism",
"version": "0.2.1",
"version": "0.2.2",
"author": "Ben Newman <ben@benjamn.com>",

@@ -34,4 +34,8 @@ "description": "Composable reactive caching with efficient invalidation.",

"devDependencies": {
"fibers": "^1.0.14",
"mocha": "^3.1.0"
},
"optionalDependencies": {
"fibers": "^1.0.14"
}
}

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