Ways to Contribute
There are many ways to contribute to Deno:- Fix bugs or add features - This is the main repository that provides the
denoCLI - Improve Node.js compatibility - Many systems, including a large part of the Node.js compatibility layer, are implemented in JavaScript and TypeScript modules. These are a good place to start if you are looking to make your first contribution
- Write documentation - Help improve the docs at docs.deno.com
- Report issues - Found a bug? Let us know on GitHub Issues
Getting Started
Before you start contributing, you’ll need to set up your development environment:Fork and clone the repository
Fork the Deno repository on GitHub and clone it locally. See Building from Source for detailed instructions.
Build Deno
Follow the building from source guide to compile Deno on your machine.
Make your changes
Create a new branch and make your changes. See the Development Guide for workflows and best practices.
Git Workflow
Deno uses a GitHub-based standard git workflow. The main branch ismain. All development happens in feature branches, which are then merged into main via pull requests.
Creating a Pull Request
When your feature is finished and ready for review:- Create a descriptive branch - Use names like
feature/new-cli-commandorfix/bug-in-worker-threads - Commit with clear messages - Write descriptive commit messages that explain the why, not just the what
- Push to your fork - Push your branch to your forked repository
- Open a PR - Create a pull request against the
mainbranch - Describe your changes - Provide a clear summary of what you changed, why it was necessary, and link to any related issues
PR Best Practices
- Keep changes minimal - Don’t do drive-by changes in a PR. If you need to make an unrelated change, create a separate PR
- Format before committing - Run
./tools/format.jsto format your code - Lint your changes - Run
./tools/lint.js(for Rust) or./tools/lint.js --js(for JavaScript/TypeScript only) - Run tests - Ensure
cargo testpasses before submitting - Respond to feedback - Address reviewer comments and questions promptly
Submitting Your PR
Before submitting, make sure:Tests Pass
Run
cargo test to ensure the full test suite passes, including unit tests, integration tests, and Web Platform Tests.Code is Formatted
Run
./tools/format.js to format all code to match the repository’s consistent style.No Lint Errors
Run
./tools/lint.js to check for common mistakes using clippy (Rust) and dlint (JavaScript).Builds Successfully
Ensure your changes compile without errors using
cargo build.Development with HMR
When working on JavaScript/TypeScript modules (including Node.js compatibility), use the--features hmr flag. This is a special development mode where JS/TS sources are read at runtime instead of being included in the binary:
VSCode Configuration
For VSCode users, add this to your workspace settings:.vscode/settings.json
Using Development LSP
To use a development version of the Language Server Protocol in VSCode:Install the Deno extension
Install the Deno VSCode extension if you haven’t already.
Getting Help
If you need assistance:- GitHub Issues - Check existing issues or create a new one
- Discord - Join the Deno Discord server for community discussions
- Recent PRs - Look at recent pull requests for similar changes
- Ask maintainers - The Deno team is helpful and responsive