Thanks for your interest in contributing! Here's how to get started.
- Node.js >= 18
- pnpm
- CMake >= 3.16
- C++17 compiler (clang or gcc)
- Emscripten SDK (for WASM builds)
# Clone and install
git clone https://github.com/privaloops/hevc.js.git
cd hevc.js
pnpm install
# Native build (debug + tests)
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
cd build && ctest --output-on-failure
# WASM build
source ~/emsdk/emsdk_env.sh
emcmake cmake -B build-wasm -DBUILD_WASM=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build-wasm
# JS packages
pnpm -r build# C++ unit + oracle tests (128 tests)
pnpm test:native
# E2E browser tests (requires built WASM + demo bundles)
pnpm build:demo
pnpm test:e2e- Fork the repo and create a branch (
feature/xxxorfix/xxx) - Make your changes with clear, atomic commits (conventional commits:
feat:,fix:,docs:, etc.) - Ensure all tests pass
- Open a PR against
main
This repo uses Changesets to manage versioning and publishing of @hevcjs/core and @hevcjs/dashjs-plugin to npm.
- Run
pnpm changesetand pick the bump type (patch,minor, ormajor) for each affected package. - Write a clear summary of the change — it lands in the per-package
CHANGELOG.md. - Commit the generated
.changeset/<random-name>.mdwith your PR.
PRs that only touch docs, CI, tests, or build configuration don't need a changeset.
- Don't bump the
versionfield in anypackage.jsonmanually — Changesets does that at release time. - Don't edit a per-package
CHANGELOG.mdby hand — Changesets generates the entries. - Don't run
pnpm publishlocally for a real publish; therelease.ymlGitHub workflow is the only authority.
- Feature/fix PRs with changesets are merged into
main. - The Changesets GitHub Action opens (or updates) a "Release PR" that consolidates all pending changesets.
- When you're ready to ship, merge the Release PR — the workflow then bumps versions, generates CHANGELOGs, publishes to npm, and creates GitHub releases + tags automatically.
- C++: C++17, compiled with
-Wall -Wextra -Wpedantic -Werror - TypeScript: strict mode, ES2020 target, ESM modules
- Variable/function names follow the ITU-T H.265 spec for decoder code
Open an issue at https://github.com/privaloops/hevc.js/issues with:
- Steps to reproduce
- Expected vs actual behavior
- Browser/OS/architecture
- Sample bitstream if applicable