How to rewrite this: `import * as base32 from "jsr:@std/encoding@0.224.3/base32.ts";`

I am migrating std from /x and I ran into this issue. What the correct way to import just base32.ts. For now I can do
4 Replies
Leokuma2mo ago
import * as base32 from "jsr:@std/encoding@0.224.3/base32"
import * as base32 from "jsr:@std/encoding@0.224.3/base32"
Exports are declared in deno.json:
@std/encoding - JSR
@std/encoding on JSR: Utilities for encoding and decoding common formats like hex, base64, and varint
cococore5w ago
why do you migrating? does jsr better than x?
iuioiua5w ago
Yes, JSR is better than /x. This blog post can provide more context behind the decision:
Deno Blog
The Deno Standard Library is now available on JSR
The Deno Standard Library has moved to JSR, supporting SemVer ranges in imports and compatibility with Node.js, Cloudflare Workers, and more.
Leokuma5w ago
Deno team is really pushing JSR, but personally I would not say JSR is "better" than HTTPS. I'd say it depends on your use case and the way you like to work. There are tradeoffs