Skip to content

Latest commit

 

History

History
118 lines (76 loc) · 3.91 KB

CONTRIBUTING.md

File metadata and controls

118 lines (76 loc) · 3.91 KB

Contributing

Hello! 👋 Thanks for taking the time to contribute.

There are many ways you can contribute 😄

Remember to follow the code of conduct

We use Bun as our package manager and JavaScript runtime. Additionally, we use Supabase as our database backend. Make sure you have installed the Supabase CLI.

$ bun --version
1.0.15
$ supabase --version
1.123.4

When you've cloned the repo (or your fork of this repo) and checked out to your branch (following the GitHub flow), be sure to run bun install, supabase start, and supabase db reset.

Pull Request contributing guide

Doing the following will increase your chances of your pull request to be accepted 👍

Fixing an obvious issue

If an issue's solution seems obvious or clear (like fixing a typo or link), you may directly create a PR. Remember to fill in the required forms.

Major PR

If you're making somewhat bigger code changes please write tests if they don't exist already 🧪.

If you're fixing a bug 🐛, please remember link to the applicable issue describing the bug like this (if it exists):

 - #issue-number

For example:

 - #42

If you're changing/adding documentation, the above isn't required.

Testing

First, make sure you have Playwright set up properly (this is a one-time thing):

$ bunx playwright install --with-deps

Before you run your tests, spin up the development server:

$ bun run dev

Then, in another tab, run the tests:

$ bun run test

Or, if you have made any visual changes, remember to update the snapshots:

$ bun run test --update-snapshots

If you don't use a Linux-based system, get the updated snapshots from the CI.

See here for an example test. We use Playwright for end-to-end testing.

Troubleshooting

Sometimes, after running many tests in parallel, overwhelming your Supabase instance, your dev server may show messages along the lines of "TCP Aborted." In that case, completely clean and restart your Supabase instance via:

$ docker kill $(docker ps -q --filter "name=zyma")
$ supabase stop
$ supabase start

Similarly, if you see console messages of not being able to connect to the Realtime WebSockets server, you should first try supabase stop && supabase start before you run the "hard restart" command described above. The same applies when you get "AuthRetryableFetchError"

I will strive to provide better instructions as I investigate this uncommon issue.

Code style

We use Biome to lint and format our codebase. You can format the codebase by running bun run format, and lint using bun run lint.

Creating an issue

Please remember to fill out all the forms when making an issue 👍. This includes but is not limited to

  • Describe the issue
  • Reproduction steps
  • System information (e.g. Bun version, OS version)

Or if it's a feature request ✨ (also not limited to)

  • Describe the feature
  • Why the feature cannot exist without changes to code
  • What the new feature might be useful for