-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
[Related to #2344.]
Hi, uuid maintainer here. I happened to notice this project while perusing open issues on the DefinitelyTyped project. The UUID spec has been updated for the first time in almost 20 years, which is where the new v7 UUID comes from (support added here in #2344). However, there's more to the new RFC than just version 7. I also noticed a couple other issues while glancing at the isUUID() code here.
Specifically, to be fully RFC9562-compliant will require the following:
- Add support for version 6 and version 8 UUIDS. The new UUID RFC (RFC9562) adds two new versions, in addition to version 7 (which this library already supports. Version 6 ("improved version 1 layout") and version 8 ("experimental") are now also valid versions
- Enforce
variantfield for all versions. It's weird that it's only enforced for versions 4, 5, and 7. - Add support for NIL and MAX UUIDs. For completeness, I would expect the
uuidregexs to includenilandmaxpatterns. - Use a better regex for
all. For example, here's the regex we use foruuid.
kyzer-davis