Skip to content

Releases: jeffbski/redux-logic

v0.15.1

02 Aug 00:24
Compare
Choose a tag to compare

support for [email protected]+

redux-logic will work fine with [email protected] as well as the older 3.5.x versions.

peer dependency and dev dependency to support >=3.5.2 allowing the use of either.

v.0.15.0

14 Jun 01:10
Compare
Choose a tag to compare

Added support for Symbols as type. Thanks @a-marquez

Added additional validation check for misspelled type keyword. Thanks @matthamil

v0.14.0

14 Jun 00:26
Compare
Choose a tag to compare

Updated dev dependencies and usage.

Remove Node@4 from travis tests since it was causing issue with latest codacy coverage and Node@4 is past end of life.

Allow configuration of default warnTimeout

08 May 17:12
Compare
Choose a tag to compare

New method configureLogic({...}) introduced which allows the configuration of the the global defaults like warnTimeout

import { configureLogic } from 'redux-logic';

// globally configure ALL Logic instance defaults instead of overriding these
// properties on each call to `createLogic`. These defaults will not be applied
// to `Logic` instances that have already been created.
//
// specify all or a subset of the following properties:
configureLogic({

  // provide different default values than the package defaults.
  warnTimeout: 10000  // use 0 to disable the warning
});

v0.12.4

08 May 00:21
Compare
Choose a tag to compare

Fix defect which occurred when using processOptions successType or failType along with validate or transform hook. If the validate or transform hook caused a dispatch then it was incorrectly being wrapped using the processOptions successType or failType. Those options only apply to the process hook.

Merge PR to fix link on API page. Thanks @cherniavskii

v0.12.3

13 Sep 12:34
Compare
Choose a tag to compare

Make rxjs a dependency and document installation notes

To simplify use where a developer only wants to use redux-logic and
doesn't plan to use observables directly, making rxjs a dependency
allows redux-logic to be installed w/o manually installing rxjs first.

It is still recommended to install rxjs first if Observables will
directly be used in the project, so that multiple copies are not
installed. A note was added to the readme.

v0.12.0

10 Apr 19:38
Compare
Choose a tag to compare

v0.12 has a notable non-breaking change. It's purpose is to deprecate single dispatch form of process hook to prepare for a breaking change in v0.13. In development mode using the single dispatch form of process hook will warn in the console. The single dispatch mode was a source of confusion for users and complexity in the source code.

  • Single dispatch mode - process(deps, dispatch) is deprecated, use the multi-dispatch version process(deps, dispatch, done) calling done when finished dispatching.
  • New option warnTimeout defaults to 60000 (ms == one minute) which warns (in development build only) when the logic exceeds the specified time without completion. Adjust this value or set it to 0 if you have logic that needs to exceed this time or purposefully never ends (like listening to a web socket).

Migration steps

  1. Search for logic with process hook defined that uses dispatch but not done and convert to the multi-dispatch version process(deps, dispatch, done) calling done when finished dispatching. README and docs/api.md have many examples.
  2. For any long running logic or logic that never ends (like those listening to a web socket), set the new option warnTimeout to the milliseconds to wait before warning to the console (defaults to 60000 ms, one minute). For never ending logic, set it to 0 to disable the warning.

v0.11.7

25 Feb 20:02
Compare
Choose a tag to compare

add logicMiddleware.addDeps(additionalDeps)

Add a method addDeps to the logicMiddleware that will allow the injection of additional dependencies that will be available to the hooks (validate/transform/process).

It must be called after the store is created so that everything initializes properly.

It will verify that it is not overriding existing dependencies (unless they are the exact same value/instance), throwing an error if it finds a conflict. This will help prevent accidental collisions which would manifest as strange errors.

const deps = { a: 1 };
const logicMiddleware = createLogicMiddleware(logic, deps);
const store = createStore(reducer, applyMiddleware(logicMiddleware));
logicMiddleware.addDeps({ b: 2 }); // now deps are { a: 1, b: 2 }
logicMiddleware.addDeps({ b: 2 }); // ok, override with same value
logicMiddleware.addDeps({ b: 3 }); // throws an error, cannot override

v0.11.6

13 Feb 22:15
Compare
Choose a tag to compare

Refactor of dispatch/return value handling. Documented the specific rules behind the processing. Add more tests to test the variety of edge cases and especially around the areas of error handling.

v0.11.0

16 Jan 18:36
Compare
Choose a tag to compare

Removed an artificial delay (microtask) for the dispatch since it was no longer needed due to previous code restructuring. Originally the delay was added to ensure that dispatches occurred after the next calls, but this was refactored a while back and thus the artificial delay is no longer needed.

It is unlikely that this will be a breaking change for anyone but to be safe I bumped the version just in case.