This is a JSR registry API compatible server that provides NPM modules transformed to JSR format. There is a hosted instance available at https://npm2jsr.easrng.net. Use at your own risk, it is very likely that I will need to ship changes that could break your lockfiles.
npm2jsr puts all the packages it generates under the jsr:@npm
scope. To
convert an npm package name to the equivalent jsr:@npm/
-namespaced package
name, follow these steps:
- Let
package_name
be the NPM package name to convert - If
package_name
starts with@
- Remove the initial
@
character frompackage_name
- Assert that
package_name
contains exactly one/
character - Split
package_name
on/
intoscope
andname
- Assert that
scope
does not contain__
- Return
"@npm/scope__name"
- Remove the initial
- Otherwise
- Assert that
package_name
does not contain/
or__
- Return
"@npm/package_name"
- Assert that
/@npm/<encoded-package-name>/meta.json
Version information in JSR format/@npm/<encoded-package-name>/<version>_meta.json
Export map and manifest for a specific version of a package in JSR format. Note that nomoduleGraph
is provided./@npm/<encoded-package-name>/<version>/<path>
Serves files from the transformed package.