Skip to content

Conversation

Legend-Master
Copy link
Contributor

@Legend-Master Legend-Master commented Jul 18, 2025

Reference: #2829
Reference: #2855
Reference: #2843 (comment)

Closes #2843

Add an new option overrideDefaults for creating/loading and reloading the store that overrides the store with the on-disk state, ignoring defaults

Also added support for setting defaults from the JavaScript API

For the reload function, we should change its behavior to resetting the store to defaults first and then calling extend to merge the values in load in v3, and document this in v2 for now

Copy link
Contributor

github-actions bot commented Jul 18, 2025

Package Changes Through 94cc9be

There are 4 changes which include nfc with patch, nfc-js with patch, store with minor, store-js with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.32 2.0.33
api-example-js 2.0.28 2.0.29
nfc 2.3.0 2.3.1
nfc-js 2.3.0 2.3.1
store 2.3.0 2.4.0
store-js 2.3.0 2.4.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master
Copy link
Contributor Author

Legend-Master commented Jul 18, 2025

Didn't test yet, will mark as ready after that

Done

@Legend-Master Legend-Master marked this pull request as ready for review July 19, 2025 02:58
@Legend-Master Legend-Master requested a review from a team as a code owner July 19, 2025 02:58
@FabianLars
Copy link
Member

should it be ignoreDefaults and load_without_defaults maybe? override to me sounds like we're still loading the defaults first and then overriding those with the ondisk state.

@Legend-Master
Copy link
Contributor Author

override_defaults makes more sense in StoreBuilder since we will still preserve the defaults if the file doesn't exist

We can change the name on the other ones though

@FabianLars
Copy link
Member

the store plugin is giving me such a headache and i'm not even working on it 🫠
Just merge it when you're happy with it ig 😂

@Legend-Master Legend-Master merged commit 5ac8fbb into tauri-apps:v2 Aug 5, 2025
19 checks passed
@Legend-Master Legend-Master deleted the store-load-override-defaults branch August 5, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants