Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump redux-saga from 0.15.3 to 1.1.3 #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot-preview[bot]
Copy link

Bumps redux-saga from 0.15.3 to 1.1.3.

Release notes

Sourced from redux-saga's releases.

v1.1.1

Fixes resolving TS types for redux-saga/effects

v1.1.0

This release is bringing improved TS typings - allowed by TS@3.6. Thanks, @​gilbsgilbs for working on this 👍

For more on this please read https://github-redirect.dependabot.com/redux-saga/redux-saga/pull/1892#issue-297396449

v1.0.0

Breaking changes:

  • channel and actionChannel have default buffer of buffers.expanding()
  • errors thrown during put execution are no longer caught and swallowed, you need to catch them manually
  • signature of join & cancel, they both accept now a single task descriptor or an array of those (previously they have accepted variadic length of arguments)
  • removed some deprecated APIs - takeEvery, takeLatest, throttle from the redux-saga entry point (they are and were importable from redux-saga/effects), takem, put.sync and executing array of effects, there is explicit API for this for already some time - all effect
  • changed API of runSaga - it no longer accepts subscribe option, you should create a channel (preferably stdChannel), pass it as channel argument to the runSaga API and communicate with through it with take and put methods
  • refactored shape of the effect objects to { [IO]: true, type, payload }
  • removed asEffect, effect types are public, effect shapes are stable, so if for whatever reason you want to do some effect inspection you can just check them without us providing additional helpers for it
  • removed logError, use only onError option (it's signature is onError(error, { sagaStack }))
  • END will now finish the race effects
  • task.done getter was changed to be task.toPromise method
  • channels private getters (__takers__ and __closed__) got removed
  • delay became an effect
  • redux-saga/utils got removed, exports available exclusively there got moved to separate packages - @redux-saga/deferred, @redux-saga/delay-p, @redux-saga/is, @redux-saga/symbols & @redux-saga/testing-utils
  • eventChannel does no longer accept matcher argument - it was a hacky way to support previous implementation of stdChannel
  • {effects, utils} can't imported from 'redux-saga' anymore
  • most runtime type checks got hidden behing development checks, inputs might not be validated in production (failed validation resulted in error being thrown anyway)
  • detach helper returns a new effect instead of mutating the input one
  • we have stopped interpreting effects returned from fork, this shouldn't affect any real-life code, affected patterns look like this fork(() => effectCreator()) and fork(takeEvery, 'type', fn)
  • TS typings got revamped - they require TS@>3.1 now

New:

  • babel-plugin-redux-saga - can be used to enhance stack traces of thrown errors
  • multicastChannel - no buffering, notify all pending takers, multicastChannel#take(cb, matcher = matchers.wildard)
  • support for yield take(multicastChannel, pattern)
  • internal stdChannel got reworked to be a singleton object (it is wrapped multicastChannel's instance'), also it is an exported API to support new runSaga's signature - this should also result in being a small perf boost
  • 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.
  • takeLeading effect - it takes "leading" action and ignores all incoming ones of the same type while the "leading" is still handled (useful for things debouncing)
  • retry effect with the signature of retry(maxTries, delayLength, worker, ...args)
  • debounce effect with the signature of debounce(delayLength, pattern, worker, ...args)
  • new rootSagaStarted hook for saga monitor
  • added dev warning about dispatching frozen actions, for scheduling purposes we are using Object.defineProperty on actions dispatched with put effect, so we have to be able to mutate the action object
  • added dev warning about using async generators, they are not supported by redux-saga
  • CommonJS entries are proxied now. This means that process.env.NODE_ENV is read only once and based on that value the appropriate bundle (development or production) is loaded conditionally with require. process.env is slow in node.js so this should improve performance a little bit.
  • isRoot property on Task (you probably won't ever need to use it, it's internal)

Fixes:

  • keeping single stdChannel in the internals allowed to fix 2 bugs with missed actions (see #707 and #1146)
  • onError should get called now even if you throw non-Errors in your code.
  • we suspend the scheduler before running a root saga, so it should behave the same as forked sagas in terms of scheduling
  • small memory leak for closed actionChannels
... (truncated)
Changelog

Sourced from redux-saga's changelog.

Changes from v0.16.0 to v1.0.0

During work on v1, we made several breaking changes

Breaking changes

  • errors thrown during put execution are no longer caught and swallowed, you need to catch them manually
  • errors thrown during cancellation process are no longer swallowed, you need to keep finally block fail-safe
  • removed some deprecated APIs - takeEvery, takeLatest, throttle from the redux-saga entry point (they are and were importable from redux-saga/effects). put.sync and takem were removed.
  • removing execution of an array of effects yield [...]. use all effect instead.
  • delay became an effect, old delay function (not effect!) can be imported from @redux-saga/delay-p
  • put.resolve was changed to putResolve
  • take.maybe was changed to takeMaybe
  • changed API of runSaga - it no longer accepts subscribe option, you should create a channel (preferably stdChannel), pass it as channel argument to the runSaga API and communicate with through it with take and put methods
  • task.done getter was changed to be task.toPromise method
  • onError doesn't extend error with additional field sagaStack, 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
  • channels private getters (takers and closed) got removed
  • {effects, utils} aren't imported from 'redux-saga' anymore. imports them from redux-saga/effects, redux-saga/utils
  • is helper should be imported from @redux-saga/is.
  • createMockTask, cloneableGenerator should be imported from @redux-saga/testing-utils
  • now race should be finished if any of effects resolved with END (by analogy with all)
  • cancel and join cannot receive variadic arguments anymore. so you have to rewrite cancel(...[tasks]) and join(...[tasks]) to cancel([tasks]) and join([tasks]) respectively. also calling cancel(...) returns a cancel-effect (before it may return an all effect), and calling join(...) returns a join-effect.
  • refactor effect structure from {[IO]: true, [type]: payload } to { [IO]: true, type, payload } to get rid of dynamic type property. Could affect you if implement custom monitor for saga effects.
  • channel and actionChannel have default buffer of buffers.expanding()
  • eventChannel does no longer accept matcher argument.
  • exported util of arrayOfDeffered got renamed to the correct arrayOfDeferred

New functionality

  • multicastChannel - no buffering, notify all pending takers, multicastChannel#take(cb, matcher = matchers.wildcard)
  • support for yield take(multicastChannel, pattern)
  • internal stdChannel got reworked to be a singleton object (it is wrapped multicastChannel's instance'), also it is an exported API to support new runSaga's signature - this should also result in being a small perf boost
  • 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 feature
  • takeLeading 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 after delayLength milliseconds, if a number of attempts < maxTries parameter
  • add debounce helper. Spawns a saga on an action dispatched to the Store that matches pattern. Saga will be called after it stops taking pattern actions for ms milliseconds. Purpose of this is to prevent calling saga until the actions are settled off.
Commits
  • d1c9aa3 v1.1.3
  • dac0308 Apply fix for TS@3.7 duplicated identifiers in TS@>=3.6 typings
  • da88bb4 v1.1.2
  • 9e52c73 Add Square Logo (#1957)
  • 02c4bd0 Added license section to the README (#1959)
  • 78bb886 Switch to node@12 for release workflow
  • 7aaa5b3 Remove explicit installation of yarn on CI - as it is available by default wh...
  • 0faebf7 Upgrade node action input name to node-version
  • b49317e Use yarn to run prerelease script
  • e4aeb4d Update @changesets/cli
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants