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

fix!: preserve type of string values when storing #505

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

molvqingtai
Copy link

Before the fix:

await setItem('foo', '[]')
await getItem('foo') // []

After the fix:

await setItem('foo', '[]')
await getItem('foo') // '[]'

This will fix: #277

@molvqingtai molvqingtai changed the title fix: The get value and set value are inconsistent. (#277) fix: The get value and set value are inconsistent. Nov 5, 2024
@pi0 pi0 changed the title fix: The get value and set value are inconsistent. fix!: preserve type of string values when storing Dec 10, 2024
@pi0 pi0 added the breaking label Dec 10, 2024
@pi0
Copy link
Member

pi0 commented Dec 10, 2024

Thanks for PR. As noticed it makes lots of tests fail since it is a breaking behavior change.

I will consider it for unstorage v2 👍🏼

@pi0 pi0 marked this pull request as draft December 10, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Value as string converted into number
2 participants