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

quarx

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quarx - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

13

dist/index.js

@@ -93,3 +93,4 @@ var __defProp = Object.defineProperty;

if (isRunning) {
throw new Error(`[Quarx]: Circular dependency detected in ${name}`);
const trace = [...stack.map(({name: name2}) => name2), name];
throw new Error(`[Quarx]: Circular dependency detected: ${trace.join(" -> ")}`);
}

@@ -100,7 +101,11 @@ if (seqNo === sequenceNumber)

return run();
stack.push({name});
for (let dep of dependencies) {
dep.actualize();
if (!seqNo)
return run();
break;
}
stack.pop();
if (!seqNo)
return run();
seqNo = sequenceNumber;

@@ -112,3 +117,3 @@ }

dependencies = new Set();
stack.push({link, invalidate, actualize});
stack.push({link, invalidate, actualize, name});
tryCatch(computation, onError);

@@ -160,3 +165,3 @@ stack.pop();

function untracked(fn) {
stack.push(null);
stack.push({name: "[untracked]"});
try {

@@ -163,0 +168,0 @@ return fn();

@@ -7,3 +7,3 @@ {

"name": "quarx",
"version": "3.0.1",
"version": "3.1.0",
"description": "Simple dependency graph engine, MobX inspired",

@@ -10,0 +10,0 @@ "main": "dist/index.js",

@@ -88,3 +88,4 @@ const stack = [];

if (isRunning) {
throw new Error(`[Quarx]: Circular dependency detected in ${name}`);
const trace = [...stack.map(({ name }) => name), name];
throw new Error(`[Quarx]: Circular dependency detected: ${trace.join(' -> ')}`);
}

@@ -94,6 +95,12 @@ if (seqNo === sequenceNumber) return;

stack.push({ name });
for (let dep of dependencies) {
dep.actualize();
if (!seqNo) return run();
if (!seqNo) break;
}
stack.pop();
if (!seqNo) return run();
seqNo = sequenceNumber;

@@ -108,3 +115,3 @@ }

stack.push({ link, invalidate, actualize });
stack.push({ link, invalidate, actualize, name });

@@ -168,3 +175,3 @@ tryCatch(computation, onError);

export function untracked(fn) {
stack.push(null);
stack.push({ name: '[untracked]' });
try {

@@ -171,0 +178,0 @@ return fn();

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