Closed renovate[bot] closed 1 year ago
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
â™» Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below:
npm notice
npm notice New major version of npm available! 8.19.4 -> 9.5.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.5.0>
npm notice Run `npm install -g npm@9.5.0` to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@0.0.0
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR! react@"18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
npm ERR! node_modules/@material-ui/core
npm ERR! @material-ui/core@"4.12.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /tmp/renovate-cache/others/npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/renovate-cache/others/npm/_logs/2023-02-21T05_36_58_652Z-debug-0.log
This PR contains the following updates:
1.8.6
->1.9.3
1.8.6
->1.9.3
Release Notes
reduxjs/redux-toolkit
### [`v1.9.3`](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.3) [Compare Source](https://togithub.com/reduxjs/redux-toolkit/compare/v1.9.2...v1.9.3) This release fixes a couple issues with the `skip/skipToken` options for query hooks, and makes a small perf tweak to serializing query args. #### Changelog ##### Skip Behavior We made a change in [v1.9.0](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.0) that tried to make some skip behavior more consistent, including clearing out the cached data. However, we had overlooked that our own docs actually said "skipping a query will *keep* the cached data", and several users pointed this out as they'd been relying on that behavior. We've reverted that change. Now, setting `{skip: true}` or `skipToken` for a query with existing results will keep the `data` value (reflecting the last successful query), but `currentData` will be undefined (reflecting the *current* settings). We also identified and fixed an issue that could cause subscription entries to leak under a specific combination of timing and settings changes. ##### Query Arg Serialization Perf RTKQ relies on serializing query arguments to serve as the cache keys, with the default using `JSON.stringify()` + some logic for sorting keys. There was a report that in some apps, large query arg objects could take a while to stringify and this was being done repeatedly. We've added a `WeakMap`-based cache for query args to avoid re-serializing existing arg values. #### What's Changed - Revert "clear data on skip" back to its original behavior by [@markerikson](https://togithub.com/markerikson) in [https://github.com/reduxjs/redux-toolkit/pull/3188](https://togithub.com/reduxjs/redux-toolkit/pull/3188) - Use a WeakMap cache for query arg serialization for perf by [@markerikson](https://togithub.com/markerikson) in [https://github.com/reduxjs/redux-toolkit/pull/3193](https://togithub.com/reduxjs/redux-toolkit/pull/3193) **Full Changelog**: https://github.com/reduxjs/redux-toolkit/compare/v1.9.2...v1.9.3 ### [`v1.9.2`](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.2) [Compare Source](https://togithub.com/reduxjs/redux-toolkit/compare/v1.9.1...v1.9.2) This bugfix release fixes a memory leak in `createListenerMiddleware`, optimizes performance inside `serializableMiddleware`, adds new options for `fetchBaseQuery`, adds support for path `RegExp` exclusions in `serializableMiddleware` and `immutabilityMiddleware`, and improves some TS types. #### Changelog ##### Bug Fixes `createListenerMiddleware` had a memory leak that turned out to be [due to use of `Promise.race()`](https://togithub.com/reduxjs/redux-toolkit/issues/3020). We've restructured the logic to fix that. `fetchBaseQuery` now correctly combines global options with endpoint / default options in all cases. ##### New Options `fetchBaseQuery` now supports a `jsonReplacer` option that will be used when processing JSON. Both dev check middleware now support regular expressions in the `ignoredPaths` array in addition to strings. This adds extra flexibility in skipping certain fields. ##### TS Changes The `CaseReducer` type was sometimes incorrectly inferring its return type in rare cases. That's been fixed. The `isAnyOf/isAllOf` matcher function TS types have been tweaked to not require an individual first parameter. This allows spreading arrays of matchers as arguments, like `const isLoading = isAnyOf(...interestingPendingThunksArray)`. ##### Other Changes The `serializableMiddleware` now uses a `WeakSet` if available to cache values it's seen. This should significantly speed up checks against large state values in development builds. #### What's Changed - fix CaseReducer to infer from argument, not return value by [@phryneas](https://togithub.com/phryneas) in [https://github.com/reduxjs/redux-toolkit/pull/3054](https://togithub.com/reduxjs/redux-toolkit/pull/3054) - fetchBaseQuery | Add jsonReplacer param by [@tophep](https://togithub.com/tophep) in [https://github.com/reduxjs/redux-toolkit/pull/2904](https://togithub.com/reduxjs/redux-toolkit/pull/2904) - Support RegExp in ignoredPaths/ignoredActionPaths by [@markerikson](https://togithub.com/markerikson) in [https://github.com/reduxjs/redux-toolkit/pull/3129](https://togithub.com/reduxjs/redux-toolkit/pull/3129) - fix(types): export `ThunkWithReturnValue` interface by [@giomogna](https://togithub.com/giomogna) in [https://github.com/reduxjs/redux-toolkit/pull/3108](https://togithub.com/reduxjs/redux-toolkit/pull/3108) - remove unnecessary fetchBaseQuery defaults by [@phryneas](https://togithub.com/phryneas) in [https://github.com/reduxjs/redux-toolkit/pull/3062](https://togithub.com/reduxjs/redux-toolkit/pull/3062) - make isAnyOf friendly for mapped matchers, but making argument optional by [@megagon](https://togithub.com/megagon) in [https://github.com/reduxjs/redux-toolkit/pull/3123](https://togithub.com/reduxjs/redux-toolkit/pull/3123) - `raceWithSignal` method instead of `Promise.race` by [@phryneas](https://togithub.com/phryneas) in [https://github.com/reduxjs/redux-toolkit/pull/3021](https://togithub.com/reduxjs/redux-toolkit/pull/3021) - Fix lint problems and enable linting on CI by [@thorn0](https://togithub.com/thorn0) in [https://github.com/reduxjs/redux-toolkit/pull/2992](https://togithub.com/reduxjs/redux-toolkit/pull/2992) - Add caching to serializableStateInvariantMiddleware by [@GeorchW](https://togithub.com/GeorchW) in [https://github.com/reduxjs/redux-toolkit/pull/3115](https://togithub.com/reduxjs/redux-toolkit/pull/3115) - Allow TS isolatedModules flag to be set for safer transpilation by [@matmannion](https://togithub.com/matmannion) in [https://github.com/reduxjs/redux-toolkit/pull/2911](https://togithub.com/reduxjs/redux-toolkit/pull/2911) **Full Changelog**: https://github.com/reduxjs/redux-toolkit/compare/v1.9.1...v1.9.2 ### [`v1.9.1`](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.1) [Compare Source](https://togithub.com/reduxjs/redux-toolkit/compare/v1.9.0...v1.9.1) This bugfix release fixes assorted issues that were reported with RTK 1.9.0, and adds a few additional requested tweaks and improvements. #### Changelog ##### Fixes The `createAsyncThunk.withTypes` function was fully broken (it type-checked correctly, but pointed to the wrong function due to a name shadowing issue). That now works correctly. The `maxRetries` option for RTKQ was inadvertently filtering out `0` values, and those are now accepted. `fulfillWithValue` had incorrect types that made it appear as if the data was nested an additional level deeper. The types are now correct. The `ActionCreatorWithoutPayload` type was tweaked to force an error when an action creator is accidentally called with an argument, which happens in cases like `onClick={todoAdded}`. This avoids accidentally passing values like React event objects as the payload. Timer handling for `batchActions` and `autoBatchEnhancer` now works in more JS runtime environments. ##### Other Changes The `TagDescription` type is now exported from RTKQ. API endpoints now have a `.name` field containing the endpoint name, such as `"getPokemon"`. Calling `promise.abort()` on a `createAsyncThunk` promise before an async `condition` resolves will now be treated as if the `condition` itself returned `false`, bailing out and not dispatching anything. The `merge` option now receives a third argument containing `{arg, baseQueryMeta, fulfilledTimeStamp, requestId}`, in case that info is useful in deciding how to merge. The `@reduxjs/rtk-codemods` package has been updated to fix cases where the `createSliceBuilder` codemod didn't preserve fields with function variable arguments, like `[todoAdded]: adapter.addOne`. That package has been updated to v0.0.3. #### What's Changed - fix createAsyncThunk.withTypes by [@phryneas](https://togithub.com/phryneas) in [https://github.com/reduxjs/redux-toolkit/pull/2885](https://togithub.com/reduxjs/redux-toolkit/pull/2885) - Update timer polyfills to work in more environments by [@markerikson](https://togithub.com/markerikson) in [https://github.com/reduxjs/redux-toolkit/pull/2887](https://togithub.com/reduxjs/redux-toolkit/pull/2887) - Retry now checks whether potential retry counts are undefined, rather than boolean, in order to avoid filtering out 0's by [@OliverRadini](https://togithub.com/OliverRadini) in [https://github.com/reduxjs/redux-toolkit/pull/2958](https://togithub.com/reduxjs/redux-toolkit/pull/2958) - Fix multiple small issues with 1.9 by [@markerikson](https://togithub.com/markerikson) in [https://github.com/reduxjs/redux-toolkit/pull/2964](https://togithub.com/reduxjs/redux-toolkit/pull/2964) - fulfillWithValue should infer return value by [@phryneas](https://togithub.com/phryneas) in [https://github.com/reduxjs/redux-toolkit/pull/2888](https://togithub.com/reduxjs/redux-toolkit/pull/2888) - Fix Identifier/MemberExpression values in createSliceBuilder codemod by [@kyletsang](https://togithub.com/kyletsang) in [https://github.com/reduxjs/redux-toolkit/pull/2881](https://togithub.com/reduxjs/redux-toolkit/pull/2881) - Additional 1.9.1 fixes by [@markerikson](https://togithub.com/markerikson) in [https://github.com/reduxjs/redux-toolkit/pull/2965](https://togithub.com/reduxjs/redux-toolkit/pull/2965) **Full Changelog**: https://github.com/reduxjs/redux-toolkit/compare/v1.9.0...v1.9.1 ### [`v1.9.0`](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.0) [Compare Source](https://togithub.com/reduxjs/redux-toolkit/compare/v1.8.6...v1.9.0) This **feature release** adds several new options for RTK Query's `createApi` and `fetchBaseQuery` APIs, adds a new `upsertQueryData` util, rewrites RTKQ's internals for improved performance, adds a new `autoBatchEnhancer`, deprecates the "object" syntax for `createReducer` and `createSlice.extraReducers`, deprecates and *removes* broken utils for getting running query promises, improves TS inference, exports additional types, and fixes a number of reported issues. ```bash npm i @reduxjs/toolkit@latest yarn add @reduxjs/toolkit@latest ``` We plan to start work on [RTK 2.0](https://togithub.com/reduxjs/redux-toolkit/issues/958) in the next few weeks. RTK 2.0 will focus on dropping legacy build compatibility and deprecated APIs, with some potential new features. See the linked discussion thread and give us feedback on ideas! #### Deprecations and Removals ##### Object Argument for `createReducer` and `createSlice.extraReducers` RTK's `createReducer` API was originally designed to accept a lookup table of action type strings to case reducers, like `{ "ADD_TODO" : (state, action) => {} }`. We later added [the "builder callback" form]() to allow more flexibility in adding "matchers" and a default handler, and did the same for `createSlice.extraReducers`. **We intend to remove the "object" form for both `createReducer` and `createSlice.extraReducers` in RTK 2.0**. The builder callback form is effectively the same number of lines of code, and works *much* better with TypeScript. Starting with this release, **RTK will print a one-time runtime warning for both `createReducer` and `createSlice.extraReducers` if you pass in an object argument**. As an example, this: ```js const todoAdded = createAction('todos/todoAdded'); createReducer(initialState, { [todoAdded]: (state, action) => {} }) createSlice({ name, initialState, reducers: {/* case reducers here */}, extraReducers: { [todoAdded]: (state, action) => {} } }) ``` should be migrated to: ```js createReducer(initialState, builder => { builder.addCase(todoAdded, (state, action) => {}) }) createSlice({ name, initialState, reducers: {/* case reducers here */}, extraReducers: builder => { builder.addCase(todoAdded, (state, action) => {}) } }) ``` ##### Codemods for Deprecated Object Reducer Syntax To simplify upgrading codebases, we've published a set of codemods that will automatically transform the deprecated "object" syntax into the equivalent "builder" syntax. The codemods package is available on NPM as [**`@reduxjs/rtk-codemods`**](https://www.npmjs.com/package/@reduxjs/rtk-codemods). It currently contains two codemods: `createReducerBuilder` and `createSliceBuilder`. To run the codemods against your codebase, run `npx @reduxjs/rtk-codemodsObject reducer codemod before/after examples
Before: ```js createReducer(initialState, { [todoAdded1a]: (state, action) => { // stuff }, [todoAdded1b]: (state, action) => action.payload, }); const slice1 = createSlice({ name: "a", initialState: {}, extraReducers: { [todoAdded1a]: (state, action) => { // stuff }, [todoAdded1b]: (state, action) => action.payload, } }) ``` After: ```js createReducer(initialState, (builder) => { builder.addCase(todoAdded1a, (state, action) => { // stuff }); builder.addCase(todoAdded1b, (state, action) => action.payload); }) const slice1 = createSlice({ name: "a", initialState: {}, extraReducers: (builder) => { builder.addCase(todoAdded1a, (state, action) => { // stuff }); builder.addCase(todoAdded1b, (state, action) => action.payload); } }) ```Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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 these updates again.
This PR has been generated by Mend Renovate. View repository job log here.