News

Because I don't do social media.

Migrating a Node/NPM package to Deno

I migrated Shurley from Node/NPM to Deno, now publishing the package in both places.

tl;dr; You can see the main commit of the migration here. You can also see the whole repo and inspect at will.

Why migrate?

I've wanted to write a package that's published in both NPM and Deno, but wanted to focus on the development and publishing process rather than the package itself, so migrating an existing package made a lot more sense.

Why shurley?

Even though it didn't have any production dependencies already, the development dependencies still required security updates, which was annoying as it didn't affect anyone using the package. Anyway, it's a very simple package/function, so it seemed like the perfect candidate for my intentions.

Why Deno?

It allows TypeScript by default, and it includes a formatter, linter, and test commands (the devDependencies that I had installed)!

What changed?

You can see it in the commit, I removed a lot of stuff. Mainly everything that enabled prettier, eslint, and mocha.

I then added a new script, build-npm.ts, which uses dnt to generate the Node-compatible code for npm.

Finally, I just added a Makefile and tweaked the README.md to make the development and publishing process easer.

I was really happy and surprised with how easy the process was, though arguably this was a very simple package to migrate.

You can find the package in Deno and in NPM now.

I hope you enjoy it.

Thank you so much for being here. I really appreciate you!