Skip to content

Conversation

@uncenter
Copy link
Member

@uncenter uncenter commented Apr 9, 2025

There are a few issues I've been frustrated with about Deno recently.

  1. deno fmt had a regression and did not properly exit with a failure code after errors (now fixed).
  2. Deno doesn't support a .node-version file, engines.deno field in deno.json/package.json, or similar. This makes keeping a consistent Deno version for users, in the flake, and throughout CI workflows, tricky.
  3. Renovate (dependency update bot) does not support updating Deno's deno.lock lockfile automatically, so we have been doing the lockfile updates ourselves on Renovate PRs - this has the unfortunate side effect of making Renovate pause updates (including automated closing) to that PR.

But there are also some benefits to Deno - hence why we have been using it since the beginning of this repository for scripts, and for formatting all files since the beginning of 2025. The following requirements still need to be met to replace Deno's functionality.

  1. Formatting ⌛

Biome is the ideal candidate here. It also supports linting (see below).
Unfortunately, the supported languages is somewhat limited:

  • TypeScript (scripts)
  • JSON(C/5) (schemas, configuration files, etc)
  • Less (userstyles)
  • YAML (workflows and userstyles.yml)

Less and YAML are critical here, so that is a bit of a blocker. @isabelroses has suggested looking into treefmt, which I will do. We might have to switch back to Prettier.

  1. Linting ✅👀

Biome is again the ideal candidate here. Biome, like Deno, supports TypeScript/JavaScript linting very well. There also is the possibility of using Biome for CSS linting, as they already support a a limited subset of Stylelint's rules: https://next.biomejs.dev/linter/css/sources/#stylelint. (One issue here is that I'll need to see if I can, and then put in the work to, rewrite our custom Stylelint plugins/rules to Biome's API: https://next.biomejs.dev/linter/plugins/.)

  1. Scripts: Runtime & Package Management 🚧

Node.js recently added support for executing TypeScript (by preprocessing with a type stripper) natively in >=v23. We can use this, along with pnpm for package management, to replace Deno. We use the Deno global APIs quite a bit, mostly for filesystem operations, so I have wrapped Node's builtin modules with helper functions to supplant where we previously used Deno.

We use(d) the Deno standard library on JSR frequently in scripts. I have tried to remove as many as possible, but luckily some are supported outside of Deno which gives us some helpful leeway.

  • @std/assert: should be replaced by node:assert 👀
  • @std/fmt: no replacement known for the handy printf/sprintf utils ❌
  • @std/path: should be replaced by node:path 👀
  • @std/yaml: is a fork of js-yaml, hopefully is still a drop-in replacement 👀
  • @std/fs: replaced with node APIs ✅
  • @std/cli: used for parseArgs (which is based on minimist), switched to https://github.com/fabiospampinato/tiny-parse-argv (drop-in compatible with parseArgs, is also based on minimist) ✅

@WalkQuackBack WalkQuackBack added 0.kind: meta Repository-wide issues 2.status: stale Lacking recent activity 6.by: staff Authored by a staff member labels Nov 4, 2025
@uncenter uncenter added the 2.status: pending Pending until internal discussion, planned updates, etc. label Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: meta Repository-wide issues 2.status: pending Pending until internal discussion, planned updates, etc. 2.status: stale Lacking recent activity 6.by: staff Authored by a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants