Originally created by: dependabot[bot]
Bumps redux from 4.2.0 to 5.0.1.
Sourced from redux's releases.
v5.0.1
This patch release adjusts the
isPlainObjectutil to allow objects created viaObject.create(null), and fixes a type issue which accidentally made the store state type non-nullable.What's Changed
- fix(isPlainObject): support check Object.create(null) by
@zhe-hein reduxjs/redux#4633](https://github.com/href="https://redirect.github.com/reduxjs/redux/pull/4633">reduxjs/redux/issues/4633)- fix(types/store): Unexpectedly narrowed return type of function
Store['getState']by@exuanboin reduxjs/redux#4638](https://github.com/href="https://redirect.github.com/reduxjs/redux/pull/4638">reduxjs/redux/issues/4638)Full Changelog: https://github.com/reduxjs/redux/compare/v5.0.0...v5.0.1
v5.0.0
This major release:
- Converts the codebase to TypeScript
- Updates the packaging for better ESM/CJS compatibility and modernizes the build output
- Requires that
action.typemust be a string- Continues to mark
createStoreas deprecated- Deprecates the
AnyActiontype in favor of anUnknownActiontype that is used everywhere- Removes the
PreloadedStatetype in favor of a new generic argument for theReducertype.This release has breaking changes.
This release is part of a wave of major versions of all the Redux packages: Redux Toolkit 2.0, Redux core 5.0, React-Redux 9.0, Reselect 5.0, and Redux Thunk 3.0.
For full details on all of the breaking changes and other significant changes to all of those packages, see the "Migrating to RTK 2.0 and Redux 5.0" migration guide in the Redux docs.
[!NOTE] The Redux core, Reselect, and Redux Thunk packages are included as part of Redux Toolkit, and RTK users do not need to manually upgrade them - you'll get them as part of the upgrade to RTK 2.0. (If you're not using Redux Toolkit yet, please start migrating your existing legacy Redux code to use Redux Toolkit today!)
# RTK npm install @reduxjs/toolkit yarn add @reduxjs/toolkitStandalone
npm install redux yarn add reduxChangelog
ESM/CJS Package Compatibility
The biggest theme of the Redux v5 and RTK 2.0 releases is trying to get "true" ESM package publishing compatibility in place, while still supporting CJS in the published package.
The primary build artifact is now an ESM file,
dist/redux.mjs. Most build tools should pick this up. There's also a CJS artifact, and a second copy of the ESM file namedredux.legacy-esm.jsto support Webpack 4 (which does not recognize theexportsfield inpackage.json). Additionally, all of the build artifacts now live under./dist/in the published package.Modernized Build Output
We now publish modern JS syntax targeting ES2020, including optional chaining, object spread, and other modern syntax. If you need to
... (truncated)
50b0102 format isPlainObject.ts66f955f 5.0.1ffb02eb Merge pull request #4644](https://github.com/href="https://redirect.github.com/reduxjs/redux/issues/4644">/issues/4644) from reduxjs/publish-cid641945 add me to FUNDING.yml7a2fa78 Add publish CI workflowfa2d899 Merge pull request #4638](https://github.com/href="https://redirect.github.com/reduxjs/redux/issues/4638">/issues/4638) from exuanbo/patch-19e8a320 add type test105e389 Merge pull request #4643](https://github.com/href="https://redirect.github.com/reduxjs/redux/issues/4643">/issues/4643) from ziayanj/patch-1f259beb Update why-rtk-is-redux-today.md3cd25e1 Merge pull request #4642](https://github.com/href="https://redirect.github.com/reduxjs/redux/issues/4642">/issues/4642) from factiondavid/patch-1This version was pushed to npm by phryneas, a new releaser for redux since your current version.
You can trigger a rebase of this PR by commenting @dependabot rebase.
Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Originally posted by: RARgames
@dependabot recreate