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

Feature/optional version and add store without version increment #434

Conversation

0xrgg
Copy link
Contributor

@0xrgg 0xrgg commented Jan 17, 2025

@assuncaocharles - didn't want to create a duplicate PR but original author seems to have been absent this week so pulled his repo and added the version change as requested, let me know if I missed anything and will get it resolved ASAP.

For cases where store gets created dynamically and version is not required to be updated.

From Original PR: #423 by @irsali

Copy link

vercel bot commented Jan 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ngx-indexed-db ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 17, 2025 6:35pm

@aparzi
Copy link
Collaborator

aparzi commented Jan 17, 2025

Hi @0xrgg, I will check this PR as soon as possible.

@aparzi
Copy link
Collaborator

aparzi commented Jan 22, 2025

Hi @0xrgg,
can you give me a real usage example of using this change? also write a case in the library in the playground and verify that this change solves the problem if the db is changed to a new tab?

@0xrgg
Copy link
Contributor Author

0xrgg commented Jan 22, 2025

Hi @aparzi - the real usage in my case is creating a new store dynamically, which I believe is already implemented in the playground, however doing this with the current main code results in a version error in the console which is what @irsali was trying to say in his original PR (I believe). Also when you rebuild the project, you also get this error and in my case the app is unable to start as it's part of the pre-flight checks to retrieve stored data. I did try to get the playground running to confirm but throwing up compiler errors on my side, though I did do a build and placed it into my dependent project to test my changes at the time

I was trying to figure out a way to check and set the config on the fly but was unable to figure it out and it was blocking my progress on the project consuming the package, I may revisit in future and try again though.

@aparzi
Copy link
Collaborator

aparzi commented Jan 23, 2025

@0xrgg ok perfect.
have you tried if this also solves if a db is modified in a new tab? because by opening the application on two tabs, the db opened in the old tab breaks

@aparzi
Copy link
Collaborator

aparzi commented Jan 23, 2025

@0xrgg I had a chance to try it and it seems ok. I understand the problem.
LGTM

Thanks for your support.

@aparzi aparzi merged commit e405a0e into assuncaocharles:master Jan 23, 2025
5 checks passed
@0xrgg
Copy link
Contributor Author

0xrgg commented Jan 23, 2025

@aparzi - thanks for the review and @irsali your initial changes.

when i have more time, will see if i can do something more elegant to avoid the console warn by setting the version dynamically if not provided in user config upon instantiation of the module

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.

3 participants