Skip to content

Latest commit

 

History

History
73 lines (45 loc) · 2.91 KB

CONTRIBUTING.md

File metadata and controls

73 lines (45 loc) · 2.91 KB

Contributing to the WunderGraph Repository

Welcome to the WunderGraph Community contributing guide. We are excited to having you!

Prerequisites

This guide assumes you have already installed the following software:

  • make (should be installed on all linux / IOS systems)
  • protoc
  • golang >= 1.18
  • Node.js LTS
  • pnpm 7

Getting Started

The WunderGraph Repository is managed as a monorepo. We host three main components:

  • WunderGraph SDK
  • WunderCtl (The primary CLI)
  • WunderCtl (The CLI wrapper, distributed as a NPM package)

Those components can be summarized in two categories:

  1. NPM Packages
  2. Go Modules

All npm packages are stored under ./packages and managed as a pnpm workspace. This means during development all dependencies are linked. The root package.json provides all scripts you need to orchestrate the development and release workflow.

The primary structure of the repository is inherited from the Standard Go Project Layout. For common tasks in the monorepo we use a makefile.

Bootstrap the development environment

This command will install the necessary dependencies for the WunderGraph repository and build all libraries.

make

Run the tests

This command will run all Go and NPM tests.

make test

Ready! You can now start contributing to the WunderGraph repository. Feel free to open an issue or pull request to add a new feature or fix a bug. If you run into any onboarding issue, please open an issue as well or visit the WunderGraph Discord to get help.

Conventional Commit Standard

We use conventionalcommits for changelog generation and more structured commit messages.

In order to enforce this standard we use a linter on pre-commit hook. This functionality is provided by husky. If you use a Node version manager like nvm you need tell husky where to find pnpm. Here is a snippet for nvm:

echo "export NVM_DIR="$HOME/.nvm"\n[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm" > ~/.huskyrc

For JetBrains users

This plugins simplifies the commit message creation process.

Pull Requests

We merge all pull requests in squash merge mode. You're not enforced to use conventional commit standard across all your commits but it's a good practice and avoid mistakes. At the end it's important that the squashed commit message follow the standard.

Releases

See the Release Guide for more information.