deno-udd icon indicating copy to clipboard operation
deno-udd copied to clipboard

generalized format for package updates [Enhancement]

Open therealadityashankar opened this issue 5 years ago • 6 comments
trafficstars

I guess one of the core concepts of deno is being decentralized, and being restricted to

https://deno.land/std
https://deno.land/x
https://denopkg.com
https://dev.jspm.io
https://cdn.pika.dev
https://unpkg.com

Isn't good, cause people might want to use other domains - or perhaps their own domain, so like what could help would be a generalized update check format, i.e. if something like,

https://deno.land/std@versions could return all the versions in a json format, i.e.

returning something like

{
    "versions": ["0.0.1", "1.0.0", "1.0.1", "1.1.0", "2.0", "2.6.9"],
    "deprecated": ["1.*"],
    "fatal-risk-of-use": ["<1.0.0"],
    "dog-person-wrote-code": false,
    "cat-person-wrote-code": true
}

therealadityashankar avatar May 09 '20 22:05 therealadityashankar

This would certainly be nice (to publish the version explicitly). But how would udd know a domain does this?

One potential solution/alternative is #3, for users to pass their own additional registry .ts (that among other things does the version lookup). I need to clean up the registry code prior to that but I think it should work... I was kinda hoping #8 would be solved first but looks like that's not going to be 1.0.0.

hayd avatar May 10 '20 14:05 hayd

what if you try if the domain supports this, if it returns with 404, it does not, If it doesn't, use it

therealadityashankar avatar May 10 '20 16:05 therealadityashankar

I think, like, one of the primary reasons deno was created was to avoid writing and managing package.json, or similar additional files, it you've an additional registry.ts, kinda defeats that purpose

therealadityashankar avatar May 10 '20 16:05 therealadityashankar

I don't really follow what is being advocated here.

Do you mean there should be some consensus/shared format/endpoint that all of these repositories follow? (I'm not sure what udd can do to instantiate that!)

hayd avatar May 11 '20 20:05 hayd

I guess I clearly didn't think this through enough, yeah you're right, this would probably be hard to tell other people to do in their custom links,

I just... idk, like I hate the whole idea of writing (and managing) another file for all additional dependencies, It kinda goes against the whole simplistic idea of deno, but I can understand that this might be the only possible option

therealadityashankar avatar May 14 '20 12:05 therealadityashankar

Do you mean there should be some consensus/shared format/endpoint that all of these repositories follow? (I'm not sure what udd can do to instantiate that!)

yeah, that's basically what I was saying, i.e. that can use @versions in a link to find all versions in a link, like for example https://deno.land/x/udd@versions will give us all the versions of udd, (it doesn't work, but if people supported it, that would've been nice)

therealadityashankar avatar May 14 '20 12:05 therealadityashankar