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) {
1414 }
1515}
1616
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 - ] + ) ( @ ( .+ ) ) ? $ / ;
1919
2020export class JsrPackageNameError extends Error { }
2121
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import * as path from "node:path";
33import { runInTempDir } from "./test_utils" ;
44import {
55 findProjectDir ,
6+ JsrPackage ,
67 PkgJson ,
78 writeJson ,
89 writeTextFile ,
@@ -94,3 +95,10 @@ describe("findProjectDir", () => {
9495 } ) ;
9596 } ) ;
9697} ) ;
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