We are very happy that you would like to contribute. In this guide you will find instructions on how to setup the repo locally.
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
npm run compile
npm run watch
Run tests
npm test
Watch tests
npm run test:watch
- 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.
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
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.