Open
Conversation
1c68e7f to
34b4e9b
Compare
34b4e9b to
43dd8ea
Compare
43dd8ea to
2c6d8e9
Compare
2c6d8e9 to
3c2cf39
Compare
3c2cf39 to
62c3dc8
Compare
62c3dc8 to
f51b8d3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.3Release Notes
redux-saga/redux-saga
v1.1.3Compare Source
v1.1.2Compare Source
v1.1.1Compare Source
Fixes resolving TS types for
redux-saga/effectsv1.1.0Compare Source
This release is bringing improved TS typings - allowed by TS@3.6. Thanks, @gilbsgilbs for working on this 👍
For more on this please read #1892 (comment)
v1.0.5Compare Source
v1.0.4Compare Source
v1.0.3Compare Source
v1.0.2Compare Source
v1.0.1Compare Source
v1.0.0Compare Source
During work on v1, we made several breaking changes
Breaking changes
finallyblock fail-safetakeEvery,takeLatest,throttlefrom the redux-saga entry point (they are and were importable fromredux-saga/effects).put.syncandtakemwere removed.yield [...]. usealleffect instead.delaybecame an effect, olddelayfunction (not effect!) can be imported from@redux-saga/delay-pput.resolvewas changed toputResolvetake.maybewas changed totakeMaybetakeandputmethodstask.donegetter was changed to betask.toPromisemethodonErrordoesn't extenderrorwith additional fieldsagaStack, but pass it as a property of second argument. before:onError: (e: Error), after:onError(e: Error, { sagaStack })Effectshape, 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/utilsishelper should be imported from@redux-saga/is.createMockTask,cloneableGeneratorshould be imported from@redux-saga/testing-utilsraceshould 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 analleffect), and callingjoin(...)returns a join-effect.{[IO]: true, [type]: payload }to{ [IO]: true, type, payload }to get rid of dynamictypeproperty. Could affect you if implement custom monitor for saga effects.arrayOfDefferedgot renamed to the correctarrayOfDeferredNew 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 featuretakeLeadinghelper. It takes "leading" action and ignores all incoming ones of the same type while the "leading" is still handled (useful for things debouncing)retryhelper. Receives a function and executes it (with blocking call). In case of failure will try to make another call afterdelayLengthmilliseconds, if a number of attempts <maxTriesparameterdebouncehelper. Spawns asagaon an action dispatched to the Store that matchespattern. Saga will be called after it stops takingpatternactions formsmilliseconds. Purpose of this is to prevent calling saga until the actions are settled off.v0.16.2Compare Source
v0.16.1Compare Source
v0.16.0Compare Source
During work on v1, we made several breaking changes
Breaking changes
finallyblock fail-safetakeEvery,takeLatest,throttlefrom the redux-saga entry point (they are and were importable fromredux-saga/effects).put.syncandtakemwere removed.yield [...]. usealleffect instead.delaybecame an effect, olddelayfunction (not effect!) can be imported from@redux-saga/delay-pput.resolvewas changed toputResolvetake.maybewas changed totakeMaybetakeandputmethodstask.donegetter was changed to betask.toPromisemethodonErrordoesn't extenderrorwith additional fieldsagaStack, but pass it as a property of second argument. before:onError: (e: Error), after:onError(e: Error, { sagaStack })Effectshape, 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/utilsishelper should be imported from@redux-saga/is.createMockTask,cloneableGeneratorshould be imported from@redux-saga/testing-utilsraceshould 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 analleffect), and callingjoin(...)returns a join-effect.{[IO]: true, [type]: payload }to{ [IO]: true, type, payload }to get rid of dynamictypeproperty. Could affect you if implement custom monitor for saga effects.arrayOfDefferedgot renamed to the correctarrayOfDeferredNew 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 featuretakeLeadinghelper. It takes "leading" action and ignores all incoming ones of the same type while the "leading" is still handled (useful for things debouncing)retryhelper. Receives a function and executes it (with blocking call). In case of failure will try to make another call afterdelayLengthmilliseconds, if a number of attempts <maxTriesparameterdebouncehelper. Spawns asagaon an action dispatched to the Store that matchespattern. Saga will be called after it stops takingpatternactions formsmilliseconds. Purpose of this is to prevent calling saga until the actions are settled off.v0.15.6Compare Source
TS Typings
takeandputeffects redeclarable (thanks to @Rokt33r)put.syncas deprecatedv0.15.5Compare Source
TS Typings
CpsCallback(thanks to @dannsam)cloneableGeneratorfunction (thanks to @zyml)v0.15.4Compare Source
v0.15.3Compare Source
contextnot being passed to the root sagas (thanks @VictorQueiroz)v0.15.2Compare Source
const two = yield 2), however yielding falsy values prevented yielding saga to continuev0.15.1Compare Source
Symbols for some internal properties - this caused 2 redux-saga version to be incompatible, effects from one couldnt be interpreted by the other onev0.15.0Compare Source
Things published already under recent patch versions, but without public release noted:
redux-saga/effectsandredux-saga/utilsworking properly forwebpack2androllupusers (or any other bundle which recognizesjsnext:main/moduleentry). 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 samefinallyblockgetContextandsetContexteffects (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 useonErrorinsteadNew in this release:
runSagaAPI,runSaga(iterator, storeInterface)got depreacted in favor ofrunSaga(storeInterface, saga, ...args). It allowed us to leverage the change internally so nowsagaMiddleware.runbecame partially appliedrunSaga, they wont now go out of sync (in the past changes and bug fixes had to implemented in both of them).cloneableGeneratorutils, 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 contextalleffect - 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.allAPI. Please use this from now onBug fixes:
eventChannels not closing automatically upon emittingEND, thanks to @baldwmicIn the meantime we have also:
rolluped UMD build, which is way smaller than the one which was produced by a webpack, thanks to the so called 'flat-bundling'v0.14.8Compare Source
v0.14.7Compare Source
v0.14.6Compare Source
v0.14.5Compare Source
v0.14.4Compare Source
Fixes
takeeffect supportingSymboltypes again - thanks to @iMosesv0.14.3Compare 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-sagaand they can use created actions as patterns for thetakeeffect 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
rollupshould be fixed (public export ofCHANNEL_ENDgot fixed).v0.14.2Compare 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
takejust like everybody else, instead of playing with thepatternargument.The argument you need to pass to the middleware is a higher-order function which will first take out built-in
emitfunction as the argument and return a 'middleware' function to process dispatchedactions.Example usage:
More can be read in our docs
Great thanks to the @pbadenski for implementing the feature.
v0.14.1Compare 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.0Compare 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:
runSagaAPIDeprecations:
put.syncgot renamed toput.resolvetakemgot renamed totake.maybecreateSagaMiddleware({ 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/effectsmodule, 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.0Compare Source
This release includes an Improved saga monitor API (see #609).
sagaMiddleware.runorrunSaga.actionDispatchedtrigger 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.