First off — thank you for taking the time to contribute!
This project is an open-source rework of MirageJS that focuses on its ORM capabilities, modern type system, and clean API.
Contributions, discussions, and feedback are very welcome ❤️
-
Fork the repository and clone your fork:
git clone https://github.com/<your-username>/orm.git cd orm
-
Install dependencies:
pnpm install
-
Run checks and tests:
- Lint, format, and types:
pnpm check:all - All tests (type tests + unit tests):
pnpm test:all - Everything before a PR:
pnpm build:checks
- Lint, format, and types:
All work should be done on feature branches, not directly on main.
-
Create a new branch:
git checkout -b feat/add-new-feature // fix/issue-with-factory
-
Make your changes and commit them following the Conventional Commits format (see below).
-
Push your branch and open a Pull Request to
main.
This project follows the Conventional Commits specification.
Each commit message must have a clear, structured format:
<type>(<scope>): <short summary>
| Scope | Use for |
|---|---|
| lib | Changes to the main library (lib/) — core ORM, schema, models, serializers, etc. |
| example | Changes to the example project (examples/task-board/) — demo app, tests, docs. |
Use these scopes so that changelogs and reviews can distinguish library changes from example-only changes.
| Type | Use for |
|---|---|
| feat | New features |
| fix | Bug fixes |
| docs | Documentation only changes |
| style | Code style (formatting, missing semicolons, etc.) |
| refactor | Code changes that neither fix a bug nor add a feature |
| perf | Performance improvements |
| test | Adding or updating tests |
| chore | Maintenance tasks (deps, configs, CI) |
feat(lib): add factory builder support
fix(lib): correct relation key resolution in serializer
feat(example): add login help dialog
docs(example): update task-board README with schema setup
docs: update contribution guide with scope requirements- Scope is required for
featandfix: usefeat(lib)orfeat(example)(orfix(lib)/fix(example)). - Keep summaries short (under 80 chars).
- Use present tense (“add” not “added”).
- Avoid capitalizing the first word after the colon.
- You can include a body or footer (e.g. to reference issues) if needed.
Before opening a PR:
- Make sure all build checks pass locally:
pnpm run build:checks
- Review your PR checklist in
.github/PULL_REQUEST_TEMPLATE.md. - Ensure commits follow Conventional Commits.
- Squash or rebase if your branch history is noisy.
Once merged, your commits will automatically be included in the changelog via the release process.
There are two test scripts; use test:all to run both:
pnpm test— Runs unit tests (Vitest).pnpm test:types— Runs type tests (Vitest with--typecheck).pnpm test:all— Runs type tests then unit tests (handy before pushing).
Other useful commands:
pnpm test:watch— Unit tests in watch mode.pnpm test:coverage— Unit tests with coverage.
Run only a subset (by pattern):
pnpm test -- src/modelThe repository uses ESLint and Prettier for code consistency, and TypeScript strict mode for type safety.
Check (CI-style, no edits):
pnpm check:lint— Lintlib/src.pnpm check:format— Check Prettier formatting.pnpm check:all— Lint + format + type-check (handy before committing).
Fix (auto-fix lint and format):
pnpm fix:lint— Auto-fix ESLint issues.pnpm fix:format— Apply Prettier.pnpm fix:all— Run both (handy before committing).
Releases are automated with Changesets and follow Semantic Versioning (semver).
To add a changelog entry for your PR:
pnpm changesetThis will guide you through writing a short description of the change and its version bump (patch, minor, or major).
Your time and contributions help evolve the next generation of MirageJS ORM.
Every issue, PR, and idea helps us refine this library — thank you for being part of it!