Allow semver ranges and identifiers in urls
See original GitHub issueThe website should be able to resolve semver symbols. Being able to use semver to dedupe dependencies is an important step towards facilitating the development of medium to large web apps using Deno. I believe some other github redirectors already support this as well. While we could use those CDNs instead, the deno.land registry is currently the only place that exclusively lists deno modules. It may be possible to build further deduping tools once basic semver support is in place.
Some examples of what URLs would look like:
https://deno.land/std@^0.50.0/path/mods.ts
https://deno.land/std@~0.50.0/path/mods.ts
https://deno.land/std@>=0.50.0/path/mods.ts
https://deno.land/std@0.49.0||^0.51.0/path/mods.ts
https://deno.land/std@0.49.0-0.51.0/path/mods.ts
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:16 (5 by maintainers)
Top GitHub Comments
https://github.com/EdJoPaTo/deno-semver-redirect (written in Rust) solves this problem already by wrapping
deno.land/x
.For instance, https://dsr.edjopato.de/grammy/0.x/mod.ts will parse the semver specifier and then redirect you to the correct latest
0.x
version ondeno.land/x
, so you can use these URLs in import specifiers.@tani I took a quick look at your project over the weekend, it looks interesting! I wouldn’t be against merging it if you want to open a PR implementing it on this repo. the
deno.land
website is already running on Deploy so it should be pretty easy. One thing I would want to see on that PR though would be unit tests; Your implementation seems to work using Regex and I would want to be sure that it works as expected before merging it.