-
Notifications
You must be signed in to change notification settings - Fork 431
refactor(store)!: more reworks #1860
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
Merged
Merged
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
9811756
refactor(store): more reworks
Legend-Master 35b439f
Enable auto save by default
Legend-Master ea9c101
Store to resource table by default
Legend-Master 98d4fc4
Remove share store
Legend-Master 8975d10
Clean up
Legend-Master e0bbc6d
Merge remote-tracking branch 'upstream/v2' into store-rework-2
Legend-Master 4cb9d8d
Add close store
Legend-Master 6cdaa31
Add store function
Legend-Master 79bc8d0
Add lazy store
Legend-Master bbd34b1
Add init to lazy store
Legend-Master 17d910b
refresh cache in example
Legend-Master 7ffd769
Add get-or-create-store
Legend-Master 3acf66e
Revert "Add get-or-create-store"
Legend-Master 42c5a1c
try get first
Legend-Master 4f17adc
Merge branch 'v2' into store-rework-2
Legend-Master 45b2af4
Docs
Legend-Master d22de02
Use absolute path for store
Legend-Master a3bef84
more docs
Legend-Master 718f5dc
Allow js to use pre-stored (de)serialize functions
Legend-Master 4f13a03
Fix js get and close store
Legend-Master 73f365d
Show case how to use pretty json
Legend-Master 2718722
Update readme
Legend-Master f6a72ee
Merge branch 'v2' into store-rework-2
Legend-Master 7723f48
Use store instead of `store_builder` in example
Legend-Master 120f39f
Build
Legend-Master bfe2b38
Merge branch 'v2' into store-rework-2
Legend-Master 50ab4c1
Fix example
Legend-Master fc51b3d
More docs for StoreBuilder::build
Legend-Master 4037589
Add default (de)serialize fn
Legend-Master 1ef9f6a
Use pretty json by default
Legend-Master 831105d
Use `undefined` for empty value in get
Legend-Master 25d677d
Change files
Legend-Master 7faf8c3
Differentiate json null from no value for events
Legend-Master dc5be00
Add create or existing
Legend-Master c7f2cfc
Merge branch 'v2' into store-rework-2
Legend-Master d3d9cfe
Merge branch 'v2' into store-rework-2
Legend-Master 92196ee
Build
Legend-Master a00cb15
Rename inner store's inset method to set
Legend-Master c709447
Update readme
Legend-Master 230e6bb
Apply suggestions from code review
Legend-Master 3413d2a
Use close instead
Legend-Master 7c24d4a
Merge remote-tracking branch 'upstream/v2' into store-rework-2
Legend-Master c3748b3
Update breaking changes
Legend-Master d88fcb5
Return result in resolve_store_path
Legend-Master 39dec5d
Change to close_resource and take &self
Legend-Master 3f470a7
Clean up
Legend-Master 5296ffa
Apply suggestions from code review
Legend-Master a020ae3
Remove unused pub(crate)
Legend-Master 7e33a5e
Update change file
Legend-Master 1498eb5
Expose resolve_store_path
Legend-Master 02d077e
Remove with_store
Legend-Master 99321dd
Remove StoreInner from pub and expose is_empty
Legend-Master 1c401f7
Fix wrong jsdoc param
Legend-Master 3127ce5
Merge remote-tracking branch 'upstream/v2' into store-rework-2
Legend-Master 7aca255
Update readme
Legend-Master 083c165
rename createOrExistingStore to createOrLoad
lucasfernog ff9bddd
make api consistent with the JS implementation, add examples
lucasfernog afbb5aa
fmt
lucasfernog 028d666
reintroduce "get existing store" behavior for create_or_load
lucasfernog 8a8bdca
rename createOrLoad to newOrExisting
lucasfernog a7af661
keep store lock throughout whole new_or_existing_inner
lucasfernog fbc7149
Remove load
Legend-Master 5f2de5e
Missed if load
Legend-Master 985059a
Don't make StoreState public
Legend-Master 44016a4
Remove R: Runtime from Builder
Legend-Master 983bd82
rename newOrExisting to load, load to reload
lucasfernog d7bff64
update docs
lucasfernog ac91270
rename missing reload fn
lucasfernog 150e030
rename builder fn to build()
lucasfernog 3288e4b
fix default permission
lucasfernog 99cafa6
Fix description and create_new logic
Legend-Master 0d1b78a
Merge branch 'v2' into store-rework-2
Legend-Master bf5a191
Clippy
Legend-Master 9751296
Update docs
Legend-Master 5181d2b
Update docs
Legend-Master 09cce55
remove create_store command
lucasfernog 4a29fc8
remove close_store command since we extend from Resource
lucasfernog 70a1830
Revert "remove close_store command since we extend from Resource"
lucasfernog 8e71393
Reapply "remove close_store command since we extend from Resource"
lucasfernog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"store-js": minor:feat | ||
--- | ||
|
||
- Add `getStore` | ||
- Add an option to use pre-stored (de)serialize functions (registered on rust) | ||
- Add `LazyStore` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
"store": minor:breaking | ||
--- | ||
|
||
### Breaking changes: | ||
|
||
- Renamed `StoreCollection` to `StoreState` | ||
- `StoreBuilder::build` now returns a `Result` | ||
- `StoreExt::store` now returns `Result<Arc<Store>>` | ||
|
||
### Enhancements: | ||
|
||
- Save and cancel pending auto save on drop | ||
- Use absolute path as store's key, fix #984 | ||
- Share store to resource table by default | ||
- Enable auto save with 100ms debounce time by default | ||
- Use pretty json by default, close #1690 | ||
|
||
### New features: | ||
|
||
- Add `get_store` to get shared stores across js and rust side | ||
- Add default (de)serialize functions settings `default_serialize_fn` and `default_deserialize_fn` | ||
- Allow js to use pre-stored (de)serialize functions registered by `register_serialize_fn` and `register_deserialize_fn` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.