Skip to content

Commit fa8643e

Browse files
authored
Merge branch 'main' into add-turkish-translation
2 parents 8e7b14e + 2215a36 commit fa8643e

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

server/api/registry/org/[org]/packages.get.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { CACHE_MAX_AGE_ONE_HOUR, NPM_REGISTRY } from '#shared/utils/constants'
22
import { FetchError } from 'ofetch'
33

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
4+
// Validation pattern for npm org names - url-sage symbold and not start with a dot (incl. ~test24214. or -ex~-)
5+
const NPM_ORG_NAME_RE = /^[\w~-][\w.~-]*$/
66

77
function validateOrgName(name: string): void {
88
if (!name || name.length > 50 || !NPM_ORG_NAME_RE.test(name)) {

vercel.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,21 @@
77
"has": [
88
{
99
"type": "host",
10-
"value": "chat.npmx.dev"
10+
"value": "build.npmx.dev"
1111
}
1212
],
1313
"destination": "https://discord.gg/x9KE5U2q8w"
1414
},
15+
{
16+
"source": "/(.*)",
17+
"has": [
18+
{
19+
"type": "host",
20+
"value": "chat.npmx.dev"
21+
}
22+
],
23+
"destination": "https://discord.gg/CjZM5qRbCu"
24+
},
1525
{
1626
"source": "/(.*)",
1727
"has": [

0 commit comments

Comments
 (0)