scenarioworld / articy-js

Loads and allows for navigation of exported Articy JSON data (http://www.articy.com)
MIT License
7 stars 2 forks source link

Bump @reduxjs/toolkit from 1.6.1 to 1.7.0 #69

Closed dependabot[bot] closed 2 years ago

dependabot[bot] commented 2 years ago

Bumps @reduxjs/toolkit from 1.6.1 to 1.7.0.

Release notes

Sourced from @​reduxjs/toolkit's releases.

v1.7.0

This feature release has a wide variety of API improvements:

  • updates RTK Query with support for SSR and rehydration
  • allows sharing mutation results across components
  • adds a new currentData field to query results
  • adds several new options for customizing endpoints and base queries
  • adds support for async condition options in createAsyncThunk
  • updates createSlice/createReducer to accept a "lazy state initializer" function
  • updates createSlice to avoid potential circular dependency issues by lazy-building its reducer
  • updates Reselect and Redux-Thunk to the latest versions with much-improved TS support and new selector customization options
  • Fixes a number of small code and types issues
npm i @reduxjs/toolkit@latest

yarn add @​reduxjs/toolkit@​latest

Changelog

RTK Query

RTK Query SSR and Rehydration Support

RTK Query now has support for SSR scenarios, such as the getStaticProps/getServerSideProps APIs in Next.js. Queries can be executed on the server using the existing dispatch(someEndpoint.initiate()) thunks, and then collected using the new await Promise.all(api.getRunningOperationPromises()) method.

API definitions can then provide an extractRehydrationInfo method that looks for a specific action type containing the fetched data, and return the data to initialize the API cache section of the store state.

The related api.util.getRunningOperationPromise() API adds a building block that may enable future support for React Suspense as well, and we'd encourage users to experiment with this idea.

Sharing Mutation Results Across Components

Mutation hooks provide status of in-progress requests, but as originally designed that information was unique per-component - there was no way for another component to see that request status data. But, we had several requests to enable this use case.

useMutation hooks now support a fixedCacheKey option that will store the result status in a common location, so multiple components can read the request status if needed.

This does mean that the data cannot easily be cleaned up automatically, so the mutation status object now includes a reset() function that can be used to clear that data.

Data Loading Updates

Query results now include a currentData field, which contains the latest data cached from the server for the current query arg. Additionally, transformResponse now receives the query arg as a parameter. These can be used to add additional derivation logic in cases when a hooks query arg has changed to represent a different value and the existing data no longer conceptually makes sense to keep displaying.

Data Serialization and Base Query Improvements

RTK Query originally only did shallow checks for query arg fields to determine if values had changed. This caused issues with infinite loops depending on user input.

... (truncated)

Commits
  • ad12875 v1.7.0
  • 7a1fec4 Fix lockfile issues
  • db0d7dc Merge pull request #1565 from reduxjs/v1.7.0-integration
  • aad6d32 Merge branch 'master' into v1.7.0-integration
  • 29d6f6d Use originalArgs in transformResponse (#1819)
  • 0c3c41d Merge pull request #1818 from reduxjs/bugfix/1817-rtkq-selectors
  • 17f033e Bump TS matrix to include 4.4 and 4.5 on this branch
  • 521bcc3 Fix a bug in optimisticUpdates.test and silence some warnings
  • 604577b Fix a bug in the RTKQ selector typings causing bad state args
  • 4bb0c5c Override unwrap behavior for buildInitiateQuery, update tests (#1786)
  • Additional commits viewable in compare view


Dependabot compatibility score

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 ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 2 years ago

Superseded by #72.