Skip to content
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

Badge request: deno.land version #9838

Open
PhoneDroid opened this issue Dec 22, 2023 · 5 comments
Open

Badge request: deno.land version #9838

PhoneDroid opened this issue Dec 22, 2023 · 5 comments
Labels
good first issue New contributors, join in! service-badge New or updated service badge

Comments

@PhoneDroid
Copy link

📋 Description

Deno ( https://deno.com/ )

Static Badge

🔗 Data

Public : https://redocly.github.io/redoc/?url=https://apiland.deno.dev/~/spec#tag/registry/operation/getModule

🎤 Motivation

I was shocked to not find any issues / discussions about the
seemingly missing Deno package version badges, so here we are.

Just like NPM packages, Deno package versions should be displayable as badges.
All the same reasons as to have NPM badges apply here as well.
Deno isn't a small new fringe project, so there shouldn't an issue in that regard.

Personally I just wanted to add it to my repository to display the latest version
so people didn't have to go to the registry page, just like I do for NPM packages.

@PhoneDroid PhoneDroid added the service-badge New or updated service badge label Dec 22, 2023
@chris48s
Copy link
Member

chris48s commented Dec 23, 2023

I was shocked

OMG 😮

I suspect part of the reason why this may not have come up is that Deno's registry is a fairly "thin" registry. From https://deno.com/add_module

All modules on deno.land/x need to be hosted as public repositories on GitHub.com.

deno.land/x downloads and stores your repository contents every time you create a git tag. We only do this once for every tag. This ensures that the contents we serve for a specific version can never change.

Our service needs to get informed whenever a new tag is created. For this purpose we use GitHub webhooks.

Because there is a strict one-to-one mapping between releases on https://deno.com/x and GitHub tags, basically all projects can just use the GitHub tag badge as a proxy. Lets say I wanted this for fresh, I could use:

https://img.shields.io/github/v/tag/denoland/fresh?label=deno&logo=deno

or whatever.

Maybe that's why it hasn't come up.

That said, it seems like a reasonable badge to add.

Just one thing I would like to clarify:

Deno (the language) has package.json/NPM support. Also, you can just import a module from anywhere on the internet. For example

import * as lodash from 'https://raw.githubusercontent.com/lodash/lodash/main/lodash.js';

or

import * as axios from 'https://cdn.jsdelivr.net/npm/axios@0.21.1/dist/axios.min.js';

is a valid deno import.

So "a deno package" is quite a broad concept.

Our badges almost alway relate to a service. So we have "NPM" badges and not "node module" badges We have PyPI badges, not "python package" badges, etc. Taking that into account, if I make an API call like https://apiland.deno.dev/v2/modules/fresh and report the latest_version: What is the name for this service? Is it "Deno Third Party Modules", deno.land, deno.land/x ? I'm a bit unclear what this registry is called.

@PhoneDroid
Copy link
Author

PhoneDroid commented Dec 23, 2023

What does the import resolving mechanism of Deno have to do with their registry?

I don't think it will do any good overcomplicating things,
when someone that uses Deno hears Deno module they
think of a module hosted on Denos registry.

If it has to be service based then it would be deno.land,
or how it's generally referred to Denoland ( https://github.com/denoland )

@chris48s chris48s changed the title Deno Badge request: deno.land version Dec 23, 2023
@chris48s
Copy link
Member

An integration does need to relate to the service it fetches data for.

The only reason I bring up Deno's import system is because with deno (moreso than many other languages), a module that is being imported can come from lots of places so it seems even more pertinent in this case to be clear in the docs that this badge would show data about modules registered on deno.land, but not deno modules hosted in other places.

@chris48s chris48s added the good first issue New contributors, join in! label Dec 23, 2023
@chris48s
Copy link
Member

chris48s commented Mar 2, 2024

Quick bit of extra info on here. Deno recently launched another package registry: JSR
I've created a tracking issue for that at #10007

At https://jsr.io/docs/migrate-x-to-jsr it says

Future support for deno.land/x

There are no plans to discontinue or shut down deno.land/x. Module authors can continue to publish and update modules there, and Deno code using it will continue to function.

so I think this feature request remains valid. Simultaneously they are also publishing guidance on how to migrate from /x to JSR. So.. 🤷

@PhoneDroid
Copy link
Author

PhoneDroid commented Mar 4, 2024

it should be possible to migrate those modules to JSR with minimal changes.

They are just giving authors more options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue New contributors, join in! service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

2 participants