Thank you for your interest in contributing to node-es-transformer. This document outlines the process for contributing to this project.
Be kind. Be inclusive. Assume good intent.
- Fork the repository on GitHub
- Clone your fork locally
- Install dependencies:
yarn - Create a feature branch:
git checkout -b feature/my-feature
- Node.js 22+ (see
.nvmrc) - Docker (for running tests)
- yarn package manager
git clone https://github.com/YOUR_USERNAME/node-es-transformer
cd node-es-transformer
yarnyarn build # Build library to dist/
yarn dev # Build and watch for changesThis project uses Testcontainers to automatically manage Elasticsearch containers during tests.
yarn test # Standard tests (ES 9.3.0 by default)
ES_VERSION=8.17.0 yarn test # Test against specific ES version
yarn test:cross-version # Cross-version reindexing tests (8.x → 9.x)- Docker daemon running (
docker psto verify) - At least 2GB available memory (4GB for cross-version tests)
- First run downloads ES Docker image (one-time setup)
- Add test files to
__tests__/directory - Follow existing patterns in test files
- Test against both ES 8.x and 9.x when relevant
- Ensure tests clean up after themselves
yarn lint # Check code styleThis project uses ESLint with Prettier integration. Code style is enforced in CI.
Use Commitizen for commit messages:
cz # Interactive commit message wizardCommit messages must follow Conventional Commits format:
feat:New featuresfix:Bug fixesdocs:Documentation changestest:Test additions or changeschore:Maintenance tasksrefactor:Code restructuring
Important: Before investing time in a PR, please check with the maintainer first:
- Open an issue describing your proposed change
- Wait for maintainer feedback on whether it aligns with project goals
- Discuss implementation approach if needed
This prevents surprise rejections and wasted effort on changes that may not fit the project direction.
- Get approval on an issue first (see above)
- Create a feature branch from
main - Make your changes
- Add tests for new functionality
- Run
yarn lintandyarn test - Create a changeset (see below)
- Commit using
cz - Push to your fork
- Open a pull request referencing the issue
Every PR that affects functionality must include a changeset:
yarn changesetThis creates a markdown file in .changeset/ describing your change. Follow the prompts to:
- Select bump type:
- patch: Bug fixes, documentation
- minor: New features, non-breaking changes
- major: Breaking changes
- Write a concise summary for the changelog
One changeset per PR - combine all changes into a single changeset with the highest version bump needed.
- patch (0.0.x): Bug fixes, docs, internal refactors
- minor (0.x.0): New features, non-breaking API additions
- major (x.0.0): Breaking changes, API removals
- Tests pass (
yarn test) - Linting passes (
yarn lint) - Changeset created (
yarn changeset) - Commits use Commitizen (
cz) - Documentation updated if needed
- Describe what changed and why
- Reference any related issues
- Include examples if adding new features
- Note any breaking changes
- Automated CI checks must pass (tests, linting)
- At least one maintainer review required
- Address review feedback
- Maintainer will merge when approved
Releases are automated via Changesets:
- Changesets in merged PRs accumulate on
main - Release PR is automatically created with version bumps
- Maintainer merges release PR
- Package is automatically published to npm
- GitHub release is created with changelog
Key directories:
src/- Source code__tests__/- Test filestest/- Test setup and utilitiesdist/- Built output (generated, not committed).changeset/- Changeset files
- README.md - User-facing documentation
- DEVELOPMENT.md - Developer setup and workflows
- AGENTS.md - Detailed project architecture and conventions
- Open an issue for bug reports or feature requests
- Use GitHub Discussions for questions
- Check existing issues and PRs before opening new ones
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.