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

make v5 backwards compatible with v4 data properties #158

Open
theBowja opened this issue Dec 24, 2023 · 8 comments
Open

make v5 backwards compatible with v4 data properties #158

theBowja opened this issue Dec 24, 2023 · 8 comments

Comments

@theBowja
Copy link
Owner

No description provided.

@tractorcow
Copy link

Hi @theBowja not sure if this is related, but it looks like the latest release of genshin-db-dist is generating properties in the v5 format (I noticed because I had elementType and elementText in characters, but no element field). This of course broke because the latest released version of genhin-db is 4.3.17.

Could genshin-db-dist have both a main (for v5) and v4 branch so that we can use both v4 and v5 concurrently?

I'd also like to install v5 of genshin-db but it doesn't seem released to npm yet.

Thanks again for your great work and let me know if I can help with anything.

@tractorcow
Copy link

Maybe an easier solution is to add some tags to genshin-db-dist, so we can lock to fixed database versions to protect from api changes?

@theBowja
Copy link
Owner Author

theBowja commented Jan 2, 2024

adding tags would surely be a good idea. if i could figure out how to do it o.o

@theBowja
Copy link
Owner Author

theBowja commented Jan 2, 2024

v5 db for 4.3 has already been published as 5.0.4

also i plan on dropping support for v4 db very soon

@tractorcow
Copy link

Nice one, upgrading to 5 now :D

@tractorcow
Copy link

adding tags would surely be a good idea. if i could figure out how to do it o.o

In the actions I see that you are getting the version from genshin-db.version, so I guess just trigger a git tag for that same value at the end of the execution?

theBowja added a commit that referenced this issue Jan 3, 2024
added two new options: v4Props and v4PropsOnly
#158
@theBowja
Copy link
Owner Author

theBowja commented Jan 3, 2024

I just released genshin-db v5.0.7 which adds an option for backwards compatibility with genshin-db v4.

Simply add the following and all your property accesses should no longer throw errors.
genshindb.setOptions({ v4PropsOnly: true });

There are some rare pieces of data that couldn't be recovered so you should just do a quick checkover to see if anything is crashing on your end.

@tractorcow
Copy link

Upgrading to 5.x was painless, thank you for that! tractorcow/genshin-teamspin#6

theBowja added a commit to theBowja/genshin-db-dist that referenced this issue Jan 26, 2024
hopefully this works
theBowja/genshin-db#158
theBowja referenced this issue in theBowja/genshin-db-dist Jan 31, 2024
theBowja/genshin-db@158
theBowja added a commit that referenced this issue Feb 2, 2024
added two new options: v4Props and v4PropsOnly
#158
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

No branches or pull requests

2 participants