Migration from Deno to Node.js

SilverBullet started out as a node.js backed project. At some point I migrated it to use Deno for both backend and frontend, because Deno offered some nice sandboxing features. A lot has happened since then. Until just now, Deno was only used for building the client and plugs.

Since we do not get any real benefit from using Deno and it is an atypical stack choice (node.js is more mainstream), I put it on my mental list of things to transition away from. I now finally managed to do so.

This is purely a toolchain change, there's no impact on performance (except maybe builds) at all. The server is still Go, and the client is still Javascript running in your browser, nothing changes there.

If you're a developer hacking on SilverBullet, this will be a bit of a change. You now can uninstall Deno and install Node (if you didn't have it installed). Check README for updated instructions. I tried to keep things as standard as possible, also to make onboarding new people as easy as possible.

The biggest changes:

  1. Builds are now driven via npm and node
  2. Tests are now written using Vitest (previously Deno.test)
  3. Plugs need to migrate to node (over time), which should primarily involve replacing their deno.json files with a package.json. Instructions on how to do this will follow soon. I did not remove the plug-compile.js from the edge release, so the old Deno will continue to work, you can migrate when you like. There were no API changes part of this migration.

The new builds are now on the edge builds. Please let me know if you notice any regressions.

3 Likes

I will also enable biome (Rust implementation of es-lint + prettier) code formatting on the repo soon, which will likely mean a HUGE diff that is purely formatting. Sorry if you had in-progress PRs...