Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the production-dependencies group with 4 updates #223

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 14, 2024

Bumps the production-dependencies group with 4 updates: @reduxjs/toolkit, i18next, react-i18next and react-native-mmkv.

Updates @reduxjs/toolkit from 2.2.8 to 2.3.0

Release notes

Sourced from @​reduxjs/toolkit's releases.

v2.3.0

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:

const api = createApi({
  endpoints: (build) => ({
    getPosts: build.query<Post[], void>({
      query: () => '/posts',
      async onQueryStarted(_, { dispatch, queryFulfilled }) {
        const res = await queryFulfilled
        const posts = res.data
    // Pre-fill the individual post entries with the results
    // from the list endpoint query
    dispatch(
      api.util.upsertQueryEntries(
        posts.map((post) =&gt; ({
          endpointName: 'getPost',
          arg: { id: post.id },
          value: post,
        })),
      ),
    )
  },
}),
getPost: build.query&lt;Post, Pick&lt;Post, 'id'&gt;&gt;({
  query: (post) =&gt; `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.

For additional comparisons between upsertQueryData and upsertQueryEntries, see the upsertQueryEntries API reference.

... (truncated)

Commits
  • 77fb33d Release 2.3.0
  • fa0906e Merge pull request #4291 from reduxjs/pr/fetchBaseQuery-extraOptions
  • 896e4df Drop generic and make extraOptions unknown
  • 41487fd Fix arguments type
  • 1918f13 fix bad inference with an overload?
  • 6ef362f fixup test
  • 3e77381 fetchBaseQuery: expose extraOptions to prepareHeaders
  • 7b50a61 Merge pull request #4561 from reduxjs/feature/4106-rtkq-normalization
  • 3358c13 Fix Parameters headers
  • d38ff98 Merge pull request #4638 from kyletsang/prepareheaders-args
  • Additional commits viewable in compare view

Updates i18next from 23.15.2 to 23.16.0

Release notes

Sourced from i18next's releases.

v23.16.0

  • use Intl.getCanonicalLocales function if available to format language code, like suggested in 2244
Changelog

Sourced from i18next's changelog.

23.16.0

  • use Intl.getCanonicalLocales function if available to format language code, like suggested in 2244
Commits
  • 1736965 23.16.0
  • c374232 use Intl.getCanonicalLocales function if available to format language code,...
  • See full diff in compare view

Updates react-i18next from 15.0.2 to 15.0.3

Changelog

Sourced from react-i18next's changelog.

15.0.3

Commits

Updates react-native-mmkv from 2.12.2 to 3.0.2

Release notes

Sourced from react-native-mmkv's releases.

Release 3.0.2

3.0.2 (2024-08-29)

  • Requires new architecture to be enabled (react-native-mmkv is now the first pure CxxTurboModule! 🥳)
  • Requires react-native 0.75 or higher (for lower react-native versions, use lower react-native-mmkv versions)

✨ Features

🐛 Bug Fixes

  • Update cpp code to support React Native 0.75.1 (#719) (430c2f5)

Release 3.0.1

3.0.1 (2024-08-28)

🐛 Bug Fixes

  • revert mmkv submodule to last known stable commit (#724) (94ef180)

Release 3.0.0

3.0.0 (2024-08-27)

react-native-mmkv V3 is now stable!!! 🎉🥳

V3 is a complete rewrite of the react-native-mmkv codebase to make it a pure C++ TurboModule (which has a better startup speed), and now shares a single codebase across iOS and Android for consistency 👏

[!IMPORTANT]
react-native-mmkv 3.0.0 requires react-native 0.74 or higher!

✨ Features

  • Fully rewrite react-native-mmkv to a single pure C++ / CxxTurboModule 🫴 (#656 / 87dedcd / 660cda3)
  • Add trim() func and size property (b2d80fa)
  • BREAKING: Use ArrayBuffer instead of Uint8Array in getBuffer (c03ef4d)
  • BREAKING: Properly throw errors if set or recrypt failed (#706) (0fde8a5)
  • Support AppGroups 🚀 (#705) (5a63632)
  • Add Automocking in vitest (#666) (86d5e94)
  • Support 16KB page size on newer Android phones 🥳

🐛 Bug Fixes

  • Fix encryption not working on keys longer than 10 characters 🔥
  • Fix closing destroy (3c2babd / 6eacc14)
  • Only generate C++ bindings, skip Java/ObjC (e89a472)

... (truncated)

Commits

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 <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> 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 <dependency name> 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 <dependency name> 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 <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Bumps the production-dependencies group with 4 updates: [@reduxjs/toolkit](https:/reduxjs/redux-toolkit), [i18next](https:/i18next/i18next), [react-i18next](https:/i18next/react-i18next) and [react-native-mmkv](https:/mrousavy/react-native-mmkv).


Updates `@reduxjs/toolkit` from 2.2.8 to 2.3.0
- [Release notes](https:/reduxjs/redux-toolkit/releases)
- [Commits](reduxjs/redux-toolkit@v2.2.8...v2.3.0)

Updates `i18next` from 23.15.2 to 23.16.0
- [Release notes](https:/i18next/i18next/releases)
- [Changelog](https:/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](i18next/i18next@v23.15.2...v23.16.0)

Updates `react-i18next` from 15.0.2 to 15.0.3
- [Changelog](https:/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](i18next/react-i18next@v15.0.2...v15.0.3)

Updates `react-native-mmkv` from 2.12.2 to 3.0.2
- [Release notes](https:/mrousavy/react-native-mmkv/releases)
- [Commits](mrousavy/react-native-mmkv@v2.12.2...v3.0.2)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: react-native-mmkv
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Oct 14, 2024
Copy link

☂️ Code Coverage

% Stmts% Branch% Funcs% Lines
6.79 🔴0.1 🔴0.27 🔴7.07 🔴
Click to expand
File% Stmts% Branch% Funcs% Lines
src
storage.ts11.11 🔴0 🔴0 🔴11.11 🔴
store.ts70.58 🟡100 🟢40 🔴75 🟡
translations.ts100 🟢50 🔴100 🟢100 🟢
constants.ts100 🟢100 🟢100 🟢100 🟢
style.tsx31.81 🔴0 🔴0 🔴31.81 🔴
InnerApp.tsx5.43 🔴0 🔴0 🔴5.61 🔴
App.tsx100 🟢100 🟢100 🟢100 🟢
src/components
StorageMigrator.tsx9.09 🔴0 🔴0 🔴9.09 🔴
BaseModal.tsx25 🔴0 🔴0 🔴25 🔴
ReleaseChangelog.tsx40 🔴0 🔴0 🔴40 🔴
ShowTimeRange.tsx7.69 🔴0 🔴0 🔴9.09 🔴
OpenDTUValue.tsx18.18 🔴0 🔴0 🔴18.18 🔴
DeviceOfflineWrapper.tsx8.33 🔴0 🔴0 🔴8.33 🔴
DeviceStatus.tsx5.88 🔴0 🔴0 🔴7.69 🔴
StatusWidget.tsx25 🔴0 🔴0 🔴25 🔴
ImportantStatusValues.tsx14.28 🔴100 🟢0 🔴20 🔴
src/slices
opendtu.ts5.61 🔴0 🔴0 🔴5.61 🔴
settings.ts5.2 🔴0 🔴0 🔴5.2 🔴
app.ts31.25 🔴0 🔴0 🔴31.25 🔴
database.ts25 🔴0 🔴0 🔴28.57 🔴
github.ts30.76 🔴100 🟢0 🔴30.76 🔴
src/types
settings.ts100 🟢100 🟢100 🟢100 🟢
src/utils
log.ts55.55 🟠25 🔴0 🔴62.5 🟠
ago.ts11.11 🔴0 🔴0 🔴12.5 🔴
capitalize.ts50 🔴100 🟢0 🔴50 🔴
formatBytes.ts33.33 🔴0 🔴0 🔴40 🔴
percentage.ts25 🔴0 🔴0 🔴25 🔴
formatVersion.ts20 🔴100 🟢0 🔴20 🔴
time.ts0 🔴100 🟢0 🔴0 🔴
inverter.ts12.5 🔴0 🔴0 🔴12.5 🔴
isIP.ts25 🔴0 🔴0 🔴33.33 🔴
src/types/opendtu
state.ts100 🟢100 🟢100 🟢100 🟢
control.ts100 🟢100 🟢100 🟢100 🟢
src/hooks
useAppLanguage.ts33.33 🔴0 🔴0 🔴50 🔴
useHasLiveData.ts10.34 🔴0 🔴0 🔴10.34 🔴
useOrientation.ts14.28 🔴0 🔴0 🔴14.28 🔴
useEnhancedLog.ts16.66 🔴0 🔴0 🔴20 🔴
useLivedata.ts12.5 🔴0 🔴0 🔴12.5 🔴
useHasNewAppVersion.ts9.09 🔴0 🔴0 🔴11.11 🔴
useDeviceIndex.ts33.33 🔴100 🟢0 🔴50 🔴
useDtuState.ts25 🔴0 🔴0 🔴25 🔴
useHasAuthConfigured.tsx33.33 🔴0 🔴0 🔴33.33 🔴
useHasNewOpenDtuVersion.ts7.69 🔴0 🔴0 🔴9.09 🔴
useInverterDevice.ts20 🔴0 🔴0 🔴20 🔴
useEventLog.ts20 🔴0 🔴0 🔴20 🔴
useFirmwareDependantFeature.ts18.18 🔴0 🔴0 🔴20 🔴
useGridProfile.ts20 🔴0 🔴0 🔴20 🔴
useInverterLimits.ts20 🔴0 🔴0 🔴20 🔴
useInverterPowerData.ts20 🔴0 🔴0 🔴20 🔴
useMemoWithInterval.ts8.33 🔴0 🔴0 🔴10 🔴
useIsConnected.ts25 🔴0 🔴0 🔴25 🔴
useTriedToConnect.ts25 🔴0 🔴0 🔴25 🔴
useRequireMultiplePresses.ts7.69 🔴0 🔴0 🔴7.69 🔴
useSettings.ts33.33 🔴100 🟢0 🔴50 🔴
useDtuSettings.ts20 🔴0 🔴0 🔴20 🔴
src/firmware
index.ts13.33 🔴0 🔴0 🔴13.33 🔴
src/api
opendtuapi.ts0.19 🔴0 🔴0 🔴0.19 🔴
ApiHandler.tsx4.44 🔴0 🔴0 🔴4.54 🔴
src/components/styled
StyledSurface.tsx33.33 🔴0 🔴0 🔴33.33 🔴
StyledListItem.tsx50 🔴0 🔴0 🔴50 🔴
StyledTextInput.tsx100 🟢100 🟢100 🟢100 🟢
SettingsSurface.tsx44.44 🔴0 🔴0 🔴44.44 🔴
src/components/Charts
UnifiedLineChart.tsx3.09 🔴0 🔴0 🔴3.19 🔴
AcPowerChart.tsx14.28 🔴0 🔴0 🔴14.28 🔴
DcVoltageChart.tsx14.28 🔴0 🔴0 🔴14.28 🔴
ImportantCharts.tsx3.12 🔴0 🔴0 🔴3.44 🔴
src/database
prometheus.ts1.49 🔴0 🔴0 🔴1.58 🔴
index.tsx9.19 🔴0 🔴0 🔴9.63 🔴
src/github
index.tsx55.55 🟠100 🟢0 🔴71.42 🟡
FetchHandler.tsx4.54 🔴0 🔴0 🔴4.87 🔴
src/components/modals
AppChangelogModal.tsx4.76 🔴0 🔴0 🔴4.87 🔴
AppOfflineModal.tsx25 🔴100 🟢0 🔴25 🔴
EnableAppUpdatesModal.tsx7.69 🔴100 🟢0 🔴7.69 🔴
EnableFetchOpenDtuUpdatesModal.tsx7.69 🔴100 🟢0 🔴7.69 🔴
LogExtensionModal.tsx7.69 🔴0 🔴0 🔴9.09 🔴
LogLevelModal.tsx16.66 🔴100 🟢0 🔴16.66 🔴
ChangeCustomNameModal.tsx4.16 🔴0 🔴0 🔴4.34 🔴
ChangeOpendtuCredentialsModal.tsx4.25 🔴0 🔴0 🔴4.44 🔴
ChangeServerUrlModal.tsx5.26 🔴0 🔴0 🔴5.88 🔴
ConfirmDeleteDeviceModal.tsx7.14 🔴100 🟢0 🔴7.14 🔴
ChangeGraphRefreshIntervalModal.tsx9.09 🔴0 🔴0 🔴10 🔴
TimeRangeLastNSecondsModal.tsx11.76 🔴0 🔴0 🔴12.5 🔴
AddDatabaseModal.tsx4.34 🔴0 🔴0 🔴4.34 🔴
ManageDatabaseModal.tsx2.56 🔴0 🔴0 🔴2.7 🔴
GenericRefreshModal.tsx11.11 🔴100 🟢0 🔴11.11 🔴
InstallAssetModal.tsx2.4 🔴0 🔴0 🔴2.4 🔴
SelectFirmwareModal.tsx3.84 🔴0 🔴0 🔴4.16 🔴
LimitConfigModal.tsx5 🔴0 🔴0 🔴5.08 🔴
PowerConfigModal.tsx8.57 🔴0 🔴0 🔴8.82 🔴
ChangeLanguageModal.tsx9.52 🔴0 🔴0 🔴9.52 🔴
ChangeThemeModal.tsx10.52 🔴0 🔴0 🔴11.11 🔴
ChangeBooleanValueModal.tsx3.33 🔴0 🔴0 🔴3.33 🔴
ChangeTextValueModal.tsx4.54 🔴0 🔴0 🔴4.54 🔴
src/components/logging
LogLine.tsx40 🔴100 🟢0 🔴40 🔴
src/views/navigation/screens/DebugGroup
AppLogScreen.tsx7.69 🔴0 🔴0 🔴7.69 🔴
DebugColorsScreen.tsx20 🔴0 🔴0 🔴20 🔴
DebugScreen.tsx2.38 🔴0 🔴0 🔴2.38 🔴
src/components/devices
DeviceListItem.tsx4.76 🔴0 🔴0 🔴5.55 🔴
DeviceList.tsx20 🔴100 🟢0 🔴25 🔴
MDNSScanItem.tsx5 🔴0 🔴0 🔴5.12 🔴
MDNSScan.tsx5.12 🔴0 🔴0 🔴5.4 🔴
src/views/navigation/screens/DeviceGroup
DeviceListScreen.tsx7.14 🔴0 🔴0 🔴7.14 🔴
DeviceSettingsScreen.tsx1.4 🔴0 🔴0 🔴1.58 🔴
src/views/navigation/screens/GraphsGroup
ConfigureGraphsScreen.tsx1.16 🔴0 🔴0 🔴1.29 🔴
ManageDatabasesScreen.tsx5.55 🔴0 🔴0 🔴5.88 🔴
SelectDatabaseScreen.tsx4 🔴0 🔴0 🔴4.16 🔴
src/views/navigation/screens/InformationGroup
AboutAppScreen.tsx3.33 🔴0 🔴0 🔴3.33 🔴
FirmwareListScreen.tsx2.7 🔴0 🔴0 🔴2.85 🔴
LicensesScreen.tsx10 🔴0 🔴0 🔴10 🔴
MqttInformationScreen.tsx5.88 🔴0 🔴0 🔴6.25 🔴
NetworkInformationScreen.tsx5 🔴0 🔴0 🔴5.55 🔴
NtpInformationScreen.tsx11.11 🔴0 🔴0 🔴12.5 🔴
SystemInformationScreen.tsx1.81 🔴0 🔴0 🔴1.96 🔴
src/components/firmware
FirmwareListItem.tsx7.4 🔴0 🔴0 🔴7.69 🔴
src/views/navigation/screens/InverterGroup
InverterDataScreen.tsx8.69 🔴0 🔴0 🔴9.52 🔴
InverterDeviceInfoScreen.tsx5.55 🔴0 🔴0 🔴5.88 🔴
InverterEventLogScreen.tsx7.69 🔴0 🔴0 🔴8 🔴
InverterGridProfileScreen.tsx5.71 🔴0 🔴0 🔴6.06 🔴
InverterInfoScreen.tsx3.75 🔴0 🔴0 🔴3.84 🔴
src/views/navigation/tabs
GraphTab.tsx33.33 🔴100 🟢0 🔴33.33 🔴
InverterListTab.tsx33.33 🔴100 🟢0 🔴33.33 🔴
LivedataTab.tsx33.33 🔴100 🟢0 🔴33.33 🔴
MainSettingsTab.tsx1.19 🔴0 🔴0 🔴1.33 🔴
src/components/inverters
InverterListItem.tsx2.27 🔴0 🔴0 🔴2.43 🔴
InverterList.tsx6.66 🔴0 🔴0 🔴7.14 🔴
src/views/navigation
NavigationTabs.tsx33.33 🔴0 🔴0 🔴42.85 🔴
NavigationStack.tsx40 🔴0 🔴0 🔴40 🔴
src/views/navigation/screens
MainScreen.tsx15.38 🔴0 🔴0 🔴15.38 🔴
src/views/navigation/screens/SettingsGroup
NetworkSettingsScreen.tsx0.67 🔴0 🔴0 🔴0.68 🔴
src/views/navigation/screens/SetupGroup
SetupAddOpenDTUScreen.tsx2.81 🔴0 🔴0 🔴2.89 🔴
SetupAuthenticateOpenDTUInstanceScreen.tsx3.07 🔴0 🔴0 🔴3.12 🔴
SetupOpenDTUCompleteScreen.tsx8.33 🔴0 🔴0 🔴9.09 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

0 participants