File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ export function logDebug(msg: string) {
14
14
}
15
15
}
16
16
17
- const EXTRACT_REG = / ^ @ ( [ a - z ] [ a - z 0 - 9 - ] + ) \/ ( [ a - z 0 - 9 - ] + ) ( @ ( .+ ) ) ? $ / ;
18
- const EXTRACT_REG_PROXY = / ^ @ j s r \/ ( [ a - z ] [ a - z 0 - 9 - ] + ) _ _ ( [ a - z 0 - 9 - ] + ) ( @ ( .+ ) ) ? $ / ;
17
+ const EXTRACT_REG = / ^ @ ( [ a - z 0 - 9 - ] + ) \/ ( [ a - z 0 - 9 - ] + ) ( @ ( .+ ) ) ? $ / ;
18
+ const EXTRACT_REG_PROXY = / ^ @ j s r \/ ( [ a - z 0 - 9 - ] + ) _ _ ( [ a - z 0 - 9 - ] + ) ( @ ( .+ ) ) ? $ / ;
19
19
20
20
export class JsrPackageNameError extends Error { }
21
21
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import * as path from "node:path";
3
3
import { runInTempDir } from "./test_utils" ;
4
4
import {
5
5
findProjectDir ,
6
+ JsrPackage ,
6
7
PkgJson ,
7
8
writeJson ,
8
9
writeTextFile ,
@@ -94,3 +95,10 @@ describe("findProjectDir", () => {
94
95
} ) ;
95
96
} ) ;
96
97
} ) ;
98
+
99
+ describe ( "JsrPackage" , ( ) => {
100
+ it ( "should allow scopes starting with a number" , ( ) => {
101
+ JsrPackage . from ( "@0abc/foo" ) ;
102
+ JsrPackage . from ( "@jsr/0abc__foo" ) ;
103
+ } ) ;
104
+ } ) ;
You can’t perform that action at this time.
0 commit comments