Skip to content

Commit 00b9ab7

Browse files
authored
fix: allow jsr packages to be mapped (#398)
1 parent 07ccc72 commit 00b9ab7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/utils.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Deno.test({
2222
Deno.test("valueToUrl", () => {
2323
assertEquals(valueToUrl("npm:test"), "npm:test");
2424
assertEquals(valueToUrl("node:path"), "node:path");
25+
assertEquals(valueToUrl("jsr:@scope/package"), "jsr:@scope/package");
2526
assertEquals(valueToUrl("https://deno.land"), "https://deno.land");
2627
assertEquals(valueToUrl("http://deno.land"), "http://deno.land");
2728
assertEquals(

lib/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export function valueToUrl(value: string) {
9595
lowerCaseValue.startsWith("http:") ||
9696
lowerCaseValue.startsWith("https:") ||
9797
lowerCaseValue.startsWith("npm:") ||
98+
lowerCaseValue.startsWith("jsr:") ||
9899
lowerCaseValue.startsWith("node:") ||
99100
lowerCaseValue.startsWith("file:")
100101
) {

0 commit comments

Comments
 (0)