Skip to main content

How to Contribute

This is a set of guidelines for contributing to reSolve and its packages hosted in the ReImagined project on GitHub. These guidelines are designed to give you a general idea of our vision. Please do not treat them as strict rules you are obliged to follow, and feel free to propose changes to this document in a Pull Request.

Table Of Contents

Pull Requestsā€‹

Pull Request is the primary method to contribute to the ReSolve repository. Use Pull Requests to implement an issue or fix a bug.

reSolve team follows the Git Flow branching model. The main development branch is dev. The master branch contains the most recent stable release and hotfixes. The reSolve repository is writeable only for maintainers. Fork the repository, make the required changes, and create a Pull Request from your fork to the dev branch to change something. Although, if you feel that some other branch is better suited, free to create a Pull Request there.

Naming Conventionsā€‹

Create a new branch in the forked repository. Name it like this:

  • Feature/title for features.
  • Hotfix/title for bug fixes.
  • Docs/title for any documentation topics.

If you are maintaining several branches, don't forget to merge the upstream dev branch into them periodically.

Definition of the Doneā€‹

After implementing a feature or fixing a bug, ensure that all items of the following list are satisfied:

  • Your code abides by the code-style conventions.
  • All existing unit and functional tests pass. Before creating a pull request, ensure that none of these commands show any error in your local environment: yarn prettier, yarn lint, yarn test and yarn test:functional.
  • All examples work.
  • The documentation is up to date (if applicable).

Unit tests, functional tests, and additional examples are highly appreciated.

Code Styleā€‹

Write JavaScript following the ECMAScript-262 version 8 standard and use the Prettier tool. The eslint command should not show any errors with the repo configuration.

Tips:ā€‹

  • Line break is required at the end of all text files.
  • Avoid platform-dependent code.

Working in Monorepoā€‹

ReSolve repository is a monorepo: it contains source code, integration tests and examples for multiple npm packages commonly used together. Monorepo toolchain consists of two concepts: yarn workspaces and oao manager.

The monorepo workflow begins with the bootstrapping process. In the reSolve repository, you should execute yarn command in the repository root. This command installs all npm packages and links all local packages to each other. With these tools, you can develop features without using npm (or local equivalents like sinopia or verdaccio).

Tips:ā€‹

  • All resolve-* packages versions should be identical. Otherwise, the missing npm package versions will be downloaded from the Internet, and local development packages will be ignored.
  • Remember to re-bootstrap using yarn after making changes to the dependent resolve-* packages.

Reporting Bugs and Requesting Featuresā€‹

Follow these guidelines to help maintainers and the community understand your report, reproduce the behavior, and find the related reports.

  • When creating an issue, please include as many details as possible.

  • Before creating an issue, search for the related issues and add links to all issues that seem relevant, even to Closed ones.

  • Bugs and suggestions are tracked using GitHub Issues. After you've determined which package your issue is related to, create an Issue and provide the complete description.

  • Explain the problem and include additional details to help maintainers reproduce it:

    • Use a clear and descriptive title for an issue to identify the problem.
    • Describe the exact steps to reproduce the problem in detail.
    • Provide examples. Include links to files or GitHub projects, or add code snippets that demonstrate the problem. Use Markdown code blocks when providing code snippets.
    • Include screenshots or screencast to demonstrate the problem.
    • If the problem is related to performance or memory, include a memory and CPU profile capture.

Issue Labelsā€‹

Issue Labels by Typeā€‹

Label nameDescription
Type: BugIssues related to defects and incorrect/unexpected feature behavior
Type: EnhancementIssues related to potential improvements and new features

Issue Labels by Severityā€‹

Label nameDescription
Severity: MinorIssues with low impact on the product, e.g., small improvements or imperfections
Severity: ModerateIssues with medium impact on the product, e.g., new features, non-critical defects, etc.
Severity: MajorIssues with high impact on the product, e.g., new packages, installation issues, etc.

Issue Labels by Componentā€‹

Label nameDescription
Component: DocumentationIssues related to package descriptions, docs folder topics, and README files
Component: CoreIssues related to a core part of the framework, installation, etc.
Component: ExamplesIssues related to reSolve examples
Component: @resolve-js/reduxIssues related to the @resolve-js/redux package
Component: @resolve-js/scriptsIssues related to the @resolve-js/scripts package
Component: storage-adaptersIssues related to storage adapters packages
Component: readmodel-adaptersIssues related to Read Model adapters packages
Component: bus-adaptersIssues related to the bus adapters packages
Component: subscribe-adaptersIssues related to the subscribe adapters packages