I published my first deno package

What was it like to do that?

It was so much fun compared to all previous experiences of publishing a (typescript or javascript) package.

What made it really easy for me to get up to speed with deno:

Of course the experience to "just execute typescript" without having to first research the "currently best way to transpile the code in this use case", is just mind blowing again and again.

Instead of picking from tons of tools, I was regularly visiting the deno manual.
Even when I didn't expect something to be provided out of the box, regular searching pointed me to it.

Deno comes with a test runner and provides basic assertions that can also take care of collecting coverage data.
It also comes with a linter and a (code and docs and code in docs) formatter and there is more.

But the most fun part was publish the package:

  1. I claimed the library name. (I didn't need to create an account for that!)
  2. I followed the instructions to add webhook to my github repository
  3. I created a release on GitHub. This is the step that needs to be repeated to publish a new version.

(Did you know that the versions on https://deno.land/x are immutable and can not be dropped?)

So what package and why?

Thx for asking ;)

I recently analysed npm packages that are still using an insecure version of another library I'm maintaining, to judge if it makes sense to provide an upgrade PR. Since there are over 2000 dependents on all older versions, and at that point in time over 60 on the versions I care about, I needed to prioritize the packages. So I can first provide update the PRs that have a reasonable impact on reducing the usage and have a good chance of being merged.

I still have that idea "Maybe I just didn't use the correct search terms?", because I couldn't find any existing/similar library. If you know about something comparable please let me know.

GitHub logo karfau / scor

Calculate scores for numeric values or items, and get the "total score" (aka "arithmetic mean" or "weighted arithmetic mean") from multiple scores.

scor

Calculate scores for numeric values or items, and get the "total score" (aka arithmetic mean or weighted arithmetic mean) from multiple scores.

Concept and vision

Imagine you

  • have a long list of items to work on, and you want to prioritize them
  • want to show the most relevant items to a user before showing more

For example, let's look at npm packages. Possible criteria are:

  • number of maintainers
  • number of dependencies (direct/transient)
  • time since last published version
  • version (major < 1?) / dist-tags
  • weekly downloads
  • source code repo attributes (e.g. GitHub stars/forks)
  • quality?
  • ...?

The different relevant values come in very different "shapes". Once all the data is gathered per package, depending on the use case the different values are more or less relevant.

I experienced that such a "rating system", or "weighted average score", is not so easy to get completely right from scratch alongside collecting the…

It was developed using TDD, so the coverage is 100%.

To use it in your deno code you can import it like this:

import {scor} from "https://deno.land/x/[email protected]/scor.ts";

Make sure to use the latest version:
latest version of scor

I'm quite happy about the existing documentation (the readme and doc comments), so I won't repeat it here.

I'm really curious to see if it's understandable, so please let me know.

What' the name about?

Well, I checked for suitable names that are still available as an (unscoped) npm package.

So, are you going to publish it to npm?

Maybe, it's currently the last thing on my short list of todos.

First I want to collect some feedback, to see if it's worth the additional effort. If you think it is, feel free to create PR.

31