You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JSR npm CLI integrates JSR (JavaScript Registry) packages with npm-based projects, facilitating the use of JSR packages in environments that traditionally rely on npm. Learn more about JSR at [jsr.io](https://jsr.io).
3
+
The JSR npm CLI integrates JSR (JavaScript Registry) packages with npm-based
4
+
projects, facilitating the use of JSR packages in environments that
5
+
traditionally rely on npm. Learn more about JSR at [jsr.io](https://jsr.io).
4
6
5
7
## Quick Start
6
8
@@ -10,7 +12,8 @@ Add a JSR package to your project:
10
12
npx jsr add @package/name # 'install' and 'i' are also supported
11
13
```
12
14
13
-
This command auto-updates your `package.json` and installs the package, automatically detecting and using your project's package manager.
15
+
This command auto-updates your `package.json` and installs the package,
16
+
automatically detecting and using your project's package manager.
14
17
15
18
## How It Works
16
19
@@ -20,9 +23,11 @@ The CLI creates or updates a `.npmrc` file in your project with:
20
23
@jsr:registry=https://npm.jsr.io
21
24
```
22
25
23
-
This line redirects npm to fetch JSR packages from the JSR registry instead of the default npm registry.
26
+
This line redirects npm to fetch JSR packages from the JSR registry instead of
27
+
the default npm registry.
24
28
25
-
Packages are added to `package.json` with an alias, mapping the JSR package name to the npm registry URL hosted by JSR, like so:
29
+
Packages are added to `package.json` with an alias, mapping the JSR package name
30
+
to the npm registry URL hosted by JSR, like so:
26
31
27
32
```json
28
33
{
@@ -32,7 +37,8 @@ Packages are added to `package.json` with an alias, mapping the JSR package name
32
37
}
33
38
```
34
39
35
-
This ensures that the package is fetched from JSR when you run npm install commands.
40
+
This ensures that the package is fetched from JSR when you run npm install
41
+
commands.
36
42
37
43
## Commands
38
44
@@ -43,14 +49,18 @@ This ensures that the package is fetched from JSR when you run npm install comma
43
49
## Limitations
44
50
45
51
-`jsr:` import specifiers are not supported.
46
-
- Due to transpilation, the developer experience in editors might differ from native JSR usage.
52
+
- Due to transpilation, the developer experience in editors might differ from
53
+
native JSR usage.
47
54
48
-
For the best developer experience and to fully leverage JSR's capabilities, consider environments with native JSR support like Deno.
55
+
For the best developer experience and to fully leverage JSR's capabilities,
56
+
consider environments with native JSR support like Deno.
49
57
50
58
## Contributing
51
59
52
-
We welcome contributions and feedback. Visit our GitHub repository to contribute or report issues.
60
+
We welcome contributions and feedback. Visit our GitHub repository to contribute
61
+
or report issues.
53
62
54
63
## License
55
64
56
-
This CLI is available under the [MIT License](https://opensource.org/licenses/MIT).
0 commit comments