Update dependency redux-saga to v1 #337
Open
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.16.0->^1.0.0Release Notes
redux-saga/redux-saga
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.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 if you modify the PR title to begin with "
rebase!".🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot. View repository job log here.