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

effector

Package Overview
Dependencies
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

effector - npm Package Compare versions

Comparing version 0.11.1 to 0.12.0

es/collect.js

54

CHANGELOG.md
# Changelog
## 0.12.0
* Exclude coverage from npm build
* Rename `mill` to `collect`
* Rename `joint` to `combine`
## 0.11.1
- Remove source files from npm release
* Remove source files from npm release
## 0.11.0
- Add support for sync functions in `.use`
- **breaking** Rename config option `effectImplementationCheck` to `unused`
* Add support for sync functions in `.use`
* **breaking** Rename config option `effectImplementationCheck` to `unused`
## 0.10.2
- Fix overriding of flow modules
* Fix overriding of flow modules
## 0.10.0
- **breaking** Removed `rootDomain` alias for `createRootDomain`
- Fixed duplication of `typeConstant` events
- Added sync event propagation
- Catching of watch function errors
- Added warning to port errors
- Added type aliases `DomainAuto`, `EventAuto` and `EffectAuto`
- Added `mill` fluent "AND" reducer combinator
* **breaking** Removed `rootDomain` alias for `createRootDomain`
* Fixed duplication of `typeConstant` events
* Added sync event propagation
* Catching of watch function errors
* Added warning to port errors
* Added type aliases `DomainAuto`, `EventAuto` and `EffectAuto`
* Added `mill` fluent "AND" reducer combinator
```js
import {mill, type MillType, type Reducer} from 'effector'
import { mill, type MillType, type Reducer } from 'effector'

@@ -37,9 +48,7 @@ type A = 'foo'

staticField: string,
}> = tuple.joint(
(a: A, b: B) => ({
a, b,
staticField: 'its ok',
})
)
}> = tuple.joint((a: A, b: B) => ({
a,
b,
staticField: 'its ok',
}))
```

@@ -49,6 +58,7 @@

