-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
Deprecate uuidv4('binary') interface #437
Deprecate uuidv4('binary') interface #437
Comments
It's been ages since this API was documented. 'Tempted to say this wouldn't even require a major release but it'll probably break something somewhere. Sorry, 'should've removed this ages ago but I'd honestly forgotten "binary" was even a thing. |
Since we just released 8.0.0 it's probably safe to remove in a minor 😅 Technically it's not documented so it wouldn't be "illegal" to remove it, and practically I cannot really se anyone using both 8.x and this feature 🤔 |
Hmm, I'm confident that somebody out there will be using the library in weird ways… On the other hand, a quick query of the BigQuery dataset I once collected in https://github.com/tc39/proposal-uuid/tree/master/analysis revealed, that only 302 out of 78868 lines containing 'uuid' also contained the term 'binary'. That is of course only a very rough proxy. I'm really not sure, the safe bet would be to make this a breaking change. |
Looking at the types of bug reports we get in here recently I don't even believe that pushing this into a major version would save us from bug reports, so I think technically the well documented deprecation in https://github.com/uuidjs/uuid/tree/v2.0.1#deprecated-apis should be enough to justify putting this into a minor version update. I'd prefer that over producing yet another major version bump as people are already confuse by the quick succession of major version increases. |
In version 1.x of this library it was possible to call `v4('binary')` in order to receive a byte array instead of a string representation. This function signature was deprecated in 2.x (but not removed in 3.x as it should have been). The correct way to get a binary representation of a uuid is to pass an array-like object as a second parameter: ``` const buffer = new Array(); v4(null, buffer); ``` Fixes #437.
In version 1.x of this library it was possible to call `v4('binary')` in order to receive a byte array instead of a string representation. This function signature was deprecated in 2.x (but not removed in 3.x as it should have been). The correct way to get a binary representation of a uuid is to pass an array-like object as a second parameter: ``` const buffer = new Array(); v4(null, buffer); ``` Fixes #437.
Is your feature request related to a problem? Please describe.
In earlier versions of this library it was possible to pass a single first parameter into the
v1()
andv4()
methods which would result in the method returning a new Array instead of a string representation of UUID.Apparently [email protected] already deprecated this API but it seemingly never got removed.
Describe the solution you'd like
We could either just remove the legacy interface or decorate it with deprecation warnings.
The text was updated successfully, but these errors were encountered: