-
Notifications
You must be signed in to change notification settings - Fork 22
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
Implement the new simplified/improved algorithm #20
Conversation
To enforce the maximum of 255.
Since it was introduced in .NET 7 and other target frameworks don't support it.
a3b581b
to
b9a0ef5
Compare
It's actually preferable, it seems: https://stackoverflow.com/a/1148505
I see the changes in unit tests. I wonder whether v3 will output a different id for a pointed |
Hi @LeaFrock, actually yes, v3 outputs different IDs than v2 even with the same configurations, because as you can see in this PR, the algorithm has been modified, which brings about a number of major improvements — you can learn more about those in sqids/sqids-spec#11 — but it does result in a breaking change. Most Sqids ports (this one being an exception) were on pre-release versions, so it made sense to do this now. Though we don't plan to introduce any more breaking changes in the algorithm; this one, however, was very much justified because it fixed a few important issues the previous version of the algorithm had. |
Well, it sounds reasonable, though it indeed makes some troubles to me. We've already been using this library in our production.
Hope so. And I also hope Sqids releases a stable(rather than pre-release) version for production soon. Thanks for your reply! |
Understandable. Sorry for the inconvenience. I didn't actually know whether anyone was already using the library in production but I assumed it's probably not that many people, since it has been only a few weeks since the library was published; hopefully the transition goes smoothly for you. |
I imported When I'm going to check if there's a new release on the website, I'm surprised that |
sqids/sqids-spec#11