Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.12.1
->1.1.3
Release Notes
redux-saga/redux-saga
v1.1.3
Compare Source
v1.1.2
Compare Source
v1.1.1
Compare Source
Fixes resolving TS types for
redux-saga/effects
v1.1.0
Compare Source
This release is bringing improved TS typings - allowed by [email protected]. Thanks, @gilbsgilbs for working on this 👍
For more on this please read #1892 (comment)
v1.0.5
Compare Source
v1.0.4
Compare Source
v1.0.3
Compare Source
v1.0.2
Compare Source
v1.0.1
Compare Source
v1.0.0
Compare Source
During work on v1, we made several breaking changes
Breaking changes
finally
block fail-safetakeEvery
,takeLatest
,throttle
from the redux-saga entry point (they are and were importable fromredux-saga/effects
).put.sync
andtakem
were removed.yield [...]
. useall
effect instead.delay
became an effect, olddelay
function (not effect!) can be imported from@redux-saga/delay-p
put.resolve
was changed toputResolve
take.maybe
was changed totakeMaybe
take
andput
methodstask.done
getter was changed to betask.toPromise
methodonError
doesn't extenderror
with additional fieldsagaStack
, but pass it as a property of second argument. before:onError: (e: Error)
, after:onError(e: Error, { sagaStack })
Effect
shape, yielded to redux-saga middleware, is stabilized and declared now as a plain JavaScript object{effects, utils}
aren't imported from 'redux-saga' anymore. imports them fromredux-saga/effects
,redux-saga/utils
is
helper should be imported from@redux-saga/is
.createMockTask
,cloneableGenerator
should be imported from@redux-saga/testing-utils
race
should be finished if any of effects resolved withEND
(by analogy with all)cancel(...[tasks])
andjoin(...[tasks])
tocancel([tasks])
andjoin([tasks])
respectively. also callingcancel(...)
returns a cancel-effect (before it may return anall
effect), and callingjoin(...)
returns a join-effect.{[IO]: true, [type]: payload }
to{ [IO]: true, type, payload }
to get rid of dynamictype
property. Could affect you if implement custom monitor for saga effects.arrayOfDeffered
got renamed to the correctarrayOfDeferred
New functionality
yield take(multicastChannel, pattern)
effectMiddlewares
- useful especially for testing, you can intercept/hijack any effect and resolve it on your own - passing it very redux-style to the next middleware (last being redux-saga itself). How it might be used can be checked here. Many thanks to @eloytoro for this featuretakeLeading
helper. It takes "leading" action and ignores all incoming ones of the same type while the "leading" is still handled (useful for things debouncing)retry
helper. Receives a function and executes it (with blocking call). In case of failure will try to make another call afterdelayLength
milliseconds, if a number of attempts <maxTries
parameterdebounce
helper. Spawns asaga
on an action dispatched to the Store that matchespattern
. Saga will be called after it stops takingpattern
actions forms
milliseconds. Purpose of this is to prevent calling saga until the actions are settled off.v0.16.2
Compare Source
v0.16.1
Compare Source
v0.16.0
Compare Source
During work on v1, we made several breaking changes
Breaking changes
finally
block fail-safetakeEvery
,takeLatest
,throttle
from the redux-saga entry point (they are and were importable fromredux-saga/effects
).put.sync
andtakem
were removed.yield [...]
. useall
effect instead.delay
became an effect, olddelay
function (not effect!) can be imported from@redux-saga/delay-p
put.resolve
was changed toputResolve
take.maybe
was changed totakeMaybe
take
andput
methodstask.done
getter was changed to betask.toPromise
methodonError
doesn't extenderror
with additional fieldsagaStack
, but pass it as a property of second argument. before:onError: (e: Error)
, after:onError(e: Error, { sagaStack })
Effect
shape, yielded to redux-saga middleware, is stabilized and declared now as a plain JavaScript object{effects, utils}
aren't imported from 'redux-saga' anymore. imports them fromredux-saga/effects
,redux-saga/utils
is
helper should be imported from@redux-saga/is
.createMockTask
,cloneableGenerator
should be imported from@redux-saga/testing-utils
race
should be finished if any of effects resolved withEND
(by analogy with all)cancel(...[tasks])
andjoin(...[tasks])
tocancel([tasks])
andjoin([tasks])
respectively. also callingcancel(...)
returns a cancel-effect (before it may return anall
effect), and callingjoin(...)
returns a join-effect.{[IO]: true, [type]: payload }
to{ [IO]: true, type, payload }
to get rid of dynamictype
property. Could affect you if implement custom monitor for saga effects.arrayOfDeffered
got renamed to the correctarrayOfDeferred
New functionality
yield take(multicastChannel, pattern)
effectMiddlewares
- useful especially for testing, you can intercept/hijack any effect and resolve it on your own - passing it very redux-style to the next middleware (last being redux-saga itself). How it might be used can be checked here. Many thanks to @eloytoro for this featuretakeLeading
helper. It takes "leading" action and ignores all incoming ones of the same type while the "leading" is still handled (useful for things debouncing)retry
helper. Receives a function and executes it (with blocking call). In case of failure will try to make another call afterdelayLength
milliseconds, if a number of attempts <maxTries
parameterdebounce
helper. Spawns asaga
on an action dispatched to the Store that matchespattern
. Saga will be called after it stops takingpattern
actions forms
milliseconds. Purpose of this is to prevent calling saga until the actions are settled off.v0.15.6
Compare Source
TS Typings
take
andput
effects redeclarable (thanks to @Rokt33r)put.sync
as deprecatedv0.15.5
Compare Source
TS Typings
CpsCallback
(thanks to @dannsam)cloneableGenerator
function (thanks to @zyml)v0.15.4
Compare Source
v0.15.3
Compare Source
context
not being passed to the root sagas (thanks @VictorQueiroz)v0.15.2
Compare Source
const two = yield 2
), however yielding falsy values prevented yielding saga to continuev0.15.1
Compare Source
Symbol
s for some internal properties - this caused 2 redux-saga version to be incompatible, effects from one couldnt be interpreted by the other onev0.15.0
Compare Source
Things published already under recent patch versions, but without public release noted:
redux-saga/effects
andredux-saga/utils
working properly forwebpack2
androllup
users (or any other bundle which recognizesjsnext: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.join(...tasks)
implementation, its not accepting an array of tasks, but rather a variadic number of tasks as argumentscancel(...tasks)
in similar manneryield cancel()
inside a task and handle bothcancel(task)
+ self cancellation viacancel()
within the samefinally
blockgetContext
andsetContext
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.createSagaMiddleware({ onerror })
which got into library because of a typo and we have supported it for some time, please useonError
insteadNew in this release:
runSaga
API,runSaga(iterator, storeInterface)
got depreacted in favor ofrunSaga(storeInterface, saga, ...args)
. It allowed us to leverage the change internally so nowsagaMiddleware.run
became partially appliedrunSaga
, 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 @nihauxcall([obj, 'method'])
- now you can pass a string as method's name which should be called on the passed contextall
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 thePromise.all
API. Please use this from now onBug fixes:
eventChannel
s not closing automatically upon emittingEND
, thanks to @baldwmicIn the meantime we have also:
rollup
ed UMD build, which is way smaller than the one which was produced by a webpack, thanks to the so called 'flat-bundling'v0.14.8
Compare Source
v0.14.7
Compare Source
v0.14.6
Compare Source
v0.14.5
Compare Source
v0.14.4
Compare Source
Fixes
take
effect supportingSymbol
types again - thanks to @iMosesv0.14.3
Compare Source
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 thetake
effect like this: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 ofCHANNEL_END
got fixed).v0.14.2
Compare Source
This small update allows you to integrate better with some other redux libraries, like redux-batched-actions.
From now on you can intercept what's being dispatched before it's emitted into the saga, which will allow for using
take
just like everybody else, instead of playing with thepattern
argument.The argument you need to pass to the middleware is a higher-order function which will first take out built-in
emit
function as the argument and return a 'middleware' function to process dispatchedaction
s.Example usage:
More can be read in our docs
Great thanks to the @pbadenski for implementing the feature.
v0.14.1
Compare Source
Just a small patch version with:
join(...tasks)
- this effect creator will accept array of tasks from now on, it's just a shorthand (more obvious one) fortasks.map(join)
take(array)
- array can be now of mixed types - strings and predicate functions so this is possible nowyield take(['ACTION_A', ac => ac.payload])
redux-saga/effects
, that meanstakeEvery
,takeLatest
,throttle
(thanks to @mcrawshaw)v0.14.0
Compare Source
This release contains mostly deprecations, but only a mild ones. Mainly few things got better, more descriptive names to indicate their behaviour and helpers got their way into
effects
. Of course as those are deprecations only, we are still planning to support old APIs for a time being, but as those do not require much change in the code they old versions will get removed eventually.New features:
Fixes:
runSaga
APIDeprecations:
put.sync
got renamed toput.resolve
takem
got renamed totake.maybe
createSagaMiddleware({ onerror })
got fixed in the code (was documented asonError
) and should be used from now on as docs suggested -createSagaMiddleware({ onError })
(thanks to @kuy)takeEvery
,takeLatest
,throttle
) got their respective counterparts inredux-saga/effects
module, which should confuse people less and be more newcomers-friendlyAlso few typings were fixed, thanks to @yenshih, @CarsonF and @aikoven for veryfing.
And last (but not least) great thanks and much appreciation to everyone who has contributed to improving the docs!
Happy Christmas.
v0.13.0
Compare Source
This release includes an Improved saga monitor API (see #609).
sagaMiddleware.run
orrunSaga
.actionDispatched
trigger to the monitor contract. We need this in order to figure out saga/take effects that reacted to a given action. Also added a silent flagSAGA_ACTION
(non enumerable property) added to distinguish actions dispatched by sagas from others.Other changes
Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.