Open-Source Wikis

/

Deno

/

How to contribute

/

Tooling

denoland/deno

Tooling

The dev tools that live inside the Deno repo. Nearly everything is itself written in Deno (TypeScript) — tools/x.ts, tools/format.js, tools/lint.js, the workflow generators in .github/workflows/*.ts.

./x — the developer CLI

./x is a thin shell wrapper around tools/x.ts. It's the recommended entry point for everyday tasks:

Command What it does
./x build cargo build --bin deno (debug)
./x check cargo check
./x fmt format JS/TS/markdown/JSON via dprint, plus cargo fmt
./x lint tools/lint.js (full lint, JS/TS + Rust)
./x lint-js tools/lint.js --js (JS/TS only, much faster)
./x verify fmt + lint-js (used as the pre-commit gate)
./x test runtime unit tests (tests/unit/)
./x node-test Node API unit tests (tests/unit_node/)
./x node-compat Node compatibility test suite (tests/node_compat/)
./x spec spec/integration tests (tests/specs/)
./x napi NAPI tests (tests/napi/)

Source: tools/x.ts (~16K bytes). The script auto-detects the dev binary at target/debug/deno.

tools/format.js

Runs dprint (configured via the top-level .dprint.json) plus cargo fmt --all. Configured for:

  • JavaScript / TypeScript
  • Markdown
  • JSON / JSONC (including __test__.jsonc files)
  • Rust (delegated to cargo fmt)

Run as ./x fmt or tools/format.js.

tools/lint.js

The lint orchestrator. Runs:

  • deno lint with the project's lint config (in .dlint.json) and the custom plugin in tools/lint_plugins/
  • cargo clippy --all-targets (when not --js)
  • tools/copyright_checker.js to enforce the copyright header
  • tools/jsdoc_checker.js for public JS API doc completeness

Flags: --js for JS/TS only, --lib to lint only the library subset.

tools/lint_plugins/

Project-specific Deno-lint rules written as JS plugins. Examples include checks like enforcing primordials usage in extension JS or banning specific patterns. Add new rules here when you find a recurring code-review nit.

Workflow generators (.github/workflows/*.ts)

CI configuration is generated from TypeScript:

.github/workflows/ci.ts          → ci.generated.yml
.github/workflows/pr.ts          → pr.generated.yml
.github/workflows/cargo_publish.ts → cargo_publish.generated.yml
... and so on

Edit the .ts file, re-run the generator (deno run -A .github/workflows/<name>.ts), and commit both files. Don't hand-edit *.generated.yml.

The pattern lets workflow logic be type-checked, factored into reusable functions, and shared across workflows.

Release helpers

Path Purpose
tools/release/ release-cut helpers, including version bumping
cli/tools/upgrade.rs the deno upgrade command itself (101K bytes — very large)
tools/cut_a_release.md manual checklist for cutting a release
.github/workflows/start_release.ts kicks off the release workflow
.github/workflows/promote_to_release.ts promotes a prerelease to release
.github/workflows/cargo_publish.ts publishes crates to crates.io
.github/workflows/npm_publish.ts publishes npm packages (@deno/*)

Build-time helpers

  • tools/check_deno_core_changes.js — flags PRs that touch deno_core to ensure they get extra review.
  • tools/wgpu_sync.js — keeps the WebGPU IDL/spec types in sync with upstream.
  • tools/update_node_gyp_for_tests.ts, tools/update_typescript.md, tools/update_import_map_for_tests.ts — playbooks for updating bundled deps.
  • tools/generate_types_deno.ts — generates the public Deno TypeScript declarations (@deno/types).
  • tools/generate_minimatch_dep.js, tools/copyright_checker.js, tools/jsdoc_checker.js — small one-off helpers run in CI.

Bench tooling

  • tools/build_bench.ts — builds the benchmark binary.
  • tools/build_benchmark_jsons.js — produces JSON for the benchmark dashboard.
  • tests/bench/, tests/bench_util/ — the actual benchmarks.

Editor configuration

  • .editorconfig — basic line-ending / indent rules
  • .dprint.json — dprint formatter config
  • .dlint.json — deno_lint config
  • clippy.toml per crate — extra clippy rules (most notably cli/clippy.toml)
  • rust-toolchain.toml — pinned Rust version

For VS Code, the recommended workspace settings (in .github/CONTRIBUTING.md) include:

{
  "rust-analyzer.cargo.features": ["hmr"],
  "deno.importMap": "tools/core_import_map.json",
  "deno.path": "/path/to/your/target/debug/deno",
}

tools/core_import_map.json

A 58K JSON file that lets editor tooling resolve the internal ext:* module specifiers used by extension JS. Without it, rust-analyzer and the Deno LSP can't navigate from extension JS files to their imports. Update it when adding new internal modules.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Tooling – Deno wiki | Factory