- Added hot reload support for root domains
- Added support for dispatching halt action
* Added hot reload support for root domains
* Added support for dispatching halt action
```js
import {createHaltAction} from 'effector'
import { createHaltAction } from 'effector'

@@ -55,0 +65,0 @@ store.dispatch(createHaltAction()) //This store will be unsubscribed

@@ -1,3 +0,1 @@

// import type {Store} from 'redux'
import { combine } from 'most';
import { subject } from './subject';

@@ -7,3 +5,2 @@ import { nextPayloadID } from './id';

import { basicCommon, observable } from './event-common';
import { watchWarn } from './effect/warn';
import { createWatcher } from './effect/watch';

@@ -20,3 +17,5 @@ export function EventConstructor(domainName, dispatch, getState, state$, events, name, action$ = subject(), config = {

var handlers = new Set();
if (!config.isPlain) handlers.add((payload, state) => action$.next(payload)); // handlers.add((payload, state) => state$.next(state))
if (!config.isPlain) handlers.add((payload
/*::, state*/
) => action$.next(payload)); // handlers.add((payload, state) => state$.next(state))

@@ -23,0 +22,0 @@ var create = payload => ({

export { createDomain, createRootDomain } from './domain';
export { effectorMiddleware } from './middleware';
export { createReducer } from './reducer';
export { joint } from './joint';
export { combine, joint } from './combine';
export { createHaltAction } from './config'; // Experimental API
export { createEvent, createEffect } from './default-domain';
export { mill } from './mill';
export { mill, collect } from './collect';
//# sourceMappingURL=index.js.map

@@ -122,3 +122,3 @@ import {

export function joint<A, R>(
export function combine<A, R>(
fn: (a: A) => R,

@@ -128,3 +128,3 @@ setA: Reducer<A>,

): Reducer<R>
export function joint<A, B, R>(
export function combine<A, B, R>(
fn: (a: A, b: B) => R,

@@ -135,3 +135,3 @@ setA: Reducer<A>,

): Reducer<R>
export function joint<A, B, C, R>(
export function combine<A, B, C, R>(
fn: (a: A, b: B, c: C) => R,

@@ -143,3 +143,3 @@ setA: Reducer<A>,

): Reducer<R>
export function joint<A, B, C, D, R>(
export function combine<A, B, C, D, R>(
fn: (a: A, b: B, c: C, d: D) => R,

@@ -152,3 +152,3 @@ setA: Reducer<A>,

): Reducer<R>
export function joint<A, B, C, D, E, R>(
export function combine<A, B, C, D, E, R>(
fn: (a: A, b: B, c: C, d: D, e: E) => R,

@@ -162,3 +162,3 @@ setA: Reducer<A>,

): Reducer<R>
export function joint<A, B, C, D, E, F, R>(
export function combine<A, B, C, D, E, F, R>(
fn: (a: A, b: B, c: C, d: D, e: E, f: F) => R,

@@ -173,3 +173,3 @@ setA: Reducer<A>,

): Reducer<R>
export function joint<A, B, C, D, E, F, G, R>(
export function combine<A, B, C, D, E, F, G, R>(
fn: (a: A, b: B, c: C, d: D, e: E, f: F, g: G) => R,

@@ -185,3 +185,3 @@ setA: Reducer<A>,

): Reducer<R>
export function joint<A, B, C, D, E, F, G, H, R>(
export function combine<A, B, C, D, E, F, G, H, R>(
fn: (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H) => R,

@@ -199,5 +199,5 @@ setA: Reducer<A>,

export function mill(): Mill
export function collect(): Collect
export type MillType<
export type CollectType<
A = any,

@@ -207,31 +207,31 @@ B = any,

D = any,
> = Mill
| MillA<A>
| MillAB<A, B>
| MillABC<A, B, C>
| MillABCD<A, B, C, D>
> = Collect
| CollectA<A>
| CollectAB<A, B>
| CollectABC<A, B, C>
| CollectABCD<A, B, C, D>
declare class Mill {
and<A>(red: Reducer<A>): MillA<A>;
joint<R>(fn: () => R): Reducer<R>;
declare class Collect {
and<A>(red: Reducer<A>): CollectA<A>;
combine<R>(fn: () => R): Reducer<R>;
}
declare class MillA<A> {
and<B>(red: Reducer<B>): MillAB<A, B>;
joint<R>(fn: (a: A) => R): Reducer<R>;
declare class CollectA<A> {
and<B>(red: Reducer<B>): CollectAB<A, B>;
combine<R>(fn: (a: A) => R): Reducer<R>;
}
declare class MillAB<A, B> {
and<C>(red: Reducer<C>): MillABC<A, B, C>;
joint<R>(fn: (a: A, b: B) => R): Reducer<R>;
declare class CollectAB<A, B> {
and<C>(red: Reducer<C>): CollectABC<A, B, C>;
combine<R>(fn: (a: A, b: B) => R): Reducer<R>;
}
declare class MillABC<A, B, C> {
and<D>(red: Reducer<D>): MillABCD<A, B, C, D>;
joint<R>(fn: (a: A, b: B, c: C) => R): Reducer<R>;
declare class CollectABC<A, B, C> {
and<D>(red: Reducer<D>): CollectABCD<A, B, C, D>;
combine<R>(fn: (a: A, b: B, c: C) => R): Reducer<R>;
}
declare class MillABCD<A, B, C, D> {
// and<D>(red: Reducer<D>): MillABCD<A, B, C, D>;
joint<R>(fn: (a: A, b: B, c: C, d: D) => R): Reducer<R>;
declare class CollectABCD<A, B, C, D> {
// and<D>(red: Reducer<D>): CollectABCD<A, B, C, D>;
combine<R>(fn: (a: A, b: B, c: C, d: D) => R): Reducer<R>;
}

@@ -8,4 +8,2 @@ "use strict";

var _most = require("most");
var _subject = require("./subject");

@@ -19,7 +17,4 @@

var _warn = require("./effect/warn");
var _watch = require("./effect/watch");
// import type {Store} from 'redux'
function EventConstructor(domainName, dispatch, getState, state$, events, name, action$ = (0, _subject.subject)(), config = {

@@ -35,3 +30,5 @@ isPlain: false,

var handlers = new Set();
if (!config.isPlain) handlers.add((payload, state) => action$.next(payload)); // handlers.add((payload, state) => state$.next(state))
if (!config.isPlain) handlers.add((payload
/*::, state*/
) => action$.next(payload)); // handlers.add((payload, state) => state$.next(state))

@@ -38,0 +35,0 @@ var create = payload => ({

@@ -30,6 +30,12 @@ "use strict";

});
Object.defineProperty(exports, "combine", {
enumerable: true,
get: function () {
return _combine.combine;
}
});
Object.defineProperty(exports, "joint", {
enumerable: true,
get: function () {
return _joint.joint;
return _combine.joint;
}

@@ -58,5 +64,11 @@ });

get: function () {
return _mill.mill;
return _collect.mill;
}
});
Object.defineProperty(exports, "collect", {
enumerable: true,
get: function () {
return _collect.collect;
}
});

@@ -69,3 +81,3 @@ var _domain = require("./domain");

var _joint = require("./joint");
var _combine = require("./combine");

@@ -76,3 +88,3 @@ var _config = require("./config");

var _mill = require("./mill");
var _collect = require("./collect");
//# sourceMappingURL=index.js.map
{
"name": "effector",
"version": "0.11.1",
"version": "0.12.0",
"description": "Redux effects",

@@ -12,8 +12,12 @@ "main": "lib/index.js",

"prepublishOnly": "npm run build && npm run flow-copy",
"flow-copy:cjs": "flow-copy-source -i=__test__**\/* -i=joint* -i=mill* -i=subject* src lib && cp src\/*flow lib",
"flow-copy:es": "flow-copy-source -i=__test__**\/* -i=joint* -i=mill* -i=subject* src es && cp src\/*flow es",
"flow-copy:cjs":
"flow-copy-source -i=__test__**/* -i=combine* -i=collect* -i=subject* src lib && cp src/*flow lib",
"flow-copy:es":
"flow-copy-source -i=__test__**/* -i=combine* -i=collect* -i=subject* src es && cp src/*flow es",
"flow-copy": "npm run flow-copy:cjs && npm run flow-copy:es",
"build": "npm run build:cjs && npm run build:es",
"build:cjs": "cross-env BABEL_ENV=commonjs babel src/ --ignore src/__test__ -d lib -s --delete-dir-on-start",
"build:es": "cross-env BABEL_ENV=es babel src/ --ignore src/__test__ -d es -s --delete-dir-on-start",
"build:cjs":
"cross-env BABEL_ENV=commonjs babel src/ --ignore src/__test__ -d lib -s --delete-dir-on-start",
"build:es":
"cross-env BABEL_ENV=es babel src/ --ignore src/__test__ -d es -s --delete-dir-on-start",
"test:ff": "jest --config=jest-fastflow.json --watch",

@@ -74,8 +78,4 @@ "test:watch": "jest --config=jest.json --watch",

"sideEffects": false,
"files": [
"es",
"lib",
"index.d.ts"
],
"files": ["es", "lib", "index.d.ts"],
"repository": "https://gitlab.com/zerobias/effector"
}

@@ -19,2 +19,8 @@ # Effector

See examples
[![Edit Effective redux](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/5k41l10xpl?module=%2Fsrc%2Flogic.js)
[![Edit 7ykkowx82j](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/7ykkowx82j?module=%2Fsrc%2Flogic.js)
```js

@@ -116,2 +122,5 @@ import {createStore, applyMiddleware} from 'redux'

## Typings
Effector supports both TypeScript and Flow type annotations out of the box.
## API

@@ -122,3 +131,3 @@

effectorMiddleware,
rootDomain,
createRootDomain,
createReducer,

@@ -125,0 +134,0 @@ joint,

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