Contributing Guide
April 4, 2024 ยท View on GitHub
We are very happy that you would like to contribute. In this guide you will find instructions on how to setup the repo locally.
Setup
Install
Install Bun
To be able to run all tests in the "./packages/global-registrator" package, you need to install Bun.
Linux & MacOS
curl -fsSL https://bun.sh/install | bash
Windows
powershell -c "irm bun.sh/install.ps1 | iex"
Install dependencies
npm install
Compile
npm run compile
Watch
npm run watch
Test
Run tests
npm test
Watch tests
npm run test:watch
Debug
- Go to the package you wish to test in the terminal (e.g. "cd ./packages/happy-dom")
- Write "debugger;" at the place you want to place a breakpoint in the code.
- Run the following command in the terminal:
npm run test:debug
- Open Chrome.
- Open developer tools.
- A green ball should appear to the left of the menu bar in developer tools.
- Click on the green ball.
- Click continue to jump to your breakpoint.
Commit Convention
We use the Conventional Commits standard for our commit messages. The description should start with an uppercase character.
Example
fix: [#123] This is my commit message
Pull Request
Do your changes on a branch. When you are done with your changes you can create a pull request.
Each pushed commit will trigger a Github Workflow that will compile, run tests and lint. The Github Workflow has to complete successfully in order to merge the pull request.
One code owner has to approve the pull request. The code owner will usually merge the pull request if the build has passed and the code looks good.