Contributing
Learn how to contribute to the pg-smart-search open-source project, including development setup and coding standards.
Contributing
We welcome contributions to pg-smart-search! Whether it's a bug fix, a new feature, or improved documentation, your help is appreciated.
Development Setup
-
Fork and Clone the repository
git clone https://github.com/abubakrmuminov/pg-smart-search.git cd pg-smart-search -
Install dependencies
npm install -
Set up your environment There's no
.env.examplein the repo —PgAdapter(used by the CLI and integration tests) reads connection settings fromPG_HOST,PG_PORT,PG_USER,PG_PASSWORD, andPG_DATABASEenv vars (each defaults to a local Postgres onlocalhost:5432). Integration tests instead spin up their own database viadocker-compose.test.yml— you don't need to set these manually just to runnpm test. -
Run tests Ensure your setup is working by running the test suite:
npm test
Coding Standards
- TypeScript: All code must be strictly typed. Avoid
anywhere possible. - Testing: Any new feature must include corresponding unit/integration tests.
- Commits: We follow Conventional Commits (e.g.,
feat:,fix:,docs:).
Pull Request Process
- Create a new branch for your feature or fix (
git checkout -b feat/my-feature). - Make your changes and commit them.
- Ensure all tests pass (
npm test). - Push to your fork and open a Pull Request against the
mainbranch. - Clearly describe the problem and solution in the PR description.
Reporting Bugs
If you find a bug, please open an issue on GitHub with:
- A clear description of the problem.
- Steps to reproduce the issue.
- Your Node.js, PostgreSQL, and
pg-smart-searchversions.