Skip to content

Commit

Permalink
add CONTRIBUTING.md. (kysely-org#215)
Browse files Browse the repository at this point in the history
* add CONTRIBUTING.md.

* add contribution section in README.md.

* fix typo @ CONTRIBUTING.md.

* changes following review, line breaks, additional text.
  • Loading branch information
igalklebanov authored Nov 16, 2022
1 parent 6e692a5 commit 2c49bae
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
70 changes: 70 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Would love to contribute to Kysely?

Awesome! We are not very organized yet. We don't have a plan or a roadmap.

Probably the best way to get going is to watch the issue list.
An issue with a `greenlit` label, has been acknowledged by the team and is ready for development.
Find such an issue you'd like to tackle and ask to be assigned to it in the comment section.
Feel free to open an issue if you found a bug or a missing feature you'd like to work on,
and there aren't any issues mentioning it.

If you start working on something larger, it's a good idea to create a draft (WIP) PR at
an early stage so that we can guide you to the right direction.

There are quite a few guidelines to keep in mind:

* Kysely should have zero dependencies.

* Kysely should work in all javascript environments (node.js, deno & modern browsers),
even though the main focus is node.js.

* Everything is immutable.

* The API should be as close to writing raw SQL as possible while still providing
type safety.

* Everything outside of dialect implementations is dialect-agnostic.

* Everything is tested.

* Functionality - No mocks. Everything is tested against real database instances.
No partial testing. If a sql "thing" is supported by some databases, test it
against all of them.

* Types - We're a type-safe package, you get the idea.

* Everything consumer-facing should be documented.

* Everything is type-safe. Things that cannot be implemented in a way that is safe
for all cases, are best left for consumers to implement.

* Most features should have escape hatches.

# Getting started

1. fork kysely.

2. clone your fork.

3. install node.js (preferable latest LTS).

4. run `npm i` in your terminal to install dev dependencies.

5. create a branch.

6. create a draft pull request. link the relevant issue by refering to it in the
PR's description. E.g. `closes #123` will link the PR to issue/pull request #123.

7. implement your changes.

# Testing

1. write functionality tests in `test/node`.

2. write typings tests in `test/typings/test-d`

3. install docker.

4. run `docker-compose up` in your terminal to spin up database instances.

5. run `npm test` in your terminal to run tests.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,3 +563,7 @@ in knex. Bringing the type system and the changes to knex would mean very signif
that aren't possible at this point of the project. Knex was also originally written for javascript and
the typescript typings were added afterwards. That always leads to compromises in the types. Designing
a library for typescript from the ground up produces much better and simpler types.

# How to contribute to Kysely

See [CONTRIBUTING.md](./CONTRIBUTING.md).

0 comments on commit 2c49bae

Please sign in to comment.