Thank you for your interest in contributing to @plures/chronos! This document describes the process for reporting issues, proposing changes, and getting your contributions merged.
- Code of Conduct
- Getting Started
- Development Workflow
- Commit Conventions
- Pull Request Process
- Testing Guidelines
- Code Style
All contributors are expected to adhere to the Contributor Covenant code of conduct. Be respectful and constructive in all interactions.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/<your-username>/chronos.git cd chronos
- Install dependencies:
npm install
- Verify the setup by running the test suite:
npm run test:run
- Create a feature branch from
main:git checkout -b feat/my-feature
- Make your changes. Keep commits small and focused.
- Add or update tests for any changed behaviour (see Testing Guidelines).
- Run the test suite and ensure it is green:
npm run test:run
- Push your branch and open a pull request against
main.
This project follows Conventional Commits:
| Prefix | When to use |
|---|---|
feat: |
New feature or behaviour |
fix: |
Bug fix |
docs: |
Documentation only |
chore: |
Tooling, dependencies, configuration |
test: |
Adding or updating tests |
refactor: |
Code change with no functional impact |
ci: |
CI/CD workflow changes |
Example: feat: add context-filter option to queryByContext()
Squash-merge is preferred — your PR title becomes the final commit message, so make it meaningful.
- Ensure all tests pass (
npm run test:run). - Update
docs/api.mdif you changed any public API surface. - Add an entry in
CHANGELOG.mdunder[Unreleased]. - Fill in the PR template (description, motivation, testing notes).
- Request a review from a maintainer.
PRs that add new public exports must include:
- Updated
package.json#exportsif a new entrypoint is added - JSDoc on all exported functions/types
- A new test file or additions to an existing one in
tests/
- Tests live in
tests/and use Vitest. - Every public function must have at least one unit test.
- Tests must not call real network services or external APIs.
- Use in-memory stubs/mocks for PluresDB interactions.
- Run tests in watch mode during development:
npm test
- ESM only — no
require(), no CommonJS. - Strict TypeScript-compatible JSDoc — annotate all exported functions with
@paramand@returnstags. - Keep functions small and pure where possible.
- No default exports — use named exports only.
- Follow the patterns already established in
src/(see e.g.src/query.jsfor a reference module).
If you have questions, open a GitHub Discussion or leave a comment on the relevant issue.