I published my first deno package
Tags: typescript, deno, math, showdev
Published: 2022-01-06 08:03:21

<a title="Cmglee, CC BY-SA 3.0 &lt;https://creativecommons.org/licenses/by-sa/3.0&gt;, via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:Comparison_Pythagorean_means.svg">Cover Image by Cmglee - Own work, CC BY-SA 3.0</a>

## 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](https://deno.land/manual/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](https://deno.land/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](https://deno.land/manual/testing) and provides [basic assertions](https://deno.land/manual/testing/assertions) that can also take care of collecting [coverage](https://deno.land/manual/testing/coverage) data.
It also comes with a [linter](https://deno.land/manual/tools/linter) and a (code and docs and code in docs) [formatter](https://deno.land/manual/tools/formatter) and [there is more](https://deno.land/manual/tools).

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 karfau/scor %}

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

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

```ts
import {scor} from "https://deno.land/x/scor@v1.0.0/scor.ts";
```

Make sure to use the latest version:
[![latest version of scor](https://img.shields.io/github/v/tag/karfau/scor?label=scor&sort=semver)](https://deno.land/x/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](https://github.com/karfau/scor#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.