Socket
Socket
Sign inDemoInstall

overmind

Package Overview
Dependencies
Maintainers
4
Versions
886
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

overmind - npm Package Compare versions

Comparing version 1.0.0-1532612418339 to 1.0.0-1532688937340

26

es/computed.js

@@ -38,20 +38,5 @@ export class Computed {

else {
eventHub.emit('computed', {
path,
paths: Array.from(cache.paths),
updateCount: cache.updateCount,
value: cache.value,
limit: this.cacheLimit,
cacheKeysCount: this.cacheKeys.length,
cacheKeyIndex: this.cacheKeys.indexOf(config),
});
cache.proxyStateTreeListener = proxyStateTree.addMutationListener(cache.paths, (flushId) => {
eventHub.emit('computed', {
eventHub.emit('computed:dirty', {
path,
paths: Array.from(cache.paths),
updateCount: cache.updateCount,
value: cache.value,
limit: this.cacheLimit,
cacheKeysCount: this.cacheKeys.length,
cacheKeyIndex: this.cacheKeys.indexOf(config),
flushId,

@@ -67,2 +52,11 @@ });

}
eventHub.emit('computed', {
path,
paths: Array.from(cache.paths),
updateCount: cache.updateCount,
value: cache.value,
limit: this.cacheLimit,
cacheKeysCount: this.cacheKeys.length,
cacheKeyIndex: this.cacheKeys.indexOf(config),
});
return cache.value;

@@ -69,0 +63,0 @@ }

@@ -20,14 +20,5 @@ class Derived {

else {
eventHub.emit('derived', {
path,
paths: Array.from(this.paths),
updateCount: this.updateCount,
value: this.value,
});
this.proxyStateTreeListener = proxyStateTree.addMutationListener(this.paths, (flushId) => {
eventHub.emit('derived', {
eventHub.emit('derived:dirty', {
path,
paths: Array.from(this.paths),
updateCount: this.updateCount,
value: this.value,
flushId,

@@ -38,2 +29,8 @@ });

}
eventHub.emit('derived', {
path,
paths: Array.from(this.paths),
updateCount: this.updateCount,
value: this.value,
});
this.updateCount++;

@@ -40,0 +37,0 @@ }

@@ -22,4 +22,7 @@ import Devtools from './Devtools';

value: any;
flushId?: number;
};
'derived:dirty': {
path: string;
flushId: number;
};
computed: {

@@ -33,4 +36,7 @@ path: string;

cacheKeyIndex: number;
flushId?: number;
};
'computed:dirty': {
path: string;
flushId: number;
};
'reaction:add': {

@@ -37,0 +43,0 @@ path: string;

@@ -51,3 +51,3 @@ import { ActionChain } from 'action-chain';

const flushData = proxyStateTree.flush();
if (this.devtools) {
if (this.devtools && flushData.mutations.length) {
this.devtools.send({

@@ -61,3 +61,3 @@ type: 'flush',

const flushData = proxyStateTree.flush();
if (this.devtools) {
if (this.devtools && flushData.mutations.length) {
this.devtools.send({

@@ -116,2 +116,6 @@ type: 'flush',

}));
eventHub.on('derived:dirty', (data) => devtools.send({
type: 'derived:dirty',
data,
}));
eventHub.on('computed', (data) => devtools.send({

@@ -121,2 +125,6 @@ type: 'computed',

}));
eventHub.on('computed:dirty', (data) => devtools.send({
type: 'computed:dirty',
data,
}));
eventHub.on('reaction:add', (data) => devtools.send({

@@ -123,0 +131,0 @@ type: 'reaction:add',

@@ -40,20 +40,5 @@ "use strict";

else {
eventHub.emit('computed', {
path,
paths: Array.from(cache.paths),
updateCount: cache.updateCount,
value: cache.value,
limit: this.cacheLimit,
cacheKeysCount: this.cacheKeys.length,
cacheKeyIndex: this.cacheKeys.indexOf(config),
});
cache.proxyStateTreeListener = proxyStateTree.addMutationListener(cache.paths, (flushId) => {
eventHub.emit('computed', {
eventHub.emit('computed:dirty', {
path,
paths: Array.from(cache.paths),
updateCount: cache.updateCount,
value: cache.value,
limit: this.cacheLimit,
cacheKeysCount: this.cacheKeys.length,
cacheKeyIndex: this.cacheKeys.indexOf(config),
flushId,

@@ -69,2 +54,11 @@ });

}
eventHub.emit('computed', {
path,
paths: Array.from(cache.paths),
updateCount: cache.updateCount,
value: cache.value,
limit: this.cacheLimit,
cacheKeysCount: this.cacheKeys.length,
cacheKeyIndex: this.cacheKeys.indexOf(config),
});
return cache.value;

@@ -71,0 +65,0 @@ }

@@ -22,14 +22,5 @@ "use strict";

else {
eventHub.emit('derived', {
path,
paths: Array.from(this.paths),
updateCount: this.updateCount,
value: this.value,
});
this.proxyStateTreeListener = proxyStateTree.addMutationListener(this.paths, (flushId) => {
eventHub.emit('derived', {
eventHub.emit('derived:dirty', {
path,
paths: Array.from(this.paths),
updateCount: this.updateCount,
value: this.value,
flushId,

@@ -40,2 +31,8 @@ });

}
eventHub.emit('derived', {
path,
paths: Array.from(this.paths),
updateCount: this.updateCount,
value: this.value,
});
this.updateCount++;

@@ -42,0 +39,0 @@ }

@@ -22,4 +22,7 @@ import Devtools from './Devtools';

value: any;
flushId?: number;
};
'derived:dirty': {
path: string;
flushId: number;
};
computed: {

@@ -33,4 +36,7 @@ path: string;

cacheKeyIndex: number;
flushId?: number;
};
'computed:dirty': {
path: string;
flushId: number;
};
'reaction:add': {

@@ -37,0 +43,0 @@ path: string;

@@ -56,3 +56,3 @@ "use strict";

const flushData = proxyStateTree.flush();
if (this.devtools) {
if (this.devtools && flushData.mutations.length) {
this.devtools.send({

@@ -66,3 +66,3 @@ type: 'flush',

const flushData = proxyStateTree.flush();
if (this.devtools) {
if (this.devtools && flushData.mutations.length) {
this.devtools.send({

@@ -121,2 +121,6 @@ type: 'flush',

}));
eventHub.on('derived:dirty', (data) => devtools.send({
type: 'derived:dirty',
data,
}));
eventHub.on('computed', (data) => devtools.send({

@@ -126,2 +130,6 @@ type: 'computed',

}));
eventHub.on('computed:dirty', (data) => devtools.send({
type: 'computed:dirty',
data,
}));
eventHub.on('reaction:add', (data) => devtools.send({

@@ -128,0 +136,0 @@ type: 'reaction:add',

{
"name": "overmind",
"version": "1.0.0-1532612418339",
"version": "1.0.0-1532688937340",
"description": "Functional actions",

@@ -41,6 +41,6 @@ "author": "Christian Alfoni <christianalfoni@gmail.com>",

"@types/node": "^10.5.1",
"action-chain": "1.0.0-1532612418339",
"action-chain": "1.0.0-1532688937340",
"is-plain-object": "^2.0.4",
"betsy": "1.0.0-1532612418339",
"proxy-state-tree": "1.0.0-1532612418339",
"betsy": "1.0.0-1532688937340",
"proxy-state-tree": "1.0.0-1532688937340",
"tslib": "^1.9.3"

@@ -47,0 +47,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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