zod-transform-socials lower-cases the whole URL before matching, which means usernames are also lower-cased for services that preserve case. For example, github.com/FujoWebDev/AO3.js is reported as fujowebdev/ao3.js.
Lower-casing is needed for host detection (so BSKY.APP matches bsky.app), but it should not apply to the username (or at least, it should be an option not to apply it).
Among services affected:
- GitHub— org and repo names preserve case.
- Twitter/X — handle display preserves case.
- AO3 — usernames and pseuds preserve case.
- NPM is affected in that older package names could be uppercase/lowercase, but now they're all lowercase. With that said, the install is case sensitive.
This changes observable output, so it is a breaking change. We could mitigate it by adding a preserveCase setting and/or a canonicalCase option for known addresses that one may want to keep consistent. We could also consider exporting convenience methods like "isSameProfile".
zod-transform-socialslower-cases the whole URL before matching, which means usernames are also lower-cased for services that preserve case. For example,github.com/FujoWebDev/AO3.jsis reported asfujowebdev/ao3.js.Lower-casing is needed for host detection (so
BSKY.APPmatchesbsky.app), but it should not apply to the username (or at least, it should be an option not to apply it).Among services affected:
This changes observable output, so it is a breaking change. We could mitigate it by adding a
preserveCasesetting and/or acanonicalCaseoption for known addresses that one may want to keep consistent. We could also consider exporting convenience methods like "isSameProfile".