Closed sigmaSd closed 9 months ago
udd have many registries, is it in the scope of molt to support those ?
udd have many registries, is it in the scope of molt to support those ?
No. As mentioned in the readme, not implementing registry-specific logic is one of the main concept of molt. We only want to support registries that has the same behavior as Deno's official registries about redirect of unversioned import specifiers.
However, I don't mind having a few exceptions, since we already have a special logic for npm specifiers. And the raw github specifier seems worth considering.
Or we may have a plugin-like system where users can pass custom resolvers to molt.
You may also check out https://github.com/boywithkeyboard/updater, which does support github imports and is developed actively.
A plugin system sounds cool, it would be built on top molt interface of using deno graph, while keeping the core as it is
anyhow feel free to close the issue, if you think it's not that much important
I got an idea to handle a wider range of URLs in a unified way. That should solve this issue as well as https://github.com/hasundue/molt/issues/86.
@sigmaSd The latest release adds support of non-semver version specifiers lead by "@", so now you can use jsdelivr to get your raw github imports updated by molt:
import { collect } from "https://cdn.jsdelivr.net/gh/hasundue/molt@e4509a9/mod.ts"
Slash-separated version specifiers, like in imports from raw.githubusercontent.com
, will be also supported soon.
I decided not to support slash-separated version specifiers for now. Let me close this issue, suggesting to use jsdelivr. See also #97.
Apparently molt still doesn't work with jsdelivr because they doesn't accept HEAD request method? I'll try implementing a compat mode using GET method instead.
Found that denopkg https://denopkg.com/ works with molt. Documentation is comming with the next feat release.
Nah it just redirects to master branch... Let me give up the feature for now
Maybe its a good feature, I have currently a dependency that I'm importing like that.
udd: https://github.com/hayd/deno-udd/blob/09f9994e2588a0744b8983f91122932b494eb176/registry.ts#L556