hybrid-id-generator
Version:
A powerful hybrid ID generator that combines timestamps, machine IDs, random bits, and sequence numbers to create globally unique identifiers. Features collision prevention, Base62 encoding, and optional ID expiry tracking, ideal for distributed systems a
79 lines (58 loc) • 3.75 kB
Markdown
# Contributing to hybrid-id-generator
First off, thank you for taking the time to contribute! 🎉 Contributions of all kinds are welcome, whether you're filing issues, submitting patches, improving documentation, or suggesting new features.
## Table of Contents
- [How to Contribute](#how-to-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Requesting Features](#requesting-features)
- [Submitting a Pull Request](#submitting-a-pull-request)
- [Improving Documentation](#improving-documentation)
- [Code of Conduct](#code-of-conduct)
## How to Contribute
### Reporting Bugs
If you find a bug in the `hybrid-id-generator` package, please create an issue to report it:
1. **Search existing issues** to see if the bug has already been reported. This helps reduce duplicate issues.
2. If no issue exists, [create a new issue](https://github.com/miladezzat/hybrid-id-generator/issues/new) with the following details:
- Describe the bug in clear and concise terms.
- Provide steps to reproduce the bug.
- Include the version of `hybrid-id-generator`, Node.js, and any other relevant details (e.g., operating system).
- If possible, include code snippets or a link to a repository demonstrating the issue.
We will review your report and aim to respond within a few days.
### Requesting Features
We welcome ideas for new features! To request a new feature:
1. Check the existing [issues](https://github.com/miladezzat/hybrid-id-generator/issues) and [pull requests](https://github.com/miladezzat/hybrid-id-generator/pulls) to ensure it hasn't been suggested or implemented already.
2. If the feature doesn't exist, [create a new issue](https://github.com/miladezzat/hybrid-id-generator/issues/new) and provide the following details:
- Explain the feature and why it's needed.
- Describe how it could be implemented, if you have ideas.
- Include any alternatives or workarounds you've considered.
Once submitted, we will evaluate the request and discuss its feasibility.
### Submitting a Pull Request
Pull requests (PRs) are highly appreciated! To submit a PR:
1. **Fork the repository** and create your own branch:
```bash
git checkout -b my-feature-branch
```
2. Make your changes in the new branch. Be sure to follow these guidelines:
- Ensure your code follows the existing style and structure.
- Write unit tests for new features or bug fixes.
- Run tests to make sure everything works (npm test).
- If you're adding a new feature, make sure to update the documentation if necessary.
3. Commit your changes with a meaningful commit message:
```bash
git commit -m "Add a new feature for X"
```
4. Push to your fork:
```bash
git push origin my-feature-branch
```
5. Create a pull request (PR) to the main branch of the hybrid-id-generator repository.
6. In your PR description, reference any relevant issues (e.g., "Fixes #123") and explain your changes.
We will review your PR, give feedback if necessary, and merge it once it's ready. Please be patient, as this process can take some time depending on the complexity of the change.
### Improving Documentation
Good documentation is key to a successful project! You can contribute by improving the documentation in the following ways:
- Fix typos or unclear sections.
- Add new examples to demonstrate how to use the package.
- Improve the structure of the README or add new guides.
Feel free to submit a PR for any documentation changes.
### Code of Conduct
This project follows the [Contributor Covenant](./CODE_OF_CONDUCT.md). By participating in this project, you agree to abide by its terms.
Please treat others with respect and kindness. Harassment, trolling, or any other form of inappropriate behavior will not be tolerated.