We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a4563b commit 2215a36Copy full SHA for 2215a36
server/api/registry/org/[org]/packages.get.ts
@@ -1,8 +1,8 @@
1
import { CACHE_MAX_AGE_ONE_HOUR, NPM_REGISTRY } from '#shared/utils/constants'
2
import { FetchError } from 'ofetch'
3
4
-// Validation pattern for npm org names (alphanumeric with hyphens)
5
-const NPM_ORG_NAME_RE = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i
+// Validation pattern for npm org names - url-sage symbold and not start with a dot (incl. ~test24214. or -ex~-)
+const NPM_ORG_NAME_RE = /^[\w~-][\w.~-]*$/
6
7
function validateOrgName(name: string): void {
8
if (!name || name.length > 50 || !NPM_ORG_NAME_RE.test(name)) {
0 commit comments