@@ -15,14 +15,16 @@ example below will add the most recent version of
1515[ ` @luca/cases ` ] ( https://jsr.io/@luca/cases ) to your project.
1616
1717``` bash
18- # deno
18+ # deno, pnpm 10.9+, and yarn 4.9+ with first class JSR support
1919deno add jsr:@luca/cases
20+ pnpm add jsr:@luca/cases
21+ yarn add jsr:@luca/cases
2022
21- # npm (one of the below, depending on your package manager)
23+ # npm, bun, and older versions of yarn or pnpm
2224npx jsr add @luca/cases
25+ bunx jsr add @luca/cases
2326yarn dlx jsr add @luca/cases
2427pnpm dlx jsr add @luca/cases
25- bunx jsr add @luca/cases
2628```
2729
2830If you're using Deno, the ` deno add ` command will add an
@@ -38,24 +40,41 @@ something like this:
3840}
3941```
4042
41- For npm and npm-compatible package managers, the ` jsr ` command will add the
42- dependency to your ` package.json ` file, along with a ` .npmrc ` file to your
43- project root with the necessary config to use JSR with npm. Learn more about
43+ For npm compatible package managers, the dependency will be added to your
44+ ` package.json ` file, and the package will be installed to your ` node_modules `
45+ directory.
46+
47+ For npm, older versions of pnpm and Yarn, and for Bun, the ` jsr ` command will
48+ additionally add a ` .npmrc ` file to your project root with the necessary config
49+ to use JSR with npm. Learn more about
4450[ JSR's npm compatibility layer] ( /docs/npm-compatibility ) .
4551
46- After installation with ` npx jsr add ` , your package.json will contain a
47- dependency entry that looks something like this:
52+ After installation with any npm compatible package manager, your package.json
53+ will contain a dependency entry that looks like one of these configurations:
54+
55+ ``` json
56+ // pnpm 10.9+ and yarn 4.9+
57+ {
58+ "dependencies" : {
59+ "@luca/cases" : " jsr:@luca/cases@^1.0.1"
60+ }
61+ }
62+ ```
63+
64+ or
4865
4966``` json
67+ // npm, bun, and older versions of yarn or pnpm
5068{
5169 "dependencies" : {
5270 "@luca/cases" : " npm:@jsr/luca__cases@^1.0.1"
5371 }
5472}
5573```
5674
57- This npm dependency configuration makes use of a special custom scope called
58- ` @jsr ` , which is now configured for you in ` .npmrc ` :
75+ In npm, Bun, and older versions of yarn or pnpm the dependency configuration
76+ makes use of a special custom scope called ` @jsr ` , which is configured for you
77+ in ` .npmrc ` :
5978
6079```
6180@jsr:registry=https://npm.jsr.io
@@ -99,41 +118,49 @@ If you only care about the major version, you can specify just the major
99118version:
100119
101120``` bash
102- # deno
121+ # deno, pnpm 10.9+ and yarn 4.9+
103122deno add jsr:@luca/cases@1
123+ pnpm add jsr:@luca/cases@1
124+ yarn add jsr:@luca/cases@1
104125
105- # npm (and npm-like systems )
126+ # npm (and bun, and older versions of yarn or pnpm )
106127npx jsr add @luca/cases@1
107128```
108129
109130If you want to use a specific minor version, you can specify the minor version:
110131
111132``` bash
112- # deno
133+ # deno, pnpm 10.9+ and yarn 4.9+
113134deno add jsr:@luca/cases@1.0
135+ pnpm add jsr:@luca/cases@1.0
136+ yarn add jsr:@luca/cases@1.0
114137
115- # npm (and npm-like systems )
138+ # npm (and bun, and older versions of yarn or pnpm )
116139npx jsr add @luca/cases@1.0
117140```
118141
119142If you want to use a specific patch version, you can specify the patch version:
120143
121144``` bash
122- # deno
145+ # deno, pnpm 10.9+ and yarn 4.9+
123146deno add jsr:@luca/cases@1.0.1
147+ pnpm add jsr:@luca/cases@1.0.1
148+ yarn add jsr:@luca/cases@1.0.1
124149
125- # npm (and npm-like systems )
150+ # npm (and bun, and older versions of yarn or pnpm )
126151npx jsr add @luca/cases@1.0.1
127152```
128153
129154If you want to use at least a specific patch version, but do want to allow\
130155updates, you can specify the patch version with a ` ^ ` prefix:
131156
132157``` bash
133- # deno
158+ # deno, pnpm 10.9+ and yarn 4.9+
134159deno add jsr:@luca/cases@^1.0.1
160+ pnpm add jsr:@luca/cases@^1.0.1
161+ yarn add jsr:@luca/cases@^1.0.1
135162
136- # npm (and npm-like systems )
163+ # npm (and bun, and older versions of yarn or pnpm )
137164npx jsr add @luca/cases@^1.0.1
138165```
139166
0 commit comments