This feature release adds a new RTK Query upsertQueryEntries util to batch-upsert cache entries more efficiently, passes through additional values for use in prepareHeaders, and exports additional TS types around query options and selectors.
Changelog
upsertQueryEntries
RTK Query already had an upsertQueryData thunk that would upsert a single cache entry. However, some users wanted to upsert many cache entries (potentially hundreds or thousands), and found that upsertQueryData had poor performance in those cases. This is because upsertQueryData runs the full async request handling sequence, including dispatching both pending and fulfilled actions, each of which run the main reducer and update store subscribers. That means there's 2N store / UI updates per item, so upserting hundreds of items becomes extremely perf-intensive.
RTK Query now includes an api.util.upsertQueryEntries action that is meant to handle the batched upsert use case more efficiently. It's a single synchronous action that accepts an array of many {endpointName, arg, value} entries to upsert. This results in a single store update, making this vastly better for performance vs many individual upsertQueryData calls.
We see this as having two main use cases. The first is prefilling the cache with data retrieved from storage on app startup (and it's worth noting that upsertQueryEntries can accept entries for many different endpoints as part of the same array).
The second is to act as a "pseudo-normalization" tool. RTK Query is not a "normalized" cache. However, there are times when you may want to prefill other cache entries with the contents of another endpoint, such as taking the results of a getPosts list endpoint response and prefilling the individual getPost(id) endpoint cache entries, so that components that reference an individual item endpoint already have that data available.
Currently, you can implement the "pseudo-normalization" approach by dispatching upsertQueryEntries in an endpoint lifecycle, like this:
// Pre-fill the individual post entries with the results
// from the list endpoint query
dispatch(
api.util.upsertQueryEntries(
posts.map((post) => ({
endpointName: 'getPost',
arg: { id: post.id },
value: post,
})),
),
)
},
}),
getPost: build.query<Post, Pick<Post, 'id'>>({
query: (post) => `post/${post.id}`,
}),
}),
})
Down the road we may add a new option to query endpoints that would let you provide the mapping function and have it automatically update the corresponding entries.
To install Sass 1.80.3, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
Fix a bug where @import url("...") would crash in plain CSS files.
Improve consistency of how warnings are emitted by different parts of the compiler. This should result in minimal user-visible changes, but different types of warnings should now respond more reliably to flags like --quiet, --verbose, and --silence-deprecation.
To install Sass 1.80.0, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
@import is now officially deprecated, as are global built-in functions that are available within built-in modules. See the Sass blog post for more details on the deprecation process.
Fix a bug where @import url("...") would crash in plain CSS files.
Improve consistency of how warnings are emitted by different parts of the
compiler. This should result in minimal user-visible changes, but different
types of warnings should now respond more reliably to flags like --quiet,
--verbose, and --silence-deprecation.
1.80.2
Fix a bug where deprecation warnings were incorrectly emitted for the
plain-CSS invert() function.
1.80.1
Fix a bug where repeated deprecation warnings were not automatically limited.
1.80.0
@import is now officially deprecated, as are global built-in functions that
are available within built-in modules. See the Sass blog post for more
details on the deprecation process.
Embedded Host
Fix an error that would sometimes occur when deprecation warnings were
emitted when using a custom importer with the legacy API.
1.79.6
Fix a bug where Sass would add an extra */ after loud comments with
whitespace after an explicit */ in the indented syntax.
Potentially breaking bug fix: Adding text after an explicit */ in the
indented syntax is now an error, rather than silently generating invalid CSS.
Embedded Host
Properly export the SassBoolean type.
Commits
76cfd6b Fix @import url("...") in plain CSS (#2398)
60d440a Emit all warnings in the evaluator (#2396)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the dependencies-minor-updates group with 2 updates: @reduxjs/toolkit and sass.
Updates
@reduxjs/toolkit
from 2.2.7 to 2.3.0Release notes
Sourced from
@reduxjs/toolkit
's releases.... (truncated)
Commits
77fb33d
Release 2.3.0fa0906e
Merge pull request #4291 from reduxjs/pr/fetchBaseQuery-extraOptions896e4df
Drop generic and make extraOptions unknown41487fd
Fix arguments type1918f13
fix bad inference with an overload?6ef362f
fixup test3e77381
fetchBaseQuery: expose extraOptions to prepareHeaders7b50a61
Merge pull request #4561 from reduxjs/feature/4106-rtkq-normalization3358c13
Fix Parameters headersd38ff98
Merge pull request #4638 from kyletsang/prepareheaders-argsUpdates
sass
from 1.79.5 to 1.80.3Release notes
Sourced from sass's releases.
... (truncated)
Changelog
Sourced from sass's changelog.
Commits
76cfd6b
Fix@import url("...")
in plain CSS (#2398)60d440a
Emit all warnings in the evaluator (#2396)01b2a5b
Fix setup-node (#2395)2ad2133
Don't emit warnings for plain-CSSinvert()
(#2394)e6391d3
Always limit the repetition of loggers (#2391)ab19f94
Deprecate@import
and global builtins (#2282)f7b2e63
Fix GitHub Actions config (#2387)1e27aeb
Add a changelog entry for sass/embedded-host-node#338 (#2384)73ff9a9
Don't generate extra*/
s for trailing whitespace in Sass (#2383)164224f
Update QEMU (#2382)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show