fix(drizzle-seed): change uuid generator #4503
Closed
+5
−1
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.