-
-
Notifications
You must be signed in to change notification settings - Fork 251
refactor!: replace deno toolchain #1698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
uncenter
wants to merge
17
commits into
main
Choose a base branch
from
begone-deno
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…mat utils, remove file checker
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are a few issues I've been frustrated with about Deno recently.
deno fmthad a regression and did not properly exit with a failure code after errors (now fixed)..node-versionfile,engines.denofield indeno.json/package.json, or similar. This makes keeping a consistent Deno version for users, in the flake, and throughout CI workflows, tricky.deno.locklockfile 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.
Biome is the ideal candidate here. It also supports linting (see below).
Unfortunately, the supported languages is somewhat limited:
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.
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/.)
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
Denoglobal APIs quite a bit, mostly for filesystem operations, so I have wrapped Node's builtin modules with helper functions to supplant where we previously usedDeno.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 bynode:assert👀@std/fmt: no replacement known for the handyprintf/sprintfutils ❌@std/path: should be replaced bynode:path👀@std/yaml: is a fork ofjs-yaml, hopefully is still a drop-in replacement 👀@std/fs: replaced with node APIs ✅@std/cli: used forparseArgs(which is based on minimist), switched to https://github.com/fabiospampinato/tiny-parse-argv (drop-in compatible withparseArgs, is also based on minimist) ✅