Skip to content

Commit

Permalink
fix: allow jsr packages to be mapped (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
maraisr authored May 28, 2024
1 parent 07ccc72 commit 00b9ab7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Deno.test({
Deno.test("valueToUrl", () => {
assertEquals(valueToUrl("npm:test"), "npm:test");
assertEquals(valueToUrl("node:path"), "node:path");
assertEquals(valueToUrl("jsr:@scope/package"), "jsr:@scope/package");
assertEquals(valueToUrl("https://deno.land"), "https://deno.land");
assertEquals(valueToUrl("http://deno.land"), "http://deno.land");
assertEquals(
Expand Down
1 change: 1 addition & 0 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export function valueToUrl(value: string) {
lowerCaseValue.startsWith("http:") ||
lowerCaseValue.startsWith("https:") ||
lowerCaseValue.startsWith("npm:") ||
lowerCaseValue.startsWith("jsr:") ||
lowerCaseValue.startsWith("node:") ||
lowerCaseValue.startsWith("file:")
) {
Expand Down

0 comments on commit 00b9ab7

Please sign in to comment.