-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat(useIDBKeyval): add options.serializer
#4781
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
Conversation
Thank you for your PR. Can you add some tests for this feature to prevent future regressions? |
I've encountered this breaking change in production and created minimal reproductions that demonstrate the issue: Before v10.9.0 (working): https://stackblitz.com/edit/vitejs-vite-cdqkbqje?file=package.json This change has been blocking our upgrade from @vueuse/integrations v10.7.2. Since it was released as a minor version update, we didn't anticipate breaking changes. I came here to propose a serialization option and am glad to see it's already been suggested! The approach in this PR looks great and would solve our use case perfectly. Is there anything I can do to help move this forward? I'd be happy to: Test the PR in our production environment Thank you for working on this! |
@matthewjumpsoffbuildings lets get this over the line! Would you be willing to add the suggestions? |
@acrobid You can use |
Co-authored-by: Robin <robin.kehl@singular-it.de>
Adds some tests and also changes the serializer type to deal with `unknown` rather than `any`.
options.serializer
Description
Attempt to add
serializer
option touseIDBKeyval
to bring it more in line withuseStorage
as per https://vueuse.org/core/useStorage/#custom-serializationCloses #4780