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

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 28.0.3-1688891482797 to 28.0.3-1688895117677

3

es/mock.test.js

@@ -64,3 +64,3 @@ import { createOvermindMock } from './';

});
test('should preserve getters', async (done) => {
test('should preserve getters', async () => {
expect.assertions(1);

@@ -81,3 +81,2 @@ const state = {

expect(mock.state.valuePlusTwo).toEqual(17);
done();
});

@@ -84,0 +83,0 @@ test('should allow setting initial state', async () => {

@@ -164,3 +164,4 @@ import { EventEmitter } from 'betsy';

eventHub.on(internalTypes.EventType.MUTATIONS, (execution) => {
this.reydrateMutationsForHotReloading = this.reydrateMutationsForHotReloading.concat(execution.mutations);
this.reydrateMutationsForHotReloading =
this.reydrateMutationsForHotReloading.concat(execution.mutations);
});

@@ -576,3 +577,3 @@ }

args: effect.args,
result: result,
result,
isPending: false,

@@ -579,0 +580,0 @@ error: false,

@@ -19,5 +19,3 @@ import { Overmind } from './Overmind';

effectsCallback: (effect) => {
const mockedEffect = (effect.name
? effect.name.split('.')
: []).reduce((aggr, key) => (aggr ? aggr[key] : aggr), mockedEffects);
const mockedEffect = (effect.name ? effect.name.split('.') : []).reduce((aggr, key) => (aggr ? aggr[key] : aggr), mockedEffects);
if (!mockedEffect || (mockedEffect && !mockedEffect[effect.method])) {

@@ -24,0 +22,0 @@ throw new Error(`The effect "${effect.name}" with method ${effect.method} has not been mocked`);

@@ -14,11 +14,11 @@ import { IState } from '.';

[State in States['current']]: {
[Type in Events['type']]?: [BaseState] extends [never] ? ((event: Events extends {
[Type in Events['type']]?: [BaseState] extends [never] ? (event: Events extends {
type: Type;
} ? Events['data'] : never, state: States extends {
current: State;
} ? States : never) => States | void) : ((event: Events extends {
} ? States : never) => States | void : (event: Events extends {
type: Type;
} ? Events['data'] : never, state: States extends {
current: State;
} ? States & BaseState : never) => States | void);
} ? States & BaseState : never) => States | void;
};

@@ -25,0 +25,0 @@ };

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

EventType["GETTER"] = "getter";
})(EventType = exports.EventType || (exports.EventType = {}));
})(EventType || (exports.EventType = EventType = {}));
//# sourceMappingURL=internalTypes.js.map

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

});
test('should preserve getters', (done) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
test('should preserve getters', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
expect.assertions(1);

@@ -84,3 +84,2 @@ const state = {

expect(mock.state.valuePlusTwo).toEqual(17);
done();
}));

@@ -87,0 +86,0 @@ test('should allow setting initial state', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {

@@ -168,3 +168,4 @@ "use strict";

eventHub.on(internalTypes.EventType.MUTATIONS, (execution) => {
this.reydrateMutationsForHotReloading = this.reydrateMutationsForHotReloading.concat(execution.mutations);
this.reydrateMutationsForHotReloading =
this.reydrateMutationsForHotReloading.concat(execution.mutations);
});

@@ -498,3 +499,3 @@ }

}
this.eventHub.emit(internalTypes.EventType.EFFECT, Object.assign(Object.assign(Object.assign({}, execution), effect), { args: effect.args, result: result, isPending: false, error: false }));
this.eventHub.emit(internalTypes.EventType.EFFECT, Object.assign(Object.assign(Object.assign({}, execution), effect), { args: effect.args, result, isPending: false, error: false }));
return result;

@@ -501,0 +502,0 @@ });

@@ -23,5 +23,3 @@ "use strict";

effectsCallback: (effect) => {
const mockedEffect = (effect.name
? effect.name.split('.')
: []).reduce((aggr, key) => (aggr ? aggr[key] : aggr), mockedEffects);
const mockedEffect = (effect.name ? effect.name.split('.') : []).reduce((aggr, key) => (aggr ? aggr[key] : aggr), mockedEffects);
if (!mockedEffect || (mockedEffect && !mockedEffect[effect.method])) {

@@ -28,0 +26,0 @@ throw new Error(`The effect "${effect.name}" with method ${effect.method} has not been mocked`);

@@ -14,11 +14,11 @@ import { IState } from '.';

[State in States['current']]: {
[Type in Events['type']]?: [BaseState] extends [never] ? ((event: Events extends {
[Type in Events['type']]?: [BaseState] extends [never] ? (event: Events extends {
type: Type;
} ? Events['data'] : never, state: States extends {
current: State;
} ? States : never) => States | void) : ((event: Events extends {
} ? States : never) => States | void : (event: Events extends {
type: Type;
} ? Events['data'] : never, state: States extends {
current: State;
} ? States & BaseState : never) => States | void);
} ? States & BaseState : never) => States | void;
};

@@ -25,0 +25,0 @@ };

{
"name": "overmind",
"version": "28.0.3-1688891482797",
"version": "28.0.3-1688895117677",
"description": "Frictionless state management",

@@ -37,12 +37,12 @@ "author": "Christian Alfoni <christianalfoni@gmail.com>",

"dependencies": {
"is-plain-obj": "^1.1.0",
"betsy": "1.0.2-1688891482796",
"tslib": "^2.3.0",
"proxy-state-tree": "6.3.0-1688891482797"
"betsy": "1.0.2-1688895117677",
"is-plain-obj": "^3.0.0",
"proxy-state-tree": "6.3.0-1688895117677",
"tslib": "^2.6.0"
},
"devDependencies": {
"@types/node": "^20.3.1",
"bundlesize": "^0.17.2",
"@types/node": "^20.4.1",
"bundlesize": "^0.18.1",
"terser-webpack-plugin": "^5.3.9",
"webpack": "^5.87.0"
"webpack": "^5.88.1"
},

@@ -49,0 +49,0 @@ "bundlesize": [

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

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

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

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