-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Snyk] Upgrade: react-redux, redux-saga #1362
base: canary
Are you sure you want to change the base?
Conversation
Snyk has created this PR to upgrade: - react-redux from 8.0.5 to 8.1.3. See this package in npm: https://www.npmjs.com/package/react-redux - redux-saga from 1.2.3 to 1.3.0. See this package in npm: https://www.npmjs.com/package/redux-saga See this project in Snyk: https://app.snyk.io/org/sammytezzy/project/a731eb14-28e2-441c-8d24-bb782f32fa5f?utm_source=github&utm_medium=referral&page=upgrade-pr
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Run & review this pull request in StackBlitz Codeflow. |
|
Deployment failed with the following error:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have skipped reviewing this pull request. Here's why:
- It seems to have been created by a bot ('[Snyk]' found in title). We assume it knows what it's doing!
- We don't review packaging changes - Let us know if you'd like us to change this.
Snyk has created this PR to upgrade multiple dependencies.
👯♂ The following dependencies are linked and will therefore be updated together.ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
react-redux
from 8.0.5 to 8.1.3 | 6 versions ahead of your current version | a year ago
on 2023-10-01
redux-saga
from 1.2.3 to 1.3.0 | 1 version ahead of your current version | 8 months ago
on 2024-01-02
Release notes
Package name: react-redux
This bugfix release fixes an issue with subscriptions being lost when lazy-loaded components are used with React Suspense, and includes stack traces in
useSelector
usage warnings .What's Changed
Full Changelog: v8.1.2...v8.1.3
This version changes imports from the React package to namespace imports so the package can safely be imported in React Server Components as long as you don't actually use it - this is for example important if you want to use the React-specifc
createApi
function from Redux Toolkit.Some other changes:
globalThis
(in this case it will fall back to the previous behaviour).Full Changelog: v8.1.1...v8.1.2
This bugfix release tweaks the recent lazy context setup logic to ensure a single React context instance per React version, and removes the recently added RTK peerdep to fix an issue with Yarn workspaces.
Changelog
React Context Singletons
React Context has always relied on reference identity. If you have two different copies of React or a library in a page, that can cause multiple versions of a context instance to be created, leading to problems like the infamous "Could not find react-redux context" error.
In v8.1.0, we reworked the internals to lazily create our single
ReactReduxContext
instance to avoid issues in a React Server Components environment.This release further tweaks that to stash a single context instance per React version found in the page, thus hopefully avoiding the "multiple copies of the same context" error in the future.
What's Changed
Full Changelog: v8.1.0...v8.1.1
This feature release adds new development-mode safety checks for common errors (like poorly-written selectors), adds a workaround to fix crash errors when React-Redux hooks are imported into React Server Component files, and updates our hooks API docs page with improved explanations and updated links.
Changelog
Development Mode Checks for
useSelector
We've had a number of users tell us over time that it's common to accidentally write selectors that have bad behavior and cause performance issues. The most common causes of this are either selectors that unconditionally return a new reference (such as
state => state.todos.map()
without any memoization ), or selectors that actually return the entire root state (state => state
).We've updated
useSelector
to add safety checks in development mode that warn if these incorrect behaviors are detected:useSelector
will warn if the results are different referencesuseSelector
will warn if the selector result is actually the entire rootstate
By default, these checks only run once the first time
useSelector
is called. This should provide a good balance between detecting possible issues, and keeping development mode execution performant without adding many unnecessary extra selector calls.If you want, you can configure this behavior globally by passing the enum flags directly to
<Provider>
, or on a per-useSelector
basis by passing an options object as the second argument:This goes along with the similar safety checks we've added to Reselect v5 alpha as well.
Context Changes
We're still trying to work out how to properly use Redux and React Server Components together. One possibility is using RTK Query's
createApi
to define data fetching endpoints, and using the generated thunks to fetch data in RSCs, but it's still an open question.However, users have reported that merely importing any React-Redux API in an RSC file causes a crash, because
React.createContext
is not defined in RSC files. RTKQ's React-specificcreateApi
entry point imports React-Redux, so it's been unusable in RSCs.This release adds a workaround to fix that issue, by using a proxy wrapper around our singleton
ReactReduxContext
instance and lazily creating that instance on demand. In testing, this appears to both continue to work in all unit tests, and fixes the import error in an RSC environment. We'd appreciate further feedback in case this change does cause any issues for anyone!We've also tweaked the internals of the hooks to do checks for correct
<Provider>
usage when using a custom context, same as the default context checks.Docs Updates
We've cleaned up some of the Hooks API reference page, and updated links to the React docs.
What's Changed
Full Changelog: v8.0.7...v8.1.0
This release updates the peer dependencies to accept Redux Toolkit, and accept the ongoing RTK and Redux core betas as valid peer deps.
What's Changed
Full Changelog: v8.0.5...v8.0.7
This release updates the peer dependencies to accept Redux Toolkit, and accept the ongoing RTK and Redux core betas as valid peer deps.This release has a peer deps typo that breaks installation - please use 8.0.7 instead !
What's Changed
Full Changelog: v8.0.5...v8.0.6
This release fixes a few minor TS issues.
What's Changed
Provider
: pass state (S
) generic through toProviderProps
by @ OliverJAsh in #1960equalityFn
type inNoInfer
by @ phryneas in #1965Full Changelog: v8.0.4...v8.0.5
Package name: redux-saga
Minor Changes
3867c02
Thanks @ Andarist! - Removed a dependency on Redux to decouple the project from the exact Redux version. This should fix the compatibility with recently released Redux 5.Patch Changes
9c59ac9
,3867c02
]:Patch Changes
#2372
2cccf48
Thanks @ neurosnap! - Added achannel
property to theSagaMiddlewareOptions
to reflect its runtime support.Updated dependencies [
2cccf48
]:Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: