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

fix(deps): update dependency redux-thunk to v3 j:kit-282 #3665

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 4, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
redux-thunk 2.4.2 -> 3.1.0 age adoption passing confidence

Release Notes

reduxjs/redux-thunk (redux-thunk)

v3.1.0

Compare Source

This major release:

  • Updates the packaging for better ESM/CJS compatibility
  • Changes the package to use named exports instead of a default export

This release has breaking changes. (Note: this actually points to v3.1.0, which includes a hotfix that was meant for 3.0.0.)

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/toolkit

### Standalone
npm install redux-thunk
yarn add redux-thunk

Changelog

Named Exports Instead of Default Exports

The redux-thunk package previously used a single default export that was the thunk middleware, with an attached field named withExtraArgument that allowed customization.

The default export has been removed. There are now two named exports: thunk (the basic middleware) and withExtraArgument.

If you are using Redux Toolkit, this should have no effect, as RTK already handles this inside of configureStore.

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-thunk.mjs. Most build tools should pick this up. There's also a CJS artifact, and a second copy of the ESM file named redux-thunk.legacy-esm.js to support Webpack 4 (which does not recognize the exports field in package.json).

Build Tooling

We're now building the package using https://github.com/egoist/tsup. We also now include sourcemaps for the ESM and CJS artifacts.

The repo has been updated to use Yarn 3 for dependencies and Vitest for running tests.

Dropping UMD Builds

Redux has always shipped with UMD build artifacts. These are primarily meant for direct import as script tags, such as in a CodePen or a no-bundler build environment.

For now, we're dropping those build artifacts from the published package, on the grounds that the use cases seem pretty rare today.

Since the code is so simple, the ESM artifact can be used directly in the browser via Unpkg.

If you have strong use cases for us continuing to include UMD build artifacts, please let us know!

extend-redux Typedefs Removed

Redux Thunk 2.x included a redux-thunk/extend-redux TS-only entry point, which extended the types of dispatch and bindActionCreators to globally give them knowledge of the thunk types. We feel that global overrides from a library are an anti-pattern, and we've removed this entry point. (Note: this ended up being released in 3.1.0, as it was missed in the original 3.0.0 release.)

Please follow our TS setup guidelines to infer the correct type of dispatch for your store.

What's Changed

Full Changelog: reduxjs/redux-thunk@v2.4.2...v3.1.0

v3.0.1

Compare Source

v3.0.0

Compare Source


Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - 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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner March 4, 2024 03:44
@renovate renovate bot added the dependencies Pull requests that update a dependency file label Mar 4, 2024
@renovate renovate bot force-pushed the renovate/major-redux branch 2 times, most recently from 7752e9e to f72b44a Compare March 11, 2024 18:56
@renovate renovate bot changed the title fix(deps): update redux j:kit-282 (major) fix(deps): update dependency redux-thunk to v3 j:kit-282 Mar 11, 2024
Copy link

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 218.6 218.6 0
commerce 306.4 306.4 0
search 376.8 376.8 0
insight 341.5 341.5 0
product-listing 311.5 311.5 0
product-recommendation 185.8 185.8 0
recommendation 233 233 0
ssr 371.7 371.7 0

@renovate renovate bot force-pushed the renovate/major-redux branch from f72b44a to 5ca4cb5 Compare March 11, 2024 19:57
@louis-bompart louis-bompart enabled auto-merge March 12, 2024 14:53
@louis-bompart louis-bompart added this pull request to the merge queue Mar 12, 2024
Merged via the queue into master with commit 4f4c978 Mar 12, 2024
90 checks passed
@louis-bompart louis-bompart deleted the renovate/major-redux branch March 12, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant