We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c45e44 commit b6225eaCopy full SHA for b6225ea
src/deps.ts
@@ -98,8 +98,7 @@ const builtins = new Set([
98
'zlib',
99
])
100
101
-const nameRe =
102
- /^(?<name>(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*)\/?.*$/i
+const nameRe = /^(?<name>(@[a-z\d-~][\w-.~]*\/)?[a-z\d-~][\w-.~]*)\/?.*$/i
103
const versionRe = /^@(?<version>[~^]?(v?[\dx*]+([-.][\d*a-z-]+)*))/i
104
105
export function parseDeps(content: Buffer | string): Record<string, string> {
src/util.ts
@@ -265,7 +265,7 @@ export function formatCmd(cmd?: string): string {
265
}
266
267
function word() {
268
- if (/[0-9a-z/_.]/i.test(ch)) return word
+ if (/[\w/.]/i.test(ch)) return word
269
return root
270
271
0 commit comments