-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Change how module URLs from deno.land/std/ encode versions to reduce complexity in module provider server #4280
Comments
here's my two cents: |
Everyone understands the meaning of software versioning, this should not be an issue. On the other hand, not only does the parsing of
|
It definitely is that way from a conventional end-user-based file-system point of view; the tricky part here is in the way web servers work. Logically, a website is organised into folders, just like your documents folder for example. Much the same as how it is in your documents folder, it is much neater to keep all versions of a project inside a single folder. A program such as a file server, for example, will treat a url as though it were a tree, and each From a web (or http) server's point of view, it doesn't know that If deno wanted to reverse its goal of not assuming an Back to your question about deno's module repository... In conclusion: |
Thanks for your long lesson but I think you mistake my intention: I did not intend to dictate how every module repository server should organize their files. As mention in #4280 (comment), I am intending on creating a repository server program with |
What |
The Also it will be very difficult to change the import structure we use for |
When I was thinking about #4244, I also think about how such a server should extract module version from a URL.
Flaws in the current approach
The current approach is to use
deno.land/std@version/...
syntax. A code sample that extracts version would look something like this:New, simpler syntax
I suggest we should split module name and version, like so:
std@version
→std/version
.std
→std/latest
. (TBH, this should be discouraged)So the above code could be simplified to:
This would of course be a breaking change, but Deno has yet reached 1.0 so I think this change is reasonable.
See Also
The text was updated successfully, but these errors were encountered: