Getting Started
Development Workflow
Making Changes
- Write your code - Make changes to TypeScript files in
src/ - Follow code style - Use ESLint and Prettier (see below)
- Build - Test that your changes build successfully
- Test - Ensure all tests pass
- Commit - Write clear commit messages
Building Your Changes
Running Tests
Always run tests before submitting:Code Style
yt-dlp-ejs uses automated tooling to maintain consistent code style.ESLint
ESLint enforces code quality rules:- typescript-eslint for TypeScript-specific rules
- @eslint/js recommended configuration
- Node.js global variables
eslint.config.js
ESLint Configuration
ESLint Configuration
Prettier
Prettier formats code consistently:- All
**/*.[jt]sfiles (JavaScript and TypeScript) package.json
Python Code Style
Python code uses Ruff for linting and formatting:pyproject.toml under [tool.ruff.lint].
Continuous Integration Checks
When you open a pull request, automated checks run:Code Quality Checks
- actionlint - Validates GitHub Actions workflows
- zizmor - Audits workflow security
- Ruff - Python linting and formatting
- Prettier - JavaScript/TypeScript formatting
- ESLint - JavaScript/TypeScript linting
Build Tests
- pnpm build - Builds with pnpm
- Deno build - Builds with Deno 2.0.0+
- Bun build - Builds with Bun 1.0.31+
- Node build - Builds with Node.js 20.0+
Runtime Tests
- Deno tests - All player variants on Deno 2.0.0+
- Bun tests - All player variants on Bun 1.2.11+
- Node tests - All player variants on Node.js 22.18+
- Python tests - Python 3.10-3.14 and PyPy 3.11 on Ubuntu and Windows
Additional Checks
- Lockfile verification - Ensures Deno and npm lockfiles are synchronized
- Build hash verification - Confirms all runtimes produce identical output
All checks must pass before a pull request can be merged. You can run these checks locally before pushing.
Upgrading Packages
yt-dlp-ejs provides lockfiles for every supported package manager. When upgrading packages, all lockfiles must be updated simultaneously.Understanding check.py
Thecheck.py script validates that npm and Deno lockfiles contain the same package versions (by comparing integrity hashes). This prevents version drift between runtimes.
If check.py fails:
- Check the error message for which packages differ
- Verify you followed all update steps
- Manually update
ADDITIONAL_PACKAGES_NODEorADDITIONAL_PACKAGES_DENOincheck.pyif needed
Submitting Changes
Pull Requests
When you’re ready to submit:Open a pull request
Go to github.com/yt-dlp/ejs and open a pull request from your branch.Include:
- Description of what changed and why
- Testing details - what you tested
- Related issues - link any related issues
Pull Request Checklist
- Code follows ESLint and Prettier style
- All tests pass locally
- New tests added for new functionality
- Documentation updated if needed
- All lockfiles updated (if dependencies changed)
-
check.pypasses (if lockfiles changed) - Commit messages are clear and descriptive
Reporting Issues
Found a bug or have a feature request?Report a Bug
Open an issue describing the problem, including:
- Steps to reproduce
- Expected vs actual behavior
- Runtime and version
- Error messages or logs
Request a Feature
Describe the feature you’d like to see and why it would be useful.
Issue Guidelines
When reporting issues:- Search existing issues - Your issue may already be reported
- Provide details - Include version numbers, error messages, and reproduction steps
- Be specific - Vague issues are harder to fix
- One issue per report - Don’t combine multiple unrelated issues
Reporting Build Differences
If you notice differences between different runtime builds:- Which runtimes produce different outputs
- SHA-256 hashes of the outputs
- Runtime versions
Development Resources
Source Repository
View source code and browse issues
CI Workflows
See automated testing configuration
Code of Conduct
Be respectful and constructive in all interactions. This project follows standard open-source collaboration practices:- Be welcoming and inclusive
- Respect differing viewpoints
- Focus on what’s best for the project
- Show empathy towards other contributors
Questions?
If you have questions about contributing:- Check existing documentation
- Search existing issues
- Open a new issue with your question
