Thanks for contributing to Diff Viewer.
- Node.js 22.x
- npm
- VS Code
npm ciThe repository declares engines.node = 22.x in package.json. Using Node 22 locally keeps installs, tests, and webpack output aligned with CI and contributor expectations. The repo also includes .nvmrc and .node-version set to 22 for local toolchains that read them.
npm run build:dev
npm test
npm run test:coverage:ci
npm run test:integration:desktop
npm run smoke:web
npm run test:all
npm run lint
npm run format:check
npx tsc --noEmit -p tsconfig.jsonnpx playwright install chromium
npm run smoke:webThe smoke flow builds the extension, launches VS Code Web, and runs browser-hosted extension tests against sample patch fixtures, including a generated large-diff case. Playwright's Chromium browser must be installed locally before running the smoke command.
npm run test:integration:desktopThe desktop integration flow builds the extension, launches a real Extension Development Host through @vscode/test-electron, and verifies activation, custom editor opening, raw-file fallback, collapsed opening, and a configuration-driven rerender.
On headless Linux environments, run it through xvfb-run -a npm run test:integration:desktop, which is also how GitHub Actions executes the desktop lane.
- Open the workspace in VS Code.
- Run the extension in an Extension Development Host or use the web smoke flow above for browser-mode coverage.
- Open
.diffor.patchfiles to exercise the custom editor.
- Keep changes focused.
- Add or update tests for behavior changes.
- Run the relevant verification commands before opening a PR. At minimum, mirror the checks affected by your change; for CI parity on Linux, that usually means
npm run format:check,npm run test:coverage:ci,npm run smoke:web, andxvfb-run -a npm run test:integration:desktop.