This bugfix release fixes an issue in the recent createEntityAdapter sorting perf improvements that could (in specific cases) cause Immer to throw an error when trying to read a plain JS value instead of a proxy-wrapped value.
This bugfix release improves sorting performance in createEntityAdapter, shrinks the code size in matcher utilities, fixes assorted issues with query hooks, and makes several TS tweaks.
Changelog
Entity Adapter Sorting Performance
Users reported in #4252 that the sorting performance of createEntityAdapter seemed abnormally bad - the provided comparison functions were being called far more times than expected.
Upon investigation, we had a couple of problems. We were always starting from an array that was in insertion order, not the existing sorted order, and that would always require significant effort to re-sort even if there weren't any actual changes to the sorted results. Also, the sorting checks required frequent access to Immer's Proxy-wrapped values, even in cases where all we needed was the plain state values for comparison purposes.
We've reworked the internal sorting logic to always start from the existing sorted array, do reads against a plain value to avoid the Proxy getter overhead where possible, and optimized inserts into existing sorted arrays. This should significantly speed up sorted entity adapter behavior.
Matcher Code Size Optimization
We've reworked the internals of the thunk-related matchers to deduplicate some of the logic, shaving a few bytes off the final bundle size.
RTK Query Hook Updates
defaultSerializeQueryArgs can now handle BigInt values safely.
The isLoading flag logic was improved to handle errors when a query hook tries to subscribe.
TS Updates
create.asyncThunk's types were improved to avoid cases where it might infer any.
We've made several internal types changes to work correctly with React 19's upcoming types.
The retryCondition method now receives unknown as an argument, instead of always assuming the user is using fetchBaseQuery.
Other Changes
The Reselect dep has been bumped to 5.1.0 to match the expected internal usage of createSelector.withTypes().
Bumps the lib group with 12 updates in the /frontend/lib directory:
2.2.3
2.2.5
20.12.12
20.14.5
18.3.1
18.3.3
7.8.0
7.13.1
7.8.0
7.13.1
3.6.0
3.7.0
8.57.0
9.5.0
0.4.6
0.4.7
10.3.12
10.4.1
3.2.5
3.3.2
5.2.11
5.3.1
2.0.1
2.1.1
Updates
@reduxjs/toolkit
from 2.2.3 to 2.2.5Release notes
Sourced from
@reduxjs/toolkit
's releases.... (truncated)
Commits
4578c74
Release 2.2.52e400d5
Merge pull request #4412 from reduxjs/bugfix/4411-immer-current4cc7b1f
Fix Immercurrent
usage when the value may not be a draft87e2e59
Switch vitest args to allow file filtering by name againf2cc82c
Merge pull request #4406 from Wase-Zahin/feature/typob0a14b2
fix: fix typo0246f78
Release 2.2.472b3ac6
Merge pull request #3957 from reduxjs/retry-error-typec892abd
Merge pull request #4337 from jared-ca/undefined-type-initiate-mutation5d77624
Merge pull request #4364 from smacpherson64/masterUpdates
@types/node
from 20.12.12 to 20.14.5Commits
Updates
@types/react
from 18.3.1 to 18.3.3Commits
Updates
@typescript-eslint/eslint-plugin
from 7.8.0 to 7.13.1Release notes
Sourced from
@typescript-eslint/eslint-plugin
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/eslint-plugin
's changelog.... (truncated)
Commits
1212a8f
chore(release): publish 7.13.1af34737
docs: improve return-await description about motivation (#9201)bf48dc5
fix(eslint-plugin): [no-unsafe-member-access] differentiate a types-error any...33acc50
fix(eslint-plugin): [return-await] support explicit resource management (#9044)50ed604
fix(eslint-plugin): [prefer-readonly] refine report locations (#8894)8a178ed
chore(release): publish 7.13.063e53e2
chore(deps): update dependency prettier to v3.3.1 (#9308)fb52f78
feat(eslint-plugin): [no-dynamic-delete] allow all string literals as index (...ab2916c
chore: enable eslint-plugin/no-property-in-node internally (#9261)629035f
docs: mention rule scripts under Local Development (#9258)Updates
@typescript-eslint/parser
from 7.8.0 to 7.13.1Release notes
Sourced from
@typescript-eslint/parser
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/parser
's changelog.... (truncated)
Commits
1212a8f
chore(release): publish 7.13.18a178ed
chore(release): publish 7.13.0c9a6dd9
feat(parser, typescript-estree): export withoutProjectParserOptions utility (...7e93b28
chore(release): publish 7.12.02bbf656
fix(types): correct typing ParserOptions (#9202)e360541
chore(release): publish 7.11.0c18226e
chore(release): publish 7.10.077fc366
chore(release): publish 7.9.0f53fece
chore: add knip (#8192)Updates
@vitejs/plugin-react-swc
from 3.6.0 to 3.7.0Release notes
Sourced from
@vitejs/plugin-react-swc
's releases.Changelog
Sourced from
@vitejs/plugin-react-swc
's changelog.Commits
b829b03
docs: add changelogf41bbc3
release: v3.7.08f5d9a0
chore: update tests for compatibility with Vite 6 (#208)59efc9b
fix(deps): update all non-major dependencies (#194)be68920
chore(deps): update dependency@swc/plugin-emotion
to v3 (#201)53878df
feat: support HMR for class components (#203)Updates
eslint
from 8.57.0 to 9.5.0Release notes
Sourced from eslint's releases.
... (truncated)
Changelog
Sourced from eslint's changelog.
... (truncated)
Commits
5352357
9.5.0f425600
Build: changelog update for 9.5.0f588160
chore: upgrade@eslint/js
@9
.5.0 (#18591)5890841
chore: package.json update for@eslint/js
release455f7fd
docs: add section about including.gitignore
files (#18590)e9f4ccd
chore: remove unused eslint-disable directive (#18589)721eafe
docs: update info about universalfiles
patterns (#18587)4b23ffd
refactor: Move JS parsing logic into JS language (#18448)6880286
fix: treat*
as a universal pattern (#18586)8127127
docs: Update READMEUpdates
eslint-plugin-react-refresh
from 0.4.6 to 0.4.7Release notes
Sourced from eslint-plugin-react-refresh's releases.
Changelog
Sourced from eslint-plugin-react-refresh's changelog.
Commits
70dcd5a
Supportexport { Component as default }
(fixes #41) [publish]Updates
glob
from 10.3.12 to 10.4.1Changelog
Sourced from glob's changelog.
... (truncated)
Commits
3cb1ed7
10.4.17a6c2a2
changelog 10.4057d5b2
update prettier, format everything10162fb
export Ignoref0bd1e8
10.4.0ed0d061
AddincludeChildMatches: false
optionb274298
10.3.161efe27c
jackspeak@3.1.2ea4734f
fix: benchmark ESM build compatibility921c4b9
10.3.15Updates
prettier
from 3.2.5 to 3.3.2Release notes
Sourced from prettier's releases.
Changelog
Sourced from prettier's changelog.
... (truncated)
Commits
1596a60
Release 3.3.2aebcee5
chore(deps): update dependency esbuild to v0.21.5 (#16379)57aa928
chore(deps): update dependency c8 to v10 (#16380)c3d0b7f
chore(deps): update typescript-eslint to v7.13.0 (#16376)27c35db
chore(deps): update dependency codemirror-graphql to v2.0.12 (#16369)6de3258
chore(deps): update dependency jest to v30.0.0-alpha.5 (#16371)b5f983d
Upgrade yarn to v4.3.0 (#16377)d6f37c4
chore(deps): update dependency browserslist to v4.23.1 (#16368)5055b7d
chore(deps): update dependency execa to v9.2.0 (#16372)f4608cc
chore(deps): update dependency cspell to v8.8.4 (#16370)Updates
vite
from 5.2.11 to 5.3.1Changelog
Sourced from vite's changelog.
Looks like these dependencies are updatable in another way, so this is no longer needed.