Skip to content

Conversation

risantos
Copy link
Member

@risantos risantos commented Jun 4, 2025

Description

  • Enhance the UUID assertion to support additional versions: v7, max, and nil.
    See RFC9562 for additional information.

  • Update README to reflect these changes and modify tests to validate the new UUID formats.

  • Update its type signature to include new UUID versions, replacing the previous versions' integers with strings, for accuracy.

Updated type signature

image

@Copilot Copilot AI review requested due to automatic review settings June 4, 2025 16:42
@risantos risantos self-assigned this Jun 4, 2025
@risantos risantos requested review from a team as code owners June 4, 2025 16:42
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.js with regex patterns and validation for v7, max, and nil
  • Refactored tests in uuid-assert.test.js to 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, and max UUID formats to verify that invalid strings are correctly rejected.
[

@risantos risantos force-pushed the support/update-uuid branch 2 times, most recently from c0eefdc to 9693487 Compare June 18, 2025 13:43
@risantos risantos force-pushed the support/update-uuid branch from 9693487 to 8aa61a8 Compare July 1, 2025 14:02
@risantos risantos force-pushed the support/update-uuid branch 2 times, most recently from 053832a to 325c7d0 Compare July 15, 2025 09:53
- Update its type signature to include new UUID versions, replacing the previous versions' integers with strings, for accuracy.
@risantos risantos force-pushed the support/update-uuid branch from 325c7d0 to 31c3673 Compare July 15, 2025 10:06
@Americas Americas merged commit b59ae2e into master Jul 16, 2025
2 checks passed
@Americas Americas deleted the support/update-uuid branch July 16, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants