Contributing
We are thrilled that you're interested in contributing to Zario! Your contributions, whether in the form of bug reports, feature requests, or code, are highly valued and help make Zario an even better
Contributing to Zario
We are thrilled that you're interested in contributing to Zario! Your contributions, whether in the form of bug reports, feature requests, or code, are highly valued and help make Zario an even better logging solution for the Node.js community.
This page provides a general overview of how you can contribute. For a more detailed guide, please refer to our official Contributing Guide in the repository.
General Guidelines
Before you get started, please take a moment to review our Contributing Guide. It contains essential information about our development process, code of conduct, and expectations for contributions.
How to Report Bugs
Found an issue with Zario? Please help us by reporting it!
- Check existing issues: Before creating a new bug report, please check the issues↗ on GitHub to see if the bug has already been reported.
- Provide clear information: When submitting a bug report, include as much detail as possible:
- A clear and concise description of the bug.
- Steps to reproduce the behavior.
- Expected behavior vs. actual behavior.
- Your Node.js version and Zario version (
package.json).
- Any relevant code snippets or configurations that help replicate the issue.
- Screenshots or error messages, if applicable.
How to Suggest Features
Have an idea for a new feature or an enhancement to an existing one? We'd love to hear it!
- Check existing issues: Look through the issues↗ to ensure your feature hasn't been suggested already.
- Describe your idea:
- Clearly explain the feature you'd like to see.
- Describe the problem it solves or the use case it addresses.
- Provide examples of how you imagine the feature would be used (e.g., API changes, configuration options).
Setting up Your Development Environment
To contribute code to Zario, you'll need to set up your local development environment.
- Fork the repository: Fork the
dev-dami/zario repository on GitHub.
- Clone your fork:
- Install dependencies: Zario is a zero-dependency library, but development dependencies are needed for building, testing, and linting.
- Build the project: Zario is written in TypeScript.
This command compiles the TypeScript source code into JavaScript for both CommonJS and ES module formats.
- Run tests:
Ensure all tests pass before making changes.
Coding Guidelines
To maintain code quality and consistency, please adhere to the following guidelines:
- TypeScript Native: All code should be written in TypeScript, leveraging its type-safety features.
- Clean Code: Write readable, maintainable, and self-documenting code.
- Testing: New features and bug fixes should be accompanied by appropriate unit or integration tests. Zario uses Jest for testing.
- Linting: Follow the project's ESLint rules. Run
npm run lint to check for any linting errors.
- Performance: As a "minimal & fast" library, keep performance in mind. Optimize where it makes sense, especially in hot paths (like the
Logger.log method, which has been optimized for deferred timestamp creation and early exits).
- Zero Dependencies: Strive to keep Zario free of runtime dependencies to maintain its lightweight nature.
Submitting Pull Requests
Ready to share your code? Here's how to submit a pull request:
- Create a new branch:
- Make your changes: Implement your feature or fix the bug, ensuring tests pass and linting checks are clean.
- Commit your changes: Write clear, concise commit messages.
- Push to your fork:
- Open a Pull Request: Go to the original Zario repository on GitHub and open a new pull request from your forked branch.
- Provide context: In your pull request description, clearly explain your changes, reference any related issues, and provide instructions on how to test your changes.
Thank you for considering contributing to Zario! Your efforts help strengthen the project and benefit the entire Node.js ecosystem.