Skip to content

v1.9.2

Compare
Choose a tag to compare
@markerikson markerikson released this 28 Jan 21:21
· 2124 commits to master since this release

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(). 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 in #3054
  • fetchBaseQuery | Add jsonReplacer param by @tophep in #2904
  • Support RegExp in ignoredPaths/ignoredActionPaths by @markerikson in #3129
  • fix(types): export ThunkWithReturnValue interface by @giomogna in #3108
  • remove unnecessary fetchBaseQuery defaults by @phryneas in #3062
  • make isAnyOf friendly for mapped matchers, but making argument optional by @megagon in #3123
  • raceWithSignal method instead of Promise.race by @phryneas in #3021
  • Fix lint problems and enable linting on CI by @thorn0 in #2992
  • Add caching to serializableStateInvariantMiddleware by @GeorchW in #3115
  • Allow TS isolatedModules flag to be set for safer transpilation by @matmannion in #2911

Full Changelog: v1.9.1...v1.9.2