Update UUID assert to include v7, max, and nil#264
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds support for additional UUID versions (v7, max, and nil) to the core assertion, updates tests to cover the new formats in a loop, and reflects these changes in the README.
- Extended
uuid-assert.jswith regex patterns and validation forv7,max, andnil - Refactored tests in
uuid-assert.test.jsto loop over all supported versions - Updated README to document the new versions
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/asserts/uuid-assert.js | Added v7, max, and nil patterns and expanded version check |
| test/asserts/uuid-assert.test.js | Consolidated separate UUID version tests into a parameterized loop |
| README.md | Updated the UUID section and arguments list for new versions |
Comments suppressed due to low confidence (2)
README.md:260
- The old bullet point is still present (and using
--instead of-) which duplicates the updated line below. Remove this outdated entry to avoid confusion.
-- `version` (optional) - the version to test the uuid for. Supported version are `3`, `4` and `5`. Defaults to test for `all` three if omitted.
test/asserts/uuid-assert.test.js:73
- Consider adding negative test cases for the new
v7,nil, andmaxUUID formats to verify that invalid strings are correctly rejected.
[
c0eefdc to
9693487
Compare
9693487 to
8aa61a8
Compare
Americas
reviewed
Jul 15, 2025
053832a to
325c7d0
Compare
- Update its type signature to include new UUID versions, replacing the previous versions' integers with strings, for accuracy.
325c7d0 to
31c3673
Compare
Americas
approved these changes
Jul 16, 2025
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.
Description
Enhance the
UUIDassertion to support additional versions:v7,max, andnil.See RFC9562 for additional information.
Update
READMEto reflect these changes and modify tests to validate the new UUID formats.Update its type signature to include new
UUIDversions, replacing the previous versions' integers with strings, for accuracy.Updated type signature