Skip to content

Releases: redux-saga/redux-saga

v0.16.0

16 Oct 09:07
Compare
Choose a tag to compare
v0.16.0 Pre-release
Pre-release
  • added detach helper - this is used internally now by spawn to mark fork effect as detached, got exported and might be used in userland, it's useful for creating i.e. detached takeEvery
import { detach } from 'redux-saga'
import { takeEvery } from 'redux-saga/effects'

// ...

yield detach(takeEvery(ACTION_A, mightThrowSaga))
  • typings for detach got added thanks to @aikoven
  • removed #__PURE__ annotations from the source code, adding them automatically with annotate-pure-calls babel's plugin
  • made sagaStack property non-enumerable (this is attached sometimes by redux-saga to the thrown Errors)
  • unified internally error logging
  • removed annoying "saga has been cancelled" logs, didn't find a valid use case for them

v0.15.6

16 Oct 08:59
Compare
Choose a tag to compare
v0.15.6 Pre-release
Pre-release

TS Typings

  • made take and put effects redeclarable (thanks to @Rokt33r)
  • marked overloaded put.sync as deprecated

v0.15.5

16 Oct 08:57
Compare
Choose a tag to compare
v0.15.5 Pre-release
Pre-release

TS Typings

  • optional cancel property on CpsCallback (thanks to @DanNSam)
  • support for non-strict effect combinators (thanks to @aikoven
  • type definitions for util's cloneableGenerator function (thanks to @zyml)

v0.15.4

23 Jun 12:19
Compare
Choose a tag to compare
v0.15.4 Pre-release
Pre-release
  • added pure functions annotations (for few deprecation warnings) so they can be better tree-shaken now. more can be read here, thanks to @iamakulov

v0.15.3

05 May 07:16
Compare
Choose a tag to compare
v0.15.3 Pre-release
Pre-release
  • fixed middleware's context not being passed to the root sagas (thanks @VictorQueiroz)

v0.15.2

05 May 06:43
Compare
Choose a tag to compare
v0.15.2 Pre-release
Pre-release
  • fixed problem with yielding falsy values - normally all non-interpretable yields are just injected back to your saga (const two = yield 2), however yielding falsy values prevented yielding saga to continue

v0.15.1

05 May 06:45
Compare
Choose a tag to compare
v0.15.1 Pre-release
Pre-release
  • reverted using Symbols for some internal properties - this caused 2 redux-saga version to be incompatible, effects from one couldnt be interpreted by the other one

v0.15.0

29 Apr 13:25
Compare
Choose a tag to compare
v0.15.0 Pre-release
Pre-release

Things published already under recent patch versions, but without public release noted:

  • got redux-saga/effects and redux-saga/utils working properly for webpack2 and rollup users (or any other bundle which recognizes jsnext:main/module entry). Thanks to @ephys. How was it achieved can be seen here. Neat trick which I think is not publicly known and it was an issue for quite some time and also allowed me to help fixing this in some other libraries.
  • fixed join(...tasks) implementation, its not accepting an array of tasks, but rather a variadic number of tasks as arguments
  • implemented cancel(...tasks) in similar manner
  • implemented possibility for self cancellation, this means you can now yield cancel() inside a task and handle both cancel(task) + self cancellation via cancel() within the same finally block
  • fixed internal scheduler and its recursive nature, now its trampolining and cannot cause stack's overflow, thanks to @pbadenski and @wilsaj
  • added getContext and setContext effects (thanks for the idea to @aikoven). It's not properly documented yet, but its a feature which allows sharing context properties across tasks without need to import them in each file or passing them explicitly through arguments. The feature is implemented as dynamic scoping which should sounds familiar for JS devs. In general you cannot share a context property from a child task to the parent, its only passed 'down'. You can read more in related issue and PR till its not documented.
  • got rid of createSagaMiddleware({ onerror }) which got into library because of a typo and we have supported it for some time, please use onError instead

New in this release:

  • refactored runSaga API, runSaga(iterator, storeInterface) got depreacted in favor of runSaga(storeInterface, saga, ...args). It allowed us to leverage the change internally so now sagaMiddleware.run became partially applied runSaga, they wont now go out of sync (in the past changes and bug fixes had to implemented in both of them).
  • cloneableGenerator utils, which can ease ur unit testing when logic branching is needed, thanks to @nihaux
  • call([obj, 'method']) - now you can pass a string as method's name which should be called on the passed context
  • all effect - explicit effect for parallel effects, which is exactly what we had been supporting by accepting yielded arrays, so the latter is become deprecated now in favor of this explicitness which nicely maps to the Promise.all API. Please use this from now on
  • improved TS typings, thanks to @aikoven for his continous support in this matter

Bug fixes:

  • fixed issue with eventChannels not closing automatically upon emitting END, thanks to @baldwmic

In the meantime we have also:

  • got us https://redux-saga.js.org/ domain, thanks to @baldwmic
  • got us a rolluped UMD build, which is way smaller than the one which was produced by a webpack, thanks to the so called 'flat-bundling'
  • got us a logo! Thanks to @thekarland

Redux Logo Portrait

v0.14.4

29 Mar 12:59
Compare
Choose a tag to compare
v0.14.4 Pre-release
Pre-release

Fixes

  • take effect supporting Symbol types again - thanks to @iMoses

v0.14.3

16 Jan 23:44
Compare
Choose a tag to compare
v0.14.3 Pre-release
Pre-release

This small update allows you to integrate better with some other redux libraries, like redux-actions and redux-act.

For the users of those it is now possible to omit maintaining action constants only for the sake's of redux-saga and they can use created actions as patterns for the take effect like this:

import { createAction } from 'redux-actions'

const increment = createAction('INCREMENT', amount => amount) // typeof increment === 'function'

// ...
yield take(increment)

It means that you can pass an action creator function with custom .toString() method on it and it can be checked by redux-saga against dispatched actions' types.

Special thanks for this goes to @thezanke

Also - finally the build for rollup should be fixed (public export of CHANNEL_END got fixed).