fix(drizzle-seed): change uuid generator#4503
Closed
MasterAM wants to merge 1 commit into
Closed
Conversation
Add restriction to uuid-v4 format to make it adhere to RFC9562: the variant field should be in the 8..b range.
Collaborator
|
Hi @MasterAM. Your PR was very helpful, and I used it to fix the I’ve updated this PR (#4222) with your fix, and we’ll add you as a contributor during the merge. I’ll close this PR now. |
Merged
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a restriction to the uuid-v4 format to make it adhere to RFC9562: the variant field should be in the
8..brange.This RFC spec is used by npm's
uuidpackage.While this change would likely alter UUIDs generated by previous
drizzle-seedversions, the current implementation would cause issues in applications where the UUID value is validated.For example, Payload CMS is validating the id when querying for a document by a UUID key using
findById, and I ran into an issue when invalid UUIDs were generated bydrizzle-seed. This also broke the Payload CMS admin panel, as select queries failed to fetch data.