Thanks for your interest in highlighters. This guide covers how to set up the project locally, the commands you'll use day to day, and the process for getting changes merged and released.
Please read our Code of Conduct before participating.
- Node.js
>=18 - pnpm (this repo uses pnpm workspaces; install it via
corepack enableor from pnpm.io)
Clone the repo and install dependencies:
pnpm installRun these from the repo root:
pnpm test: run the Vitest suitepnpm build: build every package underpackages/*pnpm typecheck: type-check every package with TypeScriptpnpm size: check the per-package bundle-size budgetspnpm knip: check for unused files, dependencies, and exportspnpm consumer-smoke: pack the tarballs and run the ESM/CJS/subpath/SSR import smokes
Run a script in a single package with pnpm --filter @highlighters/core <script>.
Use one of the following prefixes so the intent of a branch is clear at a glance:
fix/: a bug fixdocs/: documentation-only changesfeat/: a new feature or capabilitychore/: tooling, config, or dependency workperf/: performance work that doesn't change behaviour
Example: feat/glyph-snap-mode.
highlighters uses Changesets to manage versions and changelogs.
Whenever your PR changes code that ships to users (anything under packages/* that isn't purely internal), add a changeset:
pnpm changesetChoose the bump type for each affected package:
- major: breaking changes to a public API
- patch: bug fixes, internal refactors, docs inside a package
- minor: new features, new APIs, new exports (backwards compatible)
The four published packages move together. .changeset/config.json groups @highlighters/core, @highlighters/react, @highlighters/vue, and @highlighters/svelte under linked, so when any one of them gets a bump, they all release at the same version. Pick the highest bump type that applies to any package in your change and Changesets will carry the rest along.
Skip the changeset only for PRs that don't affect published output (CI config, repo-level docs, tests, internal tooling).
- Open a PR against
mainonce your branch is ready. - In the description, cover:
- What changed and why
- A test plan: the commands you ran and what you verified manually
- Any follow-ups or known limitations
- Make sure
pnpm typecheck,pnpm test, andpnpm buildall pass locally. - Add a changeset if your change touches a published package.
- By contributing you agree to abide by the Code of Conduct.
A maintainer will review, request changes if needed, and merge once CI is green.
- PRs are merged into
main. - The Changesets bot opens (or updates) a
chore: version packagesPR that consumes pending changesets, bumps versions, and updates changelogs. - Merging that version-packages PR triggers the release workflow.
- Publishing to npm happens via OIDC trusted publishing, so no long-lived tokens are involved.
- British spellings in prose where it's natural (colour, behaviour, organisation).
- Keep docs plain and direct; skip marketing adjectives.
Questions? Open a discussion or reach out at hi@ja.mt.