Skip to content

Commit c3086f5

Browse files
committed
Deno 2 will require jsr: prefix for deno add
https://deno.com/blog/v2.0-release-candidate#dependency-management
1 parent f75c19c commit c3086f5

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

cli/init.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,11 @@ async function addDependencies(
13031303
const deps = Object.entries(dependencies)
13041304
.map(([name, version]) =>
13051305
`${
1306-
runtime !== "deno" && name.startsWith("npm:") ? name.substring(4) : name
1306+
runtime !== "deno" && name.startsWith("npm:")
1307+
? name.substring(4)
1308+
: runtime === "deno" && !name.startsWith("npm:")
1309+
? `jsr:${name}`
1310+
: name
13071311
}@${
13081312
runtime !== "deno" && version.includes("+")
13091313
? version.substring(0, version.indexOf("+"))

docs/install.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Deno 1.41.0 or later installed on your system. Then you can install Fedify
7777
via the following command:
7878

7979
~~~~ sh
80-
deno add @fedify/fedify
80+
deno add jsr:@fedify/fedify
8181
~~~~
8282

8383
Since Fedify requires [`Temporal`] API, which is an unstable feature in Deno as

docs/manual/federation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ install the package:
350350
::: code-group
351351

352352
~~~~ sh [Deno]
353-
deno add @hongminhee/x-forwarded-fetch
353+
deno add jsr:@hongminhee/x-forwarded-fetch
354354
~~~~
355355

356356
~~~~ sh [Node.js]

docs/manual/log.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ To enable logging in your federated server app, you need to install the
2929
::: code-group
3030

3131
~~~~ sh [Deno]
32-
deno add @logtape/logtape
32+
deno add jsr:@logtape/logtape
3333
~~~~
3434

3535
~~~~ sh [Node.js]

docs/tutorial/basics.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Let's create a new project directory and initialize a new project:
5050
mkdir follow-server
5151
cd follow-server/
5252
echo '{ "unstable": ["kv", "temporal"] }' > deno.json
53-
deno add @fedify/fedify
53+
deno add jsr:@fedify/fedify
5454
~~~~
5555

5656
~~~~ sh [Bun]
@@ -321,7 +321,7 @@ to the next step.
321321
> ::: code-group
322322
>
323323
> ~~~~ sh [Deno]
324-
> deno add @logtape/logtape
324+
> deno add jsr:@logtape/logtape
325325
> ~~~~
326326
>
327327
> ~~~~ sh [Bun]
@@ -609,7 +609,7 @@ To do this, you need to install the package:
609609
::: code-group
610610
611611
~~~~ sh [Deno]
612-
deno add @hongminhee/x-forwarded-fetch
612+
deno add jsr:@hongminhee/x-forwarded-fetch
613613
~~~~
614614
615615
~~~~ sh [Bun]

0 commit comments

Comments
 (0)