Skip to content

fix(type): anchor UUID #versioned regex to reject partial matches#1602

Open
WolfieLeader wants to merge 2 commits intoarktypeio:mainfrom
WolfieLeader:fix/uuid-versioned-regex-anchors
Open

fix(type): anchor UUID #versioned regex to reject partial matches#1602
WolfieLeader wants to merge 2 commits intoarktypeio:mainfrom
WolfieLeader:fix/uuid-versioned-regex-anchors

Conversation

@WolfieLeader
Copy link

Summary

Fixes #1601

The #versioned private regex in the UUID Scope.module was missing ^ and $ anchors, causing type("string.uuid") to accept strings that merely contain a UUID substring (e.g. "dbb1e8e0-...1b extra stuff").

All individual version regexes (v1v8) already used anchored patterns via regexStringNode() — only #versioned was missing them.

  • Added ^/$ anchors to the #versioned regex
  • Added regression test for trailing and leading content rejection

Test plan

  • Existing UUID tests pass
  • New "rejects partial matches" test verifies both trailing and leading content
  • pnpm prChecks passes (format, lint, typecheck, full test suite)

Copy link
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

Clean, minimal fix. The ^/$ anchors on #versioned bring it in line with all the individual version regexes (v1v8), and the regression test covers both leading and trailing content. No issues found.

Pullfrog  | View workflow runpullfrog.com𝕏

@WolfieLeader
Copy link
Author

Why haven't you said so when string.uuid was implemented pullfron🧐
(I know guys this is a bot just laughing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To do

Development

Successfully merging this pull request may close these issues.

'string.uuid' only requires prefix

1 participant