Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 2.42 KB

CONTRIBUTING.md

File metadata and controls

64 lines (43 loc) · 2.42 KB

Contributing to Sqlectron Core

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

There are some ways of contributing to Sqlectron

  • Report an issue
  • Development

Report an issue

  • Before opening the issue make sure there isn't an issue opened for the same problem
  • Include the database client you were using during the error (mysql, postgres, etc.)
  • Include the version of sqlectron-core you are using
  • Include the stack trace error

Development

It is required to use editorconfig. Furthermore, please write and run tests (/spec/db.spec.js) before pushing any changes.

Testing

With docker + docker-compose

It will bring up some databases such as MySQL and PostgreSQL and run all the tests:

docker-compose run --rm test

Or to start the container and run the test command manually from there:

docker-compose run --rm test bash
npm install
npm test

Without Docker

You will need to bring up all the databases then run the tests through:

npm test

Adding a new client

  1. Duplicate an existing client that is the most similar to the new client (e.g. postgresql). Then adapt the code for this new client with its own logic. But it MUST keep the same public API. The tests will help to ensure the API still the same.
  2. Include the new client into the list of supported dbs.
  3. Ensure the tests are passing. May require adapting the tests to handle any different input/output the new client might have from the other clients.
  4. Link sqlectron-core to sqlectron-gui and test it in the app.
  5. Include a logo server-db-client-<client_name>.png into the app.

Publishing

Publishing a new release to npm:

  • Merge the chagnes to the main branch.
  • Run npm version <major|minor|patch> based on the level of the changes being deployed. It will set a new version in the package.json and also create a new git tag for that.
  • Run git push --follow-tags to push those changes to the remote git repository.
  • Create a new release for that version at https://github.com/sqlectron/sqlectron-db-core/releases. Don't forget to set the release title and the description with all the changes